The above code is running perfectly fine when I am executing it on tomcat,oc4j or websphere but throwing exception at the time of executiing on weblogic 8.1 sp4.Exception is generated on the following line
I'm not sure why it would work in some app servers and not in others. What I would suggest is that you use a servlets rather than a JSP for writing the object response to the stream. I say that because A JSP is designed for rendering text to a client while allowing you to intermingle Java code in the middle to generate dynamic content. It can easily cause problems with an app as you have coded. If, for example, some text is placed inadvertantly at the top of the file your object output stream would become corrupt as the text would be mixed with the stream in teh response. A servlet would give you much tighter control over what is sent to the client. Also, your server side JSP code is not setting the content type for the response. I'm not sure but I wouldn't be surprised if the content type is defaulted to some text variation such as text/ascii, text/html or something like that. I bet if you use a servlet and set the content type it would solve your problem as well as many future issues.
Holla at me...<br /><a href="http://codeforfun.wordpress.com" target="_blank" rel="nofollow">http://codeforfun.wordpress.com</a>
Joined: Jul 03, 2006
Thanks craig....... I tried with the following code on the server-side for seting content-type but in vain.It doesnot make any change at all.