Tomcat 5 can�t find javax.servlet.http.HttpServlet

Hi.
I don�t know if this is a simple question or not, but i didn�t find anything solving this problem and
i�m new to tomcat......
I�m trying to deploy my web application in my system. (Windows XP , j2sdk1.4.2_02, jakarta Tomcat 5, jakarta struts 1.1 and jakarta taglibs 1.1).No problems while compiling the .java classes and checked all the .jar files that my application needs to work (or that is what I think). I expand my .war file at /webapps on tomcat directory and startup Tomcat. Tomcat starts up but while starting I get the following errors...
17-feb-2004 17:58:50 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
17-feb-2004 17:58:51 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4948 ms
17-feb-2004 17:58:51 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
17-feb-2004 17:58:51 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.18
17-feb-2004 17:58:51 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
17-feb-2004 17:58:51 org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
17-feb-2004 17:58:51 org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\softProyecto\Tomcat5\conf\Catalina\localhost\admin.xml
17-feb-2004 17:58:55 org.apache.commons.digester.Digester endElement
GRAVE: End event threw exception
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
     at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
     at org.apache.commons.digester.Rule.end(Rule.java:276)
     at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
     at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:123)
     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
     at org.apache.commons.digester.Digester.parse(Digester.java:1567)
     at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:520)
     at org.apache.catalina.core.StandardHost.install(StandardHost.java:906)
     at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:527)
     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
     at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
     at org.apache.catalina.core.StandardService.start(StandardService.java:519)
     at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
     at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
     at java.lang.ClassLoader.defineClass0(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
it seems like C:\softProyecto\Tomcat5\conf\Catalina\localhost\admin.xml (C:\softproyecto\tomcat5 = tomcat�s home directory) needs javax.servlet.http.HttpServlet. And that comes from a Tomcat .jar file, i think.
After more and more messages..... here it comes my application (MapasRuido)...which needs javax.servlet.http.HttpServlet and compiled ok at compiling time!
INFO: Installing web application at context path /MapasRuido from URL file:C:\softProyecto\Tomcat5\webapps\MapasRuido
17-feb-2004 18:02:48 org.apache.catalina.startup.HostConfig deployDirectories
GRAVE: Error durante el despliegue del directorio MapasRuido de la aplicaci�n web
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
     at java.lang.ClassLoader.defineClass0(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1296)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
     at java.lang.ClassLoader.defineClass0(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1677)
     at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:900)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1350)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
     at java.lang.ClassLoader.defineClass0(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1677)
     at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:900)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1350)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
     at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:979)
     at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
     at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3960)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4283)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
     at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
     at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
     at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
     at org.apache.catalina.core.StandardService.start(StandardService.java:519)
     at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
     at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
17-feb-2004 18:02:48 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path from URL file:C:\softProyecto\Tomcat5\webapps\ROOT
17-feb-2004 18:02:48 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL file:C:\softProyecto\Tomcat5\webapps\servlets-examples
17-feb-2004 18:02:48 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /tomcat-docs from URL file:C:\softProyecto\Tomcat5\webapps\tomcat-docs
17-feb-2004 18:02:49 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
tomcat�s web applications servlets-examples and tomcat-docs work fine, but my application doesn�t. Is there any relation between those errors? any idea about what happens?
Thank you in advance.

"...The CLASSPATH is ignored by Tomcat, of course. AND javac. AND java. AND Eclipse. AND NetBeans. AND JBuilder. And just about everything else in the Java universe..."
What I mean by this, of course, is that each of these requires you to set the CLASSPATH in the way they expect. None of them even looks for a system environment variable named CLASSPATH. You can waste a lot of time thinking that your CLASSPATH is "all set", but it's not.
Tomcat assumes the following for your Web app's CLASSPATH:
(0) The JDK rt.jar, of course,
(1) All the JARs in TOMCAT_HOME/common/lib,
(2) All the JARs in your WEB-INF/lib,
(3) All the .class files in your WEB-INF/classes
That's it. (Maybe one or two others, but those are the important ones.)
Eclipse and NetBeans have their own way to set CLASSPATH for each project. You'll have to learn how for those IDEs.
The CLASSPATH is still vitally important. The system environment variable just isn't part of it. - MOD

Similar Messages

  • Where can i find javax.servlet.http.httpServletRequest in weblogic jars

    Hi,
    i'm migrating from weblogic 8 to weblogic 10.3.
    in my java codes, i use import javax.servlet.http.httpServletRequest. Previously this package can in found in weblogic.jar in weblogic 8.
    However weblogic.jar for 10.3 does not have this package. Where can i find this package?
    Thanks

    oh i see. the api.jar has the indicate the path to the servlet package.
    /modules/javax.servlet_1.0.0.0-2-5.jar.
    Thanks for the guidance.:)

  • Service method in javax.servlet.http.HttpServlet

    Hi All,
    I have a doubt in the service method of javax.servlet.http.HttpServlet
    There are two service methods in the javax.servlet.http.HttpServlet.
    one is with protected and other is with public access specifier.
    In the javadoc it is said that public service method dispatches client requests to the protected service method.
    Why this type of design is required.
    Instead of having a two service methods, Is it not possible to have a single service method and attain the functionality intended.
    Are there any advantages by having two service methods.
    I think there may be some idea/functionality behind these for having two service methods , which I am not able to understand.
    Would be greatful , if someone can throw light on this .
    Thanks,
    Dhanasekaran.

    This is just a theory, but here goes:
    The public service() method takes arguments of ServletRequest and ServletResponse, presumably because that's the signature that the non-HTTP specific servlet engine requires.
    The protected service() method of HttpServlet takes arguments of HttpServletRequest and HttpServletResponse and includes HTTP specific functions.
    My guess is that the public service() method either casts the arguments to the Http objects or does work to create the Http objects before calling the protected method.

  • Why javax.servlet.http.HttpServlet is serializable ?

    As per serialization definition if super class implements java.io.Serializable then all sub classes are also get that behaviour.
    while coming to Servlets : javax.servlet.GenericServlet implents java.io.Serializable and this servlet class is super class for javax.servlet.http.HttpServlet and this also implemts java.io.Serializable. Is there any specific reason ?

    Quoting a reply from the link below:
    >
    Technically, I believe the servlet container is allowed to "passivate" the servlet object to disk, in a similar way that EJB session beans can be. So you're correct to ask the question if your app will fail due to non-serializable fields.
    In practise, I've never heard of a container doing this, so it's really just legacy baggage from the bad old days of early J2EE. I wouldn't worry about it.
    >
    [http://stackoverflow.com/questions/179743/why-does-httpservlet-implement-serializable]

  • How solve  import javax.servlet.http.HttpServlet err import javax.servlet.

    Hi
    I am trying to compile one servlet code using commancd prompt and i get
    package javax.servlet.http does not exist import javax.servlet.http.HttpServlet;
    error for following code
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    public class SampleServlet extends HttpServlet
    public void saveToSession(HttpServletRequest request)
         String testparam = request.getParameter("testparam");
         request.getSession().setAttribute("testAttribute", testparam);
    please help me

    Try giving servlet..jar path in the class path variable

  • Tomcat can't find the servlets!

    Hi!
    I've just installed tomcat tomcat-5.5.16 with apache. Tomcat runs ok. It shows some samples (delivered with tomcat) under www.mywebsite.com/servlets-example and also www.mywebsite.com/jsp-examples. JSP files work perfectly, but when I try the servlets it can't find them:
    www.mywebsite.com/servlets-examples/servlet/RequestHeaderExample Object not found!my classpath lokks like this:
    /opt/SUNWappserver/jdk/lib:/opt/apache-tomcat/common/lib/servlet-api.jar:/opt/apache-tomcat/bin:/opt/apache-tomcat/webapps/servlets-examples/WEB-INF/classes:/opt/apache-tomcat/webapps/ROOT/WEB-INF/classesand web.xml looks like this:
        <servlet>
            <servlet-name>invoker</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.InvokerServlet
            </servlet-class>
            <init-param>
                <param-name>debug</param-name>
                <param-value>0</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
        </servlet>and
        <!-- The mapping for the default servlet -->
        <servlet-mapping>
            <servlet-name>default</servlet-name>
            <url-pattern>/</url-pattern>
        </servlet-mapping>
        <!-- The mapping for the invoker servlet -->
        <servlet-mapping>
            <servlet-name>invoker</servlet-name>
            <url-pattern>/servlet/*</url-pattern>
        </servlet-mapping>I changed the web.xml und conf and under WEB-INF.
    I also changed server.xml to make tomcat work with apache on port 80.
    What did I do wrong? What did I forget?
    What is the difference between web.xml under conf and the ones under WEB-INF?
    Thanks for any help.

    opt/SUNWappserver/jdk/lib:/opt/apache-tomcat/common/lib/servlet-api.jar:/opt/apache-tomcat/bin:/opt/apache-tomcat/webapps/servlets-examples/WEB-INF/classes:/opt/apache-tomcat/webapps/ROOT/WEB-INF/classes
    May be ur classpath will be wrong try the classpath like this
    ;C:\Tomcat5\common\lib\servlet-api.jar;C:\Tomcat5\common\lib\jsp-api.jar;C:\Tomcat5\common\lib\log4j-1.2.9.jar;C:\Tomcat5\common\lib\mysql-connector-java-3.1.8-bin.jar;hello
    Check out all the enteries in the web-xml file and the path in the environment variable i your system.

  • Javax.servlet.http.HttpServlet

    I'm in netbeans and I've created a new 'General Java Application' - I'm trying to import the package above but the netbeans can't find it.
    I'm guessing this is because the J2EE packages aren't included in a General Java Application - can somebody explain to me how this works? and how I can get this package imported into my project? thanks.

    Herko_ter_Horst wrote:
    The Java Standard Edition API will be available by default.
    Servlets are part of the Enterprise Edition, as you rightly assumed.
    Netbeans most likely has the ability to create a "Web Application Project" or some such. I expect such a project to include the Servlet API.this is helpful, thanks. and it's also helpful that Netbeans can provide the EE API in the case where I choose to create a web app. But what if I wasn't using an IDE and I wanted to be able to access the EE API - is there an easy way to include all the necessary libraries? is there an index somewhere that associates SE/EE/ME classes with their containing .jar files?

  • Tomcat can't find my servlets

    Whenever i try to access one of my servlets via http://localhost:8080/photodb/servlet/dtic.photodb.webapp.PhotoList, I get a 404 error. I am using Tomcat 4.1.12, but i had no troubles in 4.1.10. Does Tomcat 4.1.12 require special configuration, or could something else be the cause of this problem?
    Thanks in advance
    Ryan

    Hi,
    Tomcat 4.1.12 has a bug fix done on the InvokerServlet. The InvokerServlet is responsible for serving the servlet requests. In all the previous versions the InvokerServlet will be enabled by default. In the latest version, it is commented out. You will have to uncomment this for your servlets to be serverd. The changes needs to be done in the <tomcat_home>/conf/web.xml file.
    Uncomment the following lines
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    More details regarding the bug and the fix can be found at the following url
    http://online.securityfocus.com/archive/1/292936/2002-09-21/2002-09-27/0
    Thanks
    Shanmugam.PL
    Whenever i try to access one of my servlets via
    http://localhost:8080/photodb/servlet/dtic.photodb.weba
    p.PhotoList, I get a 404 error. I am using Tomcat
    4.1.12, but i had no troubles in 4.1.10. Does Tomcat
    4.1.12 require special configuration, or could
    something else be the cause of this problem?
    Thanks in advance
    Ryan

  • Tomcat Can't Find Bean

    Hello-
    I am trying to use JSP to call a bean and it keeps telling me that it could not compile because...
    "Class org.apache.jsp.DataBaseSelect not found."
    All my files are located in the webapps/ROOT under my own directory called "project".
    DataBaseSelect is the name of my class file. This class file is located in the following directory...
    jakarta-tomcat-4.0.1/webapps/ROOT/project/WEB-INF/classes/DataBaseSelect.class
    My JSP page is located here...
    jakarta-tomcat-4.0.1/webapps/ROOT/project/test.jsp and it calls the bean by using this statement...
    <jsp:useBean id="select" class="DataBaseSelect" scope="request">
    </jsp:useBean>
    Do I need to do something to the WEB-INF/web.xml file to tell it about my bean? Do I need to make my bean part of a package somehow? Why does the compiler think my bean is part of "org.apache.jsp"?
    Note: I have gotten a straight JSP (no bean) page to work in this same directory.
    Please help and thanks for the effort...
    Zac

    I took the advice of both posts above and have made some progress... Now it seems Tomcat can find my bean but I am getting this error...
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Cannot create bean of class DataBaseSelect
         at org.apache.jsp.test$jsp._jspService(test$jsp.java:78)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Thread.java:484)
    root cause
    java.lang.ClassCastException: DataBaseSelect
         at org.apache.jsp.test$jsp._jspService(test$jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Thread.java:484)

  • ClassCastException: javax.servlet.http.NoBodyOutputStream

    Can anyone tell me what is going on with the following ? Runing WL 6.1 SP2.
              We are getting a fair number of these.
              ####<Mar 27, 2003 6:04:50 PM CST> <Error> <HTTP> <vusdfwdevbld2>
              <VSWA420B91Server> <ExecuteThread: '66' for queue: 'default'> <admin> <>
              <101020> <[WebAppServletContext(1229058,vissys-web,/vissys-web)] Servlet
              failed with Exception>
              java.lang.ClassCastException: javax.servlet.http.NoBodyOutputStream
              at
              weblogic.servlet.ClasspathServlet.sendResource(ClasspathServlet.java:229)
              at weblogic.servlet.ClasspathServlet.doGet(ClasspathServlet.java:94)
              at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:313)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:757)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :265)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :200)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:2495)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :2204)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    Can anyone tell me what is going on with the following ? Runing WL 6.1 SP2.
              We are getting a fair number of these.
              ####<Mar 27, 2003 6:04:50 PM CST> <Error> <HTTP> <vusdfwdevbld2>
              <VSWA420B91Server> <ExecuteThread: '66' for queue: 'default'> <admin> <>
              <101020> <[WebAppServletContext(1229058,vissys-web,/vissys-web)] Servlet
              failed with Exception>
              java.lang.ClassCastException: javax.servlet.http.NoBodyOutputStream
              at
              weblogic.servlet.ClasspathServlet.sendResource(ClasspathServlet.java:229)
              at weblogic.servlet.ClasspathServlet.doGet(ClasspathServlet.java:94)
              at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:313)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:757)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :265)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :200)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:2495)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :2204)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

  • ClassCastException: javax.servlet.http.NoBodyResponse

    Hi all,
    I Have an EAR containing a web application containing a bunch of servlets and an applet accessed through jnlp. When I start the applet, everything works perfectly well, all the functionnalities work. But in my log file, I get about 4 exceptions (always the same) and sometime later on (using the applet) I get one or two more. I know some people on the net had the same problem in various situations but I never found replies to their posts in the archives.
    So it runs on sun JSAS 9.0, Windows XP64.
    This is the exceptionx I get in the server log just when webstart starts:
    (sorry, it is long and ugly in this small text box).
    --> The "com.zerobase..." line is just because I override service() and call super() there.
    java.lang.ClassCastException: javax.servlet.http.NoBodyResponse
         at org.apache.catalina.core.ApplicationDispatcherForward.getStatus(ApplicationDispatcherForward.java:335)
         at org.apache.catalina.core.ApplicationDispatcherForward.commit(ApplicationDispatcherForward.java:79)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
         at com.zerobase.chaplin.action.PostActionServlet.processActionForward(PostActionServlet.java:692)
         at com.zerobase.chaplin.action.PostActionServlet.process(PostActionServlet.java:336)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
         at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:281)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:724)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at com.zerobase.chaplin.action.PostActionServlet.service(PostActionServlet.java:114)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)

    Thanks for reporting this issue!
    I've filed a GlassFish issue at
    https://glassfish.dev.java.net/issues/show_bug.cgi?id=2210
    Please add yourself to the issue's "cc" list, so you'll get notified of any progress.
    Jan

  • Weblogic 4.5.1 intermittent exception java.lang.ClassCastException: javax.servlet.http.NoBodyOutputStream

    When running weblogic 4.5.1 on our staging server we get the following
    exceptions happening intermitently
    Our other servers have identical code and properties files and they are fine
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <ServletContext-Servlets> Servlet
    failed with RuntimeException
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <ServletContext-Servlets>
    java.lang.ClassCastException: javax.servlet.http.NoBodyOutputStream
    at weblogic.servlet.FileServlet.sendFile(Compiled Code)
    at weblogic.servlet.FileServlet.doGet(Compiled Code)
    at javax.servlet.http.HttpServlet.doHead(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <HTTP> Servlet request terminated
    with IOException:
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <HTTP> java.net.ProtocolException:
    Exceeded stated content-length of: 1230 bytes
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.io.IOException.<init>(Compiled Code)
    at java.net.ProtocolException.<init>(Compiled Code)
    at weblogic.servlet.internal.ServletOutputStreamImpl.print(Compiled Code)
    at javax.servlet.ServletOutputStream.println(ServletOutputStream.java:252)
    at
    weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.
    java:307)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(Compiled Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    Any ideas ?

    When running weblogic 4.5.1 on our staging server we get the following
    exceptions happening intermitently
    Our other servers have identical code and properties files and they are fine
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <ServletContext-Servlets> Servlet
    failed with RuntimeException
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <ServletContext-Servlets>
    java.lang.ClassCastException: javax.servlet.http.NoBodyOutputStream
    at weblogic.servlet.FileServlet.sendFile(Compiled Code)
    at weblogic.servlet.FileServlet.doGet(Compiled Code)
    at javax.servlet.http.HttpServlet.doHead(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <HTTP> Servlet request terminated
    with IOException:
    Tue Jul 11 12:03:53 GMT+01:00 2000:<E> <HTTP> java.net.ProtocolException:
    Exceeded stated content-length of: 1230 bytes
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.io.IOException.<init>(Compiled Code)
    at java.net.ProtocolException.<init>(Compiled Code)
    at weblogic.servlet.internal.ServletOutputStreamImpl.print(Compiled Code)
    at javax.servlet.ServletOutputStream.println(ServletOutputStream.java:252)
    at
    weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.
    java:307)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(Compiled Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    Any ideas ?

  • Cannot find javax.servlet package

    I have just downloaded and installed the latest JEE SDK having installed Tomcat on a Linux box so that I can start getting to know JSP.
    I am following an example in a book I have for this Servlet...
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.IOException;
    public class BasicServlet extends HttpServlet {
         public void doGet (HttpServletRequest req, HttpServletResponse res)
              throws IOException {
              ServletOutputStream out = res.getOutputStream();
              res.setContentType("text/html");
              out.println("<html><head><title>Basic Servlet</title></head>");
              out.println("<body>Hello World</body></html>");
    I am using Textpad to write and compile my java and when I try to compile I get errors basically saying that it cannot find the first 2 packages I am trying to import (it manages to find the IOException fine)
    Any ideas why? I suspect that the servlet package is not in the classpath but I do no know where the package is in order to add it to my class path.
    many thanks

    I have just downloaded and installed the latest JEE
    SDK having installed Tomcat on a Linux box so that I
    can start getting to know JSP.
    I am following an example in a book I have for this
    Servlet...
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.IOException;
    public class BasicServlet extends HttpServlet {
    public void doGet (HttpServletRequest req,
    , HttpServletResponse res)
              throws IOException {
              ServletOutputStream out = res.getOutputStream();
              res.setContentType("text/html");
    out.println("<html><head><title>Basic
    ic Servlet</title></head>");
              out.println("<body>Hello World</body></html>");
    I am using Textpad to write and compile my java and
    when I try to compile I get errors basically saying
    that it cannot find the first 2 packages I am trying
    to import (it manages to find the IOException fine)
    Any ideas why? I suspect that the servlet package is
    not in the classpath but I do no know where the
    package is in order to add it to my class path.
    many thanksHave u included your servletapi.jar into classpath
    If u havnt . set classpath to point to servletapi.jar
    if it helps .. release dukes.
    sudhir nimavat
    http://www.jyog.com

  • Package javax.servlet.http does not exist

    Hello All,
    A few problems here
    1. My classpath doesnt seem to work.:
    .;"C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
    2. As a result, i get many errors in my simple code, but there are still a few that are not related to javac not recognizing the servlet api.
    I also tried setting the classpath at the command line (event hough its temporary)
    set classpath="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
    but the servlet package is still not recognized
    I have 2 classes, one to read the database connection details from a file and another class, my servlet.
    Servlet Code:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class CustomQuery extends HttpServlet
         public void init() throws ServletException
              EstablishDBConnetion.establishConnection();
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              response.setContentType("text/html");
              PrintWriter printer = new response.getWriter();
              String title = "Result from custom query";
              Statement stmt = EstablishDBConnetion.establishConnection.con.createStatement();
              ResultSet rs = stmt.executeQuery("select customerID from customer");
              while(rs.next())
                   printer.println("<html> <head><title>" + title + "</title><br><br><table border=\"0\"> <tr><td>" + rs.getString(1));
              rs.close();
              stmt.close();
              EstablishDBConnetion.establishConnection.con.close();
    Database connection code
    import java.io.*;
    import java.sql.*;
    import java.util.StringTokenizer;
    class EstablishDBConnetion
         public static void establishConnection()
              try
                   String dbDriver = "";
                   String dbUrl = "";
                   String dbName = "";
                   String dbUser = "";
                   String dbPassword = "";
                   String newLine = "";
                   BufferedReader fileRead = new BufferedReader(new FileReader("connection.txt"));
                   boolean readerStatus = fileRead.ready();
                   newLine = fileRead.readLine();
                   while (readerStatus)
                        StringTokenizer st = new StringTokenizer(newLine, ",");
                        while (st.hasMoreTokens())
                            dbDriver   = st.nextToken();
                           dbUrl      = st.nextToken();
                           dbName     = st.nextToken();
                            dbUser     = st.nextToken();
                            dbPassword = st.nextToken();
                        readerStatus = fileRead.ready();
                   Class.forName(dbDriver);
                   String url = dbUrl + dbName;
                   System.out.print(url);
                   Connection con = DriverManager.getConnection(url, dbUser, dbPassword);
              catch (IOException e)
                   System.out.println("IO exception in establishConnection()");
                   e.printStackTrace();
              catch (java.lang.Exception ex)
                   System.out.println("General exception in establishConnection()");
                   ex.printStackTrace();
         public static void main(String[] args)
              //EstablishDBConnetion edbc = new EstablishDBConnetion();
              establishConnection();
    }also, full error list below
    CustomQuery.java:4: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    CustomQuery.java:5: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    CustomQuery.java:7: cannot find symbol
    symbol: class HttpServlet
    public class CustomQuery extends HttpServlet
    ^
    CustomQuery.java:10: cannot find symbol
    symbol : class ServletException
    location: class CustomQuery
    public void init() throws ServletException
    ^
    CustomQuery.java:16: cannot find symbol
    symbol : class HttpServletRequest
    location: class CustomQuery
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    ^
    CustomQuery.java:16: cannot find symbol
    symbol : class HttpServletResponse
    location: class CustomQuery
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    ^
    CustomQuery.java:16: cannot find symbol
    symbol : class ServletException
    location: class CustomQuery
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    ^
    CustomQuery.java:19: package response does not exist
    PrintWriter printer = new response.getWriter();
    ^
    CustomQuery.java:24: cannot find symbol
    symbol : variable establishConnection
    location: class EstablishDBConnetion
    Statement stmt = EstablishDBConnetion.establishConnection.con.createStatement();
    ^
    CustomQuery.java:39: cannot find symbol
    symbol : variable establishConnection
    location: class EstablishDBConnetion
    EstablishDBConnetion.establishConnection.con.close();
    ^
    10 errors
    I appreciate your help
    Message was edited by:
    paulchwd
    null
    Message was edited by:
    paulchwd

    The library is in tomcat/common/lib, not in tomcat/lib.

  • Error:    package javax.servlet.http does not exist

    Hi all,
    How do I import javax.servlet?
    package com.example.web;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class BeerSelect extends HttpServlet {
      public void doPost(HttpServletRequest request,
                         HttpServletResponse response)
                         throws IOException, ServletException {
        response.setContentType("text/html");
        PrintWriter out = response.getWrite();
        out.println ("Beer Selection Advide<br>");
        String c = request.getParameter("color");
        out.println ("<br>Got beer color " + c);
    }What does this error mean? The error message:
    Compiling 1 source file to C:\Program Files\Apache Software Foundation\MyProjects\J2EE\build\classes
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:3:
    package javax.servlet does not exist
    import javax.servlet.*;
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:4:
    package javax.servlet.http does not exist
    import javax.servlet.http.*;
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:7:
    cannot find symbol
    symbol: class HttpServlet
    public class BeerSelect extends HttpServlet {
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:8:
    cannot find symbol
    symbol  : class HttpServletRequest
    location: class com.example.web.BeerSelect
      public void doPost(HttpServletRequest request,
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:9:
    cannot find symbol
    symbol  : class HttpServletResponse
    location: class com.example.web.BeerSelect
                         HttpServletResponse response)
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:10:
    cannot find symbol
    symbol  : class ServletException
    location: class com.example.web.BeerSelect
                         throws IOException, ServletException {
    6 errors
    BUILD FAILED (total time: 0 seconds)Thank you.

    Hi,
    The file servlet-api.jar / servlet.jar is not available in your classpath.
    To compile an Servlet you need the jar file to be in classpath.
    The jar file can be found in your webserver / application server lib folder.
    Regards,
    Zack

Maybe you are looking for