Results 1 to 3 of 3
Thread: javax.servet.* does not exist
- 09-18-2010, 06:08 AM #1
Member
- Join Date
- Sep 2010
- Posts
- 1
- Rep Power
- 0
javax.servet.* does not exist
following is the tomcat folder
E:\java tools\apache-tomcat-6.0.29-windows-x86\apache-tomcat-6.0.2900
http:/localhost:8080 - shows tomcat default page(after running bin\startup.bat)
but I cannot compile the followin code - javax.servlet does not exist
import java.io.*;
import java.servlet.*;
import javax.servlet.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<head>");
out.println("<title>Hello World!</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Hello World!</h1>");
out.println("</body>");
out.println("</html>");
}
}
what went wrong - java programs working from my system
- 09-18-2010, 03:48 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
You need to include the servlet.jar in your compilation path.
- 09-20-2010, 10:18 PM #3
Member
- Join Date
- Mar 2010
- Location
- Hilton Head, SC
- Posts
- 34
- Rep Power
- 0
Similar Threads
-
package javax.servlet does not exist :>
By wildheart25c in forum Java ServletReplies: 2Last Post: 02-17-2010, 12:02 AM -
HttpClientLibrary does not exist
By gbose in forum NetworkingReplies: 1Last Post: 02-03-2010, 07:21 PM -
javax.microedition.io/ javax.bluetooth
By ahtiven in forum New To JavaReplies: 3Last Post: 01-13-2009, 02:54 PM -
package javax.servlet does not exist
By nikhil2jan in forum Java ServletReplies: 1Last Post: 01-04-2009, 04:32 PM -
How to call method in servet by using JSP?
By frankjava1 in forum Java ServletReplies: 2Last Post: 10-24-2008, 04:20 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks