Hi, total tomcat newbie question:
I'm trying to pass a file to a servlet (FopServlet). The instructions
say, go to a URL like this:
http://localhost:8080/fop/fop?fo=/pathtofile/test.fo
Tomcat returns:
javax.servlet.ServletException: /pathtofile/test.fo (The system cannot find the path
specified)
at FopServlet.doGet(FopServlet.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
The servlet source code has
FileInputStream file = new FileInputStream(foParam);
I put the test.fo file in every tomcat sub-directory I thought might
work and called it replacing "pathtofile" with every path combination
might work. Still, I get a file not found error. So, there must be
something that I'm not understanding correctly. Why can't my servlet
find the file? I am running tomcat standalone, out of the box. Apache
Tomcat/4.0.1
Here is how I configured the system:
server.xml
<Service name="Tomcat-Standalone">
<Engine name="Standalone" defaultHost="localhost" debug="0">
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
<Context path="" docBase="ROOT" debug="0"/>
<Context path="/fop" docBase="fop" debug="0" reloadable="true"
privileged="false"/>
C:\jakarta-tomcat-4.0.1\webapps\fop\WEB-INF\web.xml
<web-app>
<servlet>
<servlet-name> Fop </servlet-name>
<servlet-class> FopServlet </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name> Fop </servlet-name>
<url-pattern> /fop </url-pattern>
</servlet-mapping>
</web-app>
Chuck Paussa
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>