Loading ...
Sorry, an error occurred while loading the content.

Servlet don't compile

Expand Messages
  • khusta_2000
    Hi all, I have been mostly using Gel to develop swing applications without any problems. And a few days ago I tried to focus on servlet but the IDE was
    Message 1 of 2 , Jul 19, 2004
    • 0 Attachment
      Hi all,


      I have been mostly using Gel to develop swing applications without
      any problems. And a few days ago I tried to focus on servlet but the
      IDE was complaining about all the syntax I was using.
      This includes everything on the following code;
      ------------------------------------------------------
      import java.io.*;
      import javax.servlet.*;
      import javax.servlet.http.*;



      public class ServletTemplate extends HttpServlet {
      public void doGet(HttpServletRequest request,
      HttpServletResponse response)
      throws ServletException, IOException {

      PrintWriter out = response.getWriter();
      //....
      }
      }
      ---------------------------------------------------------

      The IDE complains about the following:
      HttpServelet
      HttpServletRequest
      HttpServletResponse

      I created the file as one would do for a *.java file...

      I there something I am doing wrong or missing?

      Please Help,
      Yours...
    • Amish Shah
      Hi, Please checkout the following. Seems you have only configured the JDK. javax.servlet package is not part of JDK u need J2EE. Option 1: Add the servlet.jar
      Message 2 of 2 , Jul 19, 2004
      • 0 Attachment
        Hi,

        Please checkout the following.

        Seems you have only configured the JDK.
        javax.servlet package is not part of JDK u need J2EE.

        Option 1:
        Add the servlet.jar file to your classpath. If you
        dont have servlet.jar foloow option 2.

        Option 2:
        You can download Tomcat from
        http://jakarta.apache.org/ v4 or v5 as per your need.

        Install the tomcat.

        Goto Project properties -> Run -> Slect Auto Tomcat
        specifying the Tomcat directory where you have
        installed it.

        Regards,
        Amish


        --- khusta_2000 <mtyukala@...> wrote:
        > Hi all,
        >
        >
        > I have been mostly using Gel to develop swing
        > applications without
        > any problems. And a few days ago I tried to focus on
        > servlet but the
        > IDE was complaining about all the syntax I was
        > using.
        > This includes everything on the following code;
        >
        ------------------------------------------------------
        > import java.io.*;
        > import javax.servlet.*;
        > import javax.servlet.http.*;
        >
        >
        >
        > public class ServletTemplate extends HttpServlet {
        > public void doGet(HttpServletRequest request,
        > HttpServletResponse response)
        > throws ServletException, IOException {
        >
        > PrintWriter out = response.getWriter();
        > //....
        > }
        > }
        >
        ---------------------------------------------------------
        >
        > The IDE complains about the following:
        > HttpServelet
        > HttpServletRequest
        > HttpServletResponse
        >
        > I created the file as one would do for a *.java
        > file...
        >
        > I there something I am doing wrong or missing?
        >
        > Please Help,
        > Yours...
        >
        >
        >
        >


        =====
        ____________________________________
        Regards
        Amish Shah (B.E. Computer)
        Ph : +919820893839
        ____________________________________



        __________________________________
        Do you Yahoo!?
        Yahoo! Mail Address AutoComplete - You start. We finish.
        http://promotions.yahoo.com/new_mail
      Your message has been successfully submitted and would be delivered to recipients shortly.