I can run my servlets in jsdk2.1 by using the url
http://localhost/:8080/examples/servlet/RequestInfoExample. I get there by
bringing up http://localhost:8080 and clicking on the ServletExamples and
clicking on one of the provided examples.
I have developed two more servlets called CPP and PostToCallParser. The CPP
executes correctly when I try to run it by itself using the url
http://localhost/:8080/examples/servlet/CPP. PostToCallParser does a post
to CPP. This is where the error occurs. I get a FileNotFound Exception. I
am confused about how to get to CPP. I do not see a directory called
"servlet" under examples, I see "servlets". Here is the code that posts the
data to CPP.
URL url = new
URL("http://sparc20:8080/webpages/WEB-INF/servlet/CPP?inFile="+xyz); //xyz
is a large string
//URL url = new
URL("http://sparc20:8080/examples/servlet/CPP?inFile="+xyz);
//URL url = new URL(new
String("http://sparc20:8080/examples/servlet/CPP?inFile="+xyz));
//URL url = new URL(new
String("http://sparc20:8080/examples/WEB-INF/servlets/CPP?inFile="+xyz));
I have tried all the above iterations. My servlets are in
/examples/WEB-INF/servlets. Someone please tell me what is going on. I am
stumped, and that is easy as a beginner. I have provided the contents of my
directory structure below.
Here is my directory structure (ls -R).
./META-INF:
MANIFEST.MF
./etc:
SimpleStartup.java
./examples:
WEB-INF
images
servlets
./examples/WEB-INF:
jsp
mappings.properties
mime.properties
servlets
servlets.properties
webapp.properties
./examples/WEB-INF/jsp:
beans
./examples/WEB-INF/jsp/beans:
cal
colors
error
./examples/WEB-INF/jsp/beans/cal:
Entries.class
Entries.java
Entry.class
Entry.java
JspCalendar.class
JspCalendar.java
TableBean.class
TableBean.java
./examples/WEB-INF/jsp/beans/colors:
ColorGameBean.class
ColorGameBean.java
./examples/WEB-INF/jsp/beans/error:
Smart.class
Smart.java
./examples/WEB-INF/servlets:
CPP.class CPP.java CallParser.class CallParser.java CookieExample.class
CookieExample.java
HelloWorldExample.class HelloWorldExample.java HelloWorldExample1.class
HelloWorldExample1.java
LocalStrings.properties PostToCallParser.class PostToCallParser.java
RequestHeaderExample.class
RequestHeaderExample.java RequestInfoExample.class RequestInfoExample.java
RequestParamExample.class
RequestParamExample.java SessionExample.class SessionExample.java
back.CallParser.java
inFileinPosttocall orig_CallParser.java
./examples/images:
code.gif
execute.gif
return.gif
./examples/servlets:
ba.helloworld.htm cookies.html helloworld.html index.html reqheaders.html
reqinfo.html reqparams.html sessions.html sh-ints0-down sh-version
./javax:
servlet
./javax/servlet:
CPP.class GenericServlet.class LocalStrings.properties
PostToCallParser.class
RequestDispatcher.class Servlet.class ServletConfig.class
ServletContext.class
ServletException.class ServletInputStream.class ServletOutputStream.class
ServletRequest.class ServletResponse.class SingleThreadModel.class
UnavailableException.class class http jsp
./javax/servlet/http:
Cookie.class
HttpServlet.class
HttpServletRequest.class
HttpServletResponse.class
HttpSession.class
HttpSessionBindingEvent.class
HttpSessionBindingListener.class
HttpSessionContext.class
HttpUtils.class
LocalStrings.properties
NoBodyOutputStream.class
NoBodyResponse.class
./javax/servlet/jsp:
HttpJspPage.class
JSPPage.class
./src:
javax
./src/javax:
servlet
./src/javax/servlet:
CPP.java
CallParser.java
GenericServlet.java
LocalStrings.properties
RequestDispatcher.java
Servlet.java
ServletConfig.java
ServletContext.java
ServletException.java
ServletInputStream.java
ServletOutputStream.java
ServletRequest.java
ServletResponse.java
SingleThreadModel.java
UnavailableException.java
http
jsp
sh-version
./src/javax/servlet/http:
Cookie.java
HttpServlet.java
HttpServletRequest.java
HttpServletResponse.java
HttpSession.java
HttpSessionBindingEvent.java
HttpSessionBindingListener.java
HttpSessionContext.java
HttpUtils.java
LocalStrings.properties
./src/javax/servlet/jsp:
HttpJspPage.java
JSPPage.java
./tmp:
1da4ea39
1da4edd0
./tmp/1da4ea39:
./tmp/1da4edd0:
./webpages:
WEB-INF
docs
index.html
./webpages/WEB-INF:
mappings.properties
mime.properties
servlets
servlets.properties
webapp.properties
./webpages/WEB-INF/servlets:
CPP.class
CPP.java
SnoopServlet.class
SnoopServlet.java
./webpages/docs:
api
./webpages/docs/api:
allclasses-frame.html
deprecated-list.html
help-doc.html
index-all.html
index.html
javax
overview-frame.html
overview-summary.html
overview-tree.html
package-list
packages.html
serialized-form.html
stylesheet.css
./webpages/docs/api/javax:
servlet
./webpages/docs/api/javax/servlet:
GenericServlet.html
RequestDispatcher.html
Servlet.html
ServletConfig.html
ServletContext.html
ServletException.html
ServletInputStream.html
ServletOutputStream.html
ServletRequest.html
ServletResponse.html
SingleThreadModel.html
UnavailableException.html
class-use
http
package-frame.html
package-summary.html
package-tree.html
package-use.html
./webpages/docs/api/javax/servlet/class-use:
GenericServlet.html
RequestDispatcher.html
Servlet.html
ServletConfig.html
ServletContext.html
ServletException.html
ServletInputStream.html
ServletOutputStream.html
ServletRequest.html
ServletResponse.html
SingleThreadModel.html
UnavailableException.html
./webpages/docs/api/javax/servlet/http:
Cookie.html
HttpServlet.html
HttpServletRequest.html
HttpServletResponse.html
HttpSession.html
HttpSessionBindingEvent.html
HttpSessionBindingListener.html
HttpSessionContext.html
HttpUtils.html
class-use
package-frame.html
package-summary.html
package-tree.html
package-use.html
./webpages/docs/api/javax/servlet/http/class-use:
Cookie.html
HttpServlet.html
HttpServletRequest.html
HttpServletResponse.html
HttpSession.html
HttpSessionBindingEvent.html
HttpSessionBindingListener.html
HttpSessionContext.html
HttpUtils.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html