You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by QM <qm...@brandxdev.net> on 2005/04/01 04:49:07 UTC

Re: Need Help w. Servlet Images.

On Thu, Mar 31, 2005 at 02:42:10PM -0500, Steve R. Burrus wrote:
: Can someone/somebody please tell me just how exactly I go about viewing an image using both of the FileInputStream and the FileOutputStream classes in connection with the method "getRealPath()"??

Share your code, and we can help point out bugs.

Better yet: what does the stack trace indicate is the source of the
error?


: I have been failing to view the images due to always getting a "java.lang.NullPointerException" every time that I try to see the images in my browser. 

I recall getRealPath() doesn't work quite well inside packed WAR files,
if that's how you're running.  

If you're streaming images, why not place them outside of the webapp?
That lets the images and the webapp vary independently.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org