-
Servlet runner
Hi,
I am trying to run my servlets using the servletrunner that came with Jsdk2.0 but when I am accessing using the browser, I am unalbe to access them and a message 404 NOt found is displayed in the browser.
Before running servlets I was able to compile them.
set the classpath to include jsdk2.0\lib\jdsk.jar
and started the servlet runner from the Dos prompt
Servlet runner strarted with the default setting on port 8080
I tried all the options that come with this utility but it did not solved my problem. Can anybody help me out.
Thanks in advance
Amani
-
I barely remember using this app. But I do recall that JRun requires the files to be in a specific directory. Are your servlets in the correct directory?
-
Sorry, I could not logon....anyway...How would I know if my servlets are in the correct directory??????????? Anyone out there????????????
-
Yup, they are supposed to be off of the "servlet" directory. Perhaps I was remembering "servlet runner" instead of JRun (but it could be the same). Maybe this is what you need.
http://developer.java.sun.com/develo...k/servlet.html
Also, I vaguely remember, but it does look like you must include the port 8080 in the url notation to call the servlet named "SnoopServlet" as in
http://yourmachine:8080/servlet/SnoopServlet
This is not the same as
http://yourmachine/servlet/SnoopServlet
which actually would be the same as
http://yourmachine:80/servlet/SnoopServlet
The normal url invocation:
http://vbforums.com
is equivalent to
http://vbforums.com:80
since public web servers usually use port 80. The servlet server is on port 8080, so the default invocation is incorrect.
Also, see if starting "servlet runner" tells you where servlets should be through "servlet dir = ./examples". This could just be for the debug example, but perhaps you might see something like "servlet dir = /servlet".