Amitav Anand

Ranch Hand
+ Follow
since Sep 22, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Amitav Anand

Hi Michael,

I do agree with you and thanks for this.

cheers !!!
amitav
15 years ago
Thanks a ton guys......I will send out the relevant docs to people who are preparing for SCWCD 1.5 and planning to write the exam in near future...But first and foremost, I would suggest you to go through HFSJ second edition thoroughly and then you can refer any other books, docs, mocks, etc....

cheers !!!
Amitav

[Some inappropriate content removed/modified]
15 years ago
Many Congratulations......cheers !!!
15 years ago
I wanna thank authors of HFSJ for such a wonderful book and all the ranchers for posting good questions on java ranch which cleared most of the concepts....
15 years ago

I wanna thank authors of HFSJ for such a wonderful book and all the ranchers for posting good questions on java ranch which cleared most of the concepts....


15 years ago
Please help me out on the above problem...

Many thanks.
15 years ago
Hi Ranchers,

Our environment - WPS 6.0, JSR 168 portlet, RAD 7.0..
In one of our portlet page I have got following block of code
<%
String url=request.getContextPath()+"/DownloadServlet?indexToken="+dataBean.getIndexToken();
String encodedURL=response.encodeURL(url);
%>
<form action="<%= encodedURL %> method="post" target="_new">
<input type="checkbox" name="zipRequired" value="false"> Select the 'zip' option---something like this
<input type="submit" value"downlaod">
</form>
When the portlet page is rendered using WPS 6.0, the html source of the above JSP looks something like this.
<form action="/1/PA_12_XYZ/DownloadServlet;jsessionid=A9BA1447B82CB594B176D479288EAE1B?indexToken=-432353"method="post">

But when the 'download' button is clicked, it opens up a new window with following URL
http://www.server-node.com/1/2?indexToken=-432353
Since the above URL is incomplete the download servlet never gets invoked.
Please could you suggest why other details of URL is getting disappeared.

The code is working absolutely fine in my local development environment, but on our actual system test environment
the above URL problem is coming into picture. I meant when the button is clicked, the contextpath along with the servlet name is getting removed from whole URL.

I am able to download in my local development environment using both IE and Mozilla...

Can anybody shed some light on this please?

Thanks
15 years ago
In my application, I have got a portlet service whose entry is mentioned in the PortletServiceRegistryService.properties file.
To retrieve the entry from the above mentioned property file, I have this block of code in the filter that intercepts the request and tries to get the service object from the propery file.

Entry in the PortletServiceRegistryService.properties file.
Location of the file in the Unix box is : /opt/WebSphere/PortalServer/shared/app/config/services/PortletServiceRegistryService.properties
com.xxx.xxxxx.MyService = com.xxx.xxx.xxx.MyServiceImpl

Block of code which tries to get the service object
try{

MyService svc = (MyService )portletConfig.getContext().getService(com.xxx.xxxxx.MyService.class);
}
catch(PortletServiceUnavailableException e)
{
throw new Exception("Portlet Service is not available.");
}

The parameter passed to the getService() method is exactly same as the key entered in the PortletServiceRegistryService.properties file.
And both MyService and MyServiceImpl files are in a JAR, which is kept in shared/app.

But its throwing PortletServiceUnavailableException in the above block of code.
Could anyone help me out in this regard please? Its really very urgent ..

In the property file, there are many portlet services which are required for WPS 5.1 server itself and they must be getting loaded for sure..I am wondering why the newly added MyService is not availavle.

Is there any specific configuration required on the portal server to locate the portlet service?

Many Thanks.
Amit
15 years ago
Hi,

When I was trying to import a page defination XML file to the portal environment, it did get stop in the middle because one of the portlet entry was not available.

Please have a look at the below mentioned error.

<message id="EJPXA0025E">com.ibm.wps.command.xml.XmlCommandException: EJPXA0025E: The resource was not found in the portal, either because it does
not exist or because you have not specified an identifying attribute in the XML input . [portlet _3_003I24PMDB00JK5A_21L name=CustomerSerachPortlet]</message>

After this problem whenever the server URL is accessed from the browser, its taking ages and finally giving "Internal Server Error".

I could see following error message in the wps.out.log.

[2/17/09 16:31:58:043 GMT] 723a2a0a ThreadMonitor W WSVR0605W: Thread "WorkManager.PortalSearchIndexWorkManager : 2" (33f52a09) has been active for 685,993 milliseconds and may be hung. There are 1 threads in total in the server that may be hung.
[2/17/09 16:31:58:047 GMT] 723a2a0a ThreadMonitor W WSVR0605W: Thread "WorkManager.PortalSearchIndexWorkManager : 1" (26196a09) has been active for 686,369 milliseconds and may be hung. There are 2 threads in total in the server that may be hung.

Looking at the above wps log, I killed some of the hung processes and also checked the rouge processes and then restarted the server.

Even after that its giving "Internal Server error".

Please could you focus some light on this.

Alongwith this above problem, I also want some help like how to remove the old servlet and portlet references from the portal, which was removed from the web and portlet.xml file, but the references are still present.

I would really appreacite your quick help.

Many Thanks.

Amiatv Anand

15 years ago
Actually I am developing code to upload a file from client to a specific location in the server(for example : c:\Project\Upload\UploadedFiles\) and somewhere in the code I am trying to rename the uploaded file for which I need permission.

Can anybody help me how to configure the java.policy file using the policy tool available in the WSAD 5.1.2 and once configured what needs to be done afterwards.

There are two java.policy file in the WSAD and which one to use:
C:\WSAD\_jvm\jre\lib\security
C:\WSAD\eclipse\jre\lib\security

And similarly the policy tool are located in two folders
C:\WSAD\_jvm\jre\bin
C:\WSAD\eclipse\jre\bin

Which policy tool and java.policy file to use for the above requirement?

Actually I had updated the File permission to "write" in the java.policy file from C:\WSAD\_jvm\jre\lib\security\ using the policytool available under C:\WSAD\_jvm\jre\bin.

But did not work as expected.
Please help me out.

Thanks.
18 years ago
Actually I am developing code to upload a file from client to a specific location in the server(for example : c:\Project\Upload\UploadedFiles\) and somewhere in the code I am trying to rename the uploaded file for which I need permission.

Can anybody help me how to configure the java.policy file using the policy tool available in the WSAD 5.1.2 and once configured what needs to be done afterwards.

There are two java.policy file in the WSAD and which one to use:
C:\WSAD\_jvm\jre\lib\security
C:\WSAD\eclipse\jre\lib\security

And similarly the policy tool are located in two folders
C:\WSAD\_jvm\jre\bin
C:\WSAD\eclipse\jre\bin

Which policy tool and java.policy file to use for the above requirement?

Actually I had updated the File permission to "write" in the java.policy file from C:\WSAD\_jvm\jre\lib\security\ using the policytool available under C:\WSAD\_jvm\jre\bin.

But did not work as expected.
Please help me out.

Your help is highly appreciated.

Thanks.
Actually I am developing code to upload a file from client to a specific location in the server(for example : c:\Project\Upload\UploadedFiles\) and somewhere in the code I am trying to rename the uploaded file for which I need permission.

Can anybody help me how to configure the java.policy file using the policy tool available in the WSAD 5.1.2 and once configured what needs to be done afterwards.

There are two java.policy file in the WSAD and which one to use:
C:\WSAD\_jvm\jre\lib\security
C:\WSAD\eclipse\jre\lib\security

And similarly the policy tool are located in two folders
C:\WSAD\_jvm\jre\bin
C:\WSAD\eclipse\jre\bin

Which policy tool and java.policy file to use for the above requirement?

Actually I had updated the File permission to "write" in the java.policy file from C:\WSAD\_jvm\jre\lib\security\ using the policytool available under C:\WSAD\_jvm\jre\bin.

But did not work as expected.
Please help me out.

Your help is highly appreciated.
18 years ago
Thank you very much George.
Hope I can now carry on with the implementation..


Thanks.
Anand
18 years ago
Thanks Ben...
Sorry to mention third party API. Actually our company is having a framewrok which has the support for File upload, but since I am new to this functionality(i.e. file upload), I just wanted to know what all factors need to be considered for the same.

Do we need to have a separate File Transfer Server(which must be having some servlet application in itself) to do the processing of file or we can implement the whole processing of uploaded file in our own servlet itself.

Since the file upload functionality is supposed to be implemented for a financial institution, I am bit worried about the security related issues like scanning the file for viruses and other issues, which I am not aware of.

I would you request you to give me some more information on this, which will make things a bit easier.

Thanks..
Anand
18 years ago
I am trying to implement File upload functionality using Servlet(using some third part APIs).
Can anybody help me what all parameters/factors needs to be considered while transfering the file from client system to the server.
How exactly it is to be implemented considering security as the main issue?


Thanks.
Anand
18 years ago