You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Steve R. Burrus" <bu...@excite.com> on 2005/03/31 21:42:10 UTC

Need Help w. Servlet Images.

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()"?? 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. 

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

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


Re: getTextContent not found with Tomcat 5.0.28 (solved)

Posted by Eric VERGNAUD <er...@jlynx.com>.
Le 10 mai 05 à 15:56, Eric VERGNAUD a écrit :

> Hi,
>
> I'm having problems running Tomcat 5.0.28 using JDK 1.5.0.02.
>
> I'm using 1.5 methods such as Node.getTextContent. This works fine  
> when run as a standalone app in JDK 1.5, however when run with  
> Tomcat under the same JDK, execution throws an exception saying  
> getTextContent was not found.
>
> Is there a setting to change somewhere in the Tomcat config files ?
>
> Eric

Tomcat was loading the parser class from the Endorsed folder. I  
removed the various jars from that folder and now it's ok.

Eric

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


getTextContent not found with Tomcat 5.0.28

Posted by Eric VERGNAUD <er...@jlynx.com>.
Hi,

I'm having problems running Tomcat 5.0.28 using JDK 1.5.0.02.

I'm using 1.5 methods such as Node.getTextContent. This works fine  
when run as a standalone app in JDK 1.5, however when run with Tomcat  
under the same JDK, execution throws an exception saying  
getTextContent was not found.

Is there a setting to change somewhere in the Tomcat config files ?

Eric


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


Re: Need Help w. Servlet Images.

Posted by QM <qm...@brandxdev.net>.
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