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-nameFop/servlet-name servlet-classFopServlet/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]
Re: passing a file to a servlet (fopservlet) file not found error
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 [EMAIL PROTECTED] To: [EMAIL PROTECTED] 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-nameFop/servlet-name servlet-classFopServlet/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] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: passing a file to a servlet (fopservlet) file not found error
Excellent, Thank you Chuck John M. Corro wrote: 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 [EMAIL PROTECTED] 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 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]