Javax.servlet.* and javax.servlet.http.* don't exist???????
When I compile a class that hase the following import statements:
import javax.servlet.*;
import javax.servlet.http.*;
the compiler says that those packages don't exist, but I'm pretty sure that the do.
Does anybody knows what I could do wrong?
Nico
I am having the same problem. I have downloaded both jdk1.3.1_02 and j2sdkee1.3.1. I updated both my Path and CLASSPATH variables to include the path to the jdk1.3.1_02 bin, lib, and jre directories ... as well as the j2sdkee1.3.1 bin and lib directories. Isn't the javax.servlet package included with the j2sdkee installation? I had this working on a different machine a while back, and I'm almost certain these are the only downloads I had.
Joan Caya
Similar Messages
-
Why I got package javax.servlet.http do not exist
I have package javax.servlet.http do not exist problem, can anyone tell me why?
Thank youHi all
Thank you for all kinds of replies. It is Windows problems. but I got a new questions here
1) it seems I don't need to including
install_dir\common\lib\jsp-api.jar in classpath!!
2) when I try servletUtilities,
from http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Configure-Tomcat
I got error
HelloServlet3.java:23: cannot resolve symbol
symbol : variable ServletUtilities
location: class coreservlets.HelloServlet3
out.println(ServletUtilities.headWithTitle(title) +
^
1 error
both my HelloServlet3 and servletUtilities under
WEB-INF\classes\coreservlets
thank you -
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:
paulchwdThe library is in tomcat/common/lib, not in tomcat/lib.
-
Package javax.servlet.http does not exists
Hi,
I am new to J2EE and am writing my first servlet. I tried to compile a servlet I wrote and got the following error.
"package javax.servlet.http does not exists".
What do i do to correct this error?
Also is there any links which has a complete servlet tutorial.
Please advice
ThanxMost probably you need to include the servlet-api library in your classpath when compiling.
You should find this file in the lib directory of your container.
It will be called servlet-api.jar (Tomcat) or j2ee.jar (Suns J2EE server) or something along those lines.
The j2ee tutorial is a decent place to start learning about servlets...
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
Good luck,
evnafets -
Package javax.servlet.http does not exist & package javax.servlet does not
Hello!
I am trying to compile this file:
/* serv2.java 29 Sep 04 */
import java.util.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class serv2 extends HttpServlet
protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<HTML><HEAD><TITLE>Sample Servlet</TITLE></HEAD>"+'\n'+
"<BODY BGCOLOR='lightgreen'>"+'\n'+
"<H1 ALIGN=CENTER>Heading</H1>" + '\n' +
"<P><H2 ALIGN=CENTER>Message</H2");
out.println("</BODY></HTML>");
}And I am getting this error message:
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:4: package javax.servlet does not exist
import javax.servlet.*;
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:5: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:7: cannot resolve symbol
symbol : class HttpServlet
location: class serv2
public class serv2 extends HttpServlet
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:9: cannot resolve symbol
symbol : class HttpServletRequest
location: class serv2
protected void doPost(HttpServletRequest req, HttpServletResponse res)
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:9: cannot resolve symbol
symbol : class HttpServletResponse
location: class serv2
protected void doPost(HttpServletRequest req, HttpServletResponse res)
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:10: cannot resolve symbol
symbol : class ServletException
location: class serv2
throws ServletException, IOException
^
6 errors
Tool completed with exit code 1
I have tried setting CLASSPATH lib/servlet.jar but it still will not work.
Please help me!!!Please check this page,
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
and also
serv2 -> set it to Serv2
another nice to read :-)
http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
+"Class names should be nouns, in mixed case with the first letter of each internal word capitalized"+
Another thing,
Put your class in a package, thanks =)
regards and goodluck,
jie -
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 -
Cannot Import javax.servlet.* and javax.servlet.http.*
Hello,
I am a University Student and now doing a project using Servlet and JSP
I have installed WinXP and Tomcat 5.0 on my computer
When I compile the servlet , there are error messages "package javax.servlet does not exist" and "package javax.servlet.http does not exist" coming out.
I have set the classpath already
i.e. %CATALINA_HOME%\common\lib\servlet-api.jar;%CATALINA_HOME%\common\lib\jsp-api.jar
( Of course "%CATALINA_HOME%" = my folder that install the Tomcat )
Can Anybody Explain what is happening and suggest a solution to me?
Please give a hand.When you ran that command, what happened? Let javac.exe tell you the right answer.
I'd advise two things:
(1) Installing any s'ware in a directory whose name contains spaces (e.g., "Apache Software Foundation" or "Tomcat 5.0") is a very bad idea, IMO. I'd reinstall to a new directory.
(2) Your HelloServlet.java servlet probably doesn't have a package statement in it. Tomcat 5.0 won't play nicely with servlets or beans that aren't in packages. I'd add one and use the -d . option on javac.exe to make sure it created the package directory structure for me. -
Package javax.servlet does not exist, package javax.servlet.http does not
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
I tried locating these packages, but in vain. I also tried setting the CLASSPATH to many values, still it did not work.
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
Thank you very much.davidgoodman wrote:
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
What servlet/JSP engine do you plan to deploy to? Tomcat, perhaps?I think it's Tomcat (C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14). Are there other engines that come with NetBeans IDE 6.0 (when I downloaded NetBeans, I chose ALL)
>
If so, you'll need to put the servlet JAR in your CLASSPATH. (servlet-api.jar for Tomcat 5.5 and earlier, servlet.jar for 6.0 >and later.)
I tried locating these packages, but in vain.
You won't find them until you realize that you have to deploy that servlet someplace.How to deploy?
I also tried setting the CLASSPATH to many values, still it did not work.
See above. What were you planning to set CLASSPATH to?First I set to:
C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\lib (because I found jar named servlet-api.jar in this folder)
Later I added this:
C:\Program Files\Java\jdk1.6.0_04\lib (out of trial-and-fail)
Finally I added some paths that lead to a library such as
C:\Program Files\glassfish-v2\lib
C:\Program Files\glassfish-v2\lib\ant\lib
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
You have to get a servlet/JSP engine. Step 1.Thank you for your help -
Javax.servlet.http.* error
I am trying to compile a file, but got the error message "package javax.servlet.http does not exist",
"import javax.servlet.http.*"
It seems to me that this particular package is missing. how and where exactlly do I get this particular package and make it to work??
thanksAs you are using the package I assume that you're targetting a servlet engine (such as Tomcat) or a J2EE server. The package is in servlet.jar which is part of the binary release of the container that you are using.
You can download containers from the following links:
http://java.sun.com/products/servlet/index.html
http://jakarta.apache.org/tomcat/index.html -
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 meTry giving servlet..jar path in the class path variable
-
Problems Compiling javax.servlet and javax.servlet.http
When I try to compile a program that imports both javax.servlet and javax.servlet.http, the compiler keeps telling me that "package javax.servlet does not exist"... I have place the javax.servlet packages in the src.zip and in the src folder but i dont understand why the compiler isnt picking them up. Maybe I did something wrong ... could someone help please
Try to compile vith the option "-classpath /your/path/to/servlet.jar"
-
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 -
How to import javax.servlet.http.*
Dear all,
I'm trying to create an applet that writes (and later reads) a cookie from the clients local HDD. The first thing I run into is that I'm unable to import the nessecary class, which would be, I think, "javax.servlet.http.cookie". I'm using JBuilder 8.0 and every time I'm typing "import javax.servlet"
I get the message "cannot acces the directory "javax.servlet".
How should I troubleshoot this problem?
Regards RonaldDear Myself,
I solved the trouble. What I have done is I downloaded the enterprise 1.4 SDK and added the j2ee.jar to the JBuilder 8.0 JDK directories.
Problem solved.
Yippie....
Bye. -
I am running ATG[10.1.2] app on Jboss [EAP 5.1.0 GA] I am able to open dyn/admin however when I start my app I get the below error
java.lang.LinkageError: loader constraint violation: when resolving method "atg.servlet.ServletUtil.setSessionConfNumCacheRequest(Ljavax/servlet/http/HttpServletRequest;)Ljavax/servlet/http/HttpServletRequest;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, atg/filter/dspjsp/PageFilter, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, atg/servlet/ServletUtil, have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature
at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:215)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at atg.servlet.ForwardFilter.doFilter(ForwardFilter.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at atg.servlet.ErrorFilter.doFilter(ErrorFilter.java:279)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:446)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:680)
11:22:47,413 ERROR [[localhost]] Exception Processing ErrorPage[errorCode=500, location=/global/errorPage500.jsp]The supported JBoss version for 10.1.2 is JBoss EAP 5.1.2 but I don't think that your issue is caused because of this. Your issue is more of an environmental thing as you are probably getting two different versions getting loaded of class javax.servlet.http.HttpServletRequest and so correspondingly two different Class objects as the error shows. One reason for this could be if you include any server-specific libraries (in present case the Servlet API JAR which contains the class javax.servlet.http.HttpServletRequest) of a different version in the /WEB-INF/lib of your web application. Try removing it from there if so and see if that helps.
-
SAPNoClassDefFoundError: javax.servlet.http.HttpSessionListener
Hi,
I have deployed an application in to Netweaver WAS, and have given a hard reference to one of the libraries which is already deployed in the same server. But when starting the application, it gives an error telling that <b><i>javax.servlet.http.HttpSessionListener</i></b> is not available. I gave the servlet.jar in the classpath and still its giving the same error.
Can anyone tell me what can i do to get rid of this problem? This is the error message iam getting in the defaulttrace file:
<b><i>The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: javax.servlet.http.HttpSessionListener</i></b>Hi Venkat
Check in the visual admin-deploy service,whether or not your application is deployed.Try to start it.
Also check out the below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/1b/92e4e701b242c2833a7adde6ecad09/frameset.htm
Message was edited by:
Rajat Anand
Message was edited by:
Rajat Anand
Maybe you are looking for
-
Error when trying to install Adobe Acrobat Pro, recently purchased.
Recently purchased Adobe Acrobat Pro, when trying to install get an error message 'Your account subscription cannot be validated'. Have tried several times, double checked login etc, but same message each time. Please help, how to fix this issue??
-
Using credentials with a web service -- what our my options?
Hi All, I'm trying to determine what options I have in regards to setting credential requirements on my web services. The two options seem to be: -Basic authentication -SOAP header authentication. I see that the WebService class has a "setCredentials
-
Hi, I've just noticed that the hard drive on my iMac has lost hundreds of GB of space in a few days. I used "WhatSize" to find out there is 336 GB in a file called xxxxiDisk.sparsebundle/bands which is in the Library of my Home folder. How do I get t
-
Hi All, can any one tell me how to set up our own companies default logo in sap ecc6.0 Thanks vijay
-
Slow mac after importing photo library
Hi, I have a macbook pro 2,9ghz intel core i7, 8gb ram, 1 tb harddrive (219gb free). I recently imported my old photo library, wich is quite big and now it seems my mac is slowing down... The library was kind of messy and i had some trouble organizin