tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John M. Corro" <john.co...@cornerstone.net>
Subject Re: passing a file to a servlet (fopservlet) file not found error
Date Wed, 02 Jan 2002 21:01:11 GMT
When tomcat looks for your FO file, (by default) it looks for it in the bin
directory.  Either try fully qualifying your fo file name or put a copy of
the fo file in your bin directory (<tomcat location>/bin).

----- Original Message -----
From: "Chuck Paussa" <Chuck.Paussa@systems.dhl.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, January 02, 2002 2:40 PM
Subject: passing a file to a servlet (fopservlet) file not found error


> 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:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message