Win a copy of Spring Boot in Practice this week in the Spring forum!

SaiManasa Dasari

Ranch Hand
+ Follow
since Aug 21, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by SaiManasa Dasari

Thanks Ulf. I have both j2ee.jar and mail.jar in my classpath.Now it is working fine.Thank you.

I am getting below exception while connecting to POP3 Store.I am using mail.jar in my classpath.
Below is my code to connect to POP3.

Below is the exception StackTrace i am getting.

java.lang.NoSuchMethodError: com.sun.mail.pop3.POP3Store.<init>(Ljavax/mail/Session;Ljavax/mail/URLName;Ljava/lang/String;Z)V
at com.sun.mail.pop3.POP3SSLStore.<init>(

Please help me to resolve this exception.

Can someone please help me to resolve this issue.
8 years ago
I am trying to get currency conversion values using the URL "" . I have generated web service client using this URL and implemented servlet deployed it in tomcat. It worked fine in one deployment but when i have deployed the same in another tomcat and hitting the web service i am getting 404 page not found error. In generated web service client below is the code to conversion.

Can anyone please help me to resolve this issue. Do i need to do any changes in it? I have seen that by hitting the URL "http://www.webserviceX.NET/ConversionRate" in IE we get 404 page not found error. But i am using it in webservice SOAP Action only. can anyone please help me why i am getting 404 page not found error.

The error stack trace i am getting is

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(
Caused by: (404)Not Found
at org.apache.axis.transport.http.HTTPSender.readFromSocket(
at org.apache.axis.transport.http.HTTPSender.invoke(
at org.apache.axis.strategies.InvocationStrategy.visit(
at org.apache.axis.SimpleChain.doVisiting(
at org.apache.axis.SimpleChain.invoke(
at org.apache.axis.client.AxisClient.invoke(
at org.apache.axis.client.Call.invokeEngine(
at org.apache.axis.client.Call.invoke(
at org.apache.axis.client.Call.invoke(
at org.apache.axis.client.Call.invoke(
at org.apache.axis.client.Call.invoke(
at NET.webserviceX.www.CurrencyConvertorSoapStub.conversionRate(
at CurrenyConversionRateValue.main(
... 5 more
Can anyone please help me to get this webservice work.
8 years ago

I have 3 jsp's(top.jsp,left.jsp,right.jsp) in main.jsp.When i click on option in top.jsp i want to refresh the entire browser.I have tried window.location.reload().But it is refreshing only one jsp in which the javascript function exists. Can anyone please help me how to refresh the entire browser.
Hi william,
I have logged all the eceptions.I did not get any exception.Its downloading fine.But when downloading,file size is getting multiple of 2 of before downloading file size.
I am using following code to set content-length.

Can anyone please help me to resolve this.
9 years ago
Hi william,
I have tried setting content-length.If i set the content length i am getting only 1kb data of file instead of whole zip file.when i am trying to open that zip it is showing that the zip got corrupted.can anyone please help me how to resolve this..

Thanks in advance.
9 years ago
I am using below code to download file using servlets.But when i am downloading file for first time it is showing exact file size,from second time it is showing multiple of 2 to the previous size of file.I want to get file size as same for every time of downloading.Can any one please help me to do that.

Here filePath is the path of the file which i want to download.
9 years ago
Hi bala,
I have tried that.But if i change inlilne to attachment it will ask to download for even png,txt files also.My requirement is to open file directly by clicking on the file name,not to download it.

Can anyone please help me to solve this.
9 years ago
Hi Ivan,
For doc files i am getting mimetype as application/msword.I am setting that only as contenttype.
9 years ago

I am using servlet code to open files by onclicking the file name in my jsp.It works well for png,pdf,text files.But when i am trying to open doc file it is downloading rather than open directly.
Here is my code.Can anyone please help me to solve this.

if(finalFileForOpen != null && finalFileForOpen.trim().length() > 0)
file = new File(finalFileForOpen);
int length = 0;
ServletOutputStream outputStream = response.getOutputStream();
ServletContext context = getServletConfig().getServletContext();
String mimetype = context.getMimeType(finalFileForOpen);
if(mimetype == null)
mimetype = context.getMimeType(finalFileForOpen.toLowerCase());
System.out.println(" finalFileForOpen "+finalFileForOpen+" mimetype "+mimetype);
response.setContentType((mimetype != null) ? mimetype : "application/pdf");
response.setContentLength((int) file.length());
response.setHeader("Content-disposition","inline; filename=" + file.getName());
byte[] buffer = new byte[1024];
DataInputStream inputStream = new DataInputStream(new FileInputStream(file));
while((inputStream != null) && ((length = != - 1))
outputStream.write(buffer, 0, length);

Please help me to solve this.Thanks in advance.
9 years ago
Thanks for Your reply Rob.Is there any possibility to make it work with frames?please can anyone help me in this.I cant change frames as it involves more changes in my case.

I have four jsps as four frames to another jsp.In this i have menu items in top.jsp. On mouseover of menu in top.jsp, menu items will be displayed.But menu items exceeds top.jsp size.Below top.jsp i have right.jsp.Is there any possibility to display those menu items completely not relative to jsp size.I heard that it is possible through z-index option.But i cant make it possible even using z-index option.Can anyone please help me to do this.Thanks in advance.
I need to display innerlist on mouseover and hide it on mouse out.Below is my code.But its displaying whole thing and not working.could anyone plaese help me.
<meta charset="utf-8" />
<title>Css Dropdown menu</title>
ul.topmenu, ul.topmenu ul {
display: block;
margin: 0;
padding: 0;
ul.topmenu li {
display: inline;
list-style: none;
margin: 0;
padding-right: 1.5em;
ul.topmenu li ul {
visibility: hidden; }
ul.topmenu li.submenu:hover ul {
visibility: visible;

Hi ulf/prjakta,
Thanks for your reply.
I dont know ajax it possible through jquery?please help me is there any other way to do it in simple way.
9 years ago