
hello sir/mam i hve installed tomcat5.5 version and also have jdk1.6.0_14 installed but not able to run it or compile i m doing it first tyme pls help me in sorting out this problem. i hve seen rose india tips but not getting it pls help me

Put servlet-api.jar inside the lib folder of apache tomcat. 1)create a servlet.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet{
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException,IOException{
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
pw.println("<html>");
pw.println("<head><title>Hello World</title></title>");
pw.println("<body>");
pw.println("<h1>Hello World</h1>");
pw.println("</body></html>");
}
}
2)Go to the webapps folder of your apache tomcat and create a web application folder but it should having an appropriate name like examples.
3)Create web.xml and classes folder inside the WEB_INF folder of web application folder.
4)Copy the servlet to the classes folder.
5)Edit the web.xml to include servlet?s name and url pattern.
<servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/HelloWorld</url-pattern> </servlet-mapping>
6)Compile your servlet.
7)Run Tomcat server by clicking the startup.bat file. This is located inside the bin folder of apache tomcat.
8)Open the browser and type the following url:
http://localhost:8080/webapplicationfolder_name/HelloWorld
For more information, please go through the following links:
http://www.roseindia.net/servlets/introductiontoconfigrationservlet.shtml

1)Normal command prompt programin
javac -classpath ".; D:\xampp\tomcat\lib\servlet-api.jar"
D is my driver path can you install to other driver
2) another is easy to compiling system, it using programmer notepad (this system can using for java compiling)
Download for this link (open and free)
following this step
1) Open PP
2) Tool -> option -> select tool tab
3) Select language java to upper tab
4) Selecting add button
5) Filling form
6) Name :- Servelt
Command:- E:\Program Files\java\jdk1.6.0_25\bin\javac.exe // JDK javac path
Folder :- C:\java // your using or file folder
Parameter :- %f -classpath ".;D:\xampp\tomcat\lib\servlet-api.jar"
// this copy and paste and changing a driver Ex:- D
Shortcut:- F12 // selecting you lick button
Save:- current file // or you lick
After Ok 1 view -> output or press F8 Ok finish Coding after press F12
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.