A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Error loading file
Joined: Oct 23, 2002
Jun 23, 2005 05:52:00
I'd like to load a file from my
and read it's contens, but
I get an "Error loading file" when the code is run.
Where should I place the file ?
My servlet class file lies in: Tomcat/webapps/examples/WEB-INF/classes/
where the file also lies. I contact the Servlet via the following URL:
Thanks in advance,
Joined: Dec 11, 2004
Jun 23, 2005 06:35:00
Look up ServletContext.getResource or ServletContext.getResourceAsStream.
How to ask a question...
Simple Servlet Examples
Author and all-around good cowpoke
Joined: Mar 22, 2000
Jun 23, 2005 07:23:00
Your use of /servlet/ in the URL indicates you may be getting tangled up in the "invoker" servlet conventions. Read
this FAQ on the invoker here at the ranch.
I agree. Here's the link:
subject: Error loading file
tomcat 3.2 and invoking a servlet
using servlets in Jboss-tomcat
problems with deploying servlet
Different ways for Contex
TOMCAT - Path to GIF files
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015