DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9816>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9816 Programmatic Requests to JSP fail with Error Code 404 Summary: Programmatic Requests to JSP fail with Error Code 404 Product: Tomcat 4 Version: 4.0.4 Beta 3 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hello: If I try to access my JSP via a web browser, I have no problems. However, if I try to access the JSP programmatically, via HttpURLConnection, I get error 404 (as shown by the access logs). I know that there is a long standing bug in the 1.3 JDK related to HttpURLConnection (Java Bug #4160499), but the source of my problem is why Tomcat 4 returns status code 404 for a well-formed URL request. When my program runs, it constructs a URL of the form: http://localhost:8080/WebFoo/jsp/Folder1.jsp In my Java test program, I display the parts of the URL using the methods: url.getFile(), url.getHost(), etc. and it displays: URL Information for: http://localhost:8080/WebFoo/jsp/Folder1.jsp File: /WebFoo/jsp/Folder1.jsp Host: localhost Port: 8080 Protocol: http Ref: null Header Information: [1]: Content-Type: text/html [2]: Date: Wed, 12 Jun 2002 20:01:46 GMT [3]: Server: Apache Tomcat/4.0.4-b3 (HTTP/1.1 Connector) [4]: Connection: close conn.getHeaderField(0) returns HTTP/1.1 404 /jsp/Folder1.jsp status code = 404 As you can see, the header fields seems to indicate that my web application name ("WebFoo") is lost somehow. The Tomcat 4 access log file records the entry: 127.0.0.1 - - [12/Jun/2002:15:50:08 -0500] "GET /WebFoo/jsp/Folder1.jsp HTTP/1.1" 404 627 Finally, my web application is not listed in the server.xml file as an explicit Context. Is this required? Can you help me to understand why I'm getting this 404 error code while things work fine my (IE) browser? Thanks, Glenn -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>