This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes new to servlets, need help ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "new to servlets, need help !" Watch "new to servlets, need help !" New topic

new to servlets, need help !

Kapil Sakhuja
Ranch Hand

Joined: May 09, 2001
Posts: 34
i am new to Servlets and i have made a very simple servlet as follows :

import javax.servlet.*;
class serv extends GenericServlet
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
PrintWriter pw = response.getWriter();
pw.println("<B> this is servlet speaking </B>");
After compiling the above code as given in a book i saved the
'class file' in 'c:\jsdk2.0\examples' and started the 'servletrunner' but when i try to access it through InternetExplorer, i get the message 'page not found'. On the DOS prompt also, where the 'servletrunner' is running, i get message that the servlet could not be found.If it is related to properties file, kindly explain.
plzzzzzzzzz help !!!
Dharmesh Chheda
Ranch Hand

Joined: May 08, 2001
Posts: 204
i am replying but me never used servletrunner still you can try
if you have stored your class file TrialServlet.class in any directory let us assume c:\abcd\efgh then you have to start the servlet runner by entering
servletrunner -d c:\abcd\efgh
and then in the browser give the url

IBM Certified WebSphere Application Server V3.5 Specialist

regards,<br />Dharmesh Chheda
I agree. Here's the link:
subject: new to servlets, need help !
Similar Threads
Getting Error Message from Server
Error 404: File not found: loadservlet
problem with compiling servlets
Loosing my first job bcz of Servlets.....
servlet not found