Javax.servlet.*
Where can I find the jar file so I can use java.servlet.* ?
I set my CLASSPATH and JAVA_HOME variables... is there anything else i need to do? When I go to compile my code it says javax.servlet cannot be resolved.
Any help would be great, thanks!
I put the path to the jar file in my classpath and it
still doesnt work.How did you do that? If you did it correctly, the JVM will find it. If you did it incorrectly, you'll still have the error.
>
import javax.servlet.*;
import javax.servlet.http.*;
public class test extends HttpServlet {It looks like its importing javax.servlet.*; and the
other one just fine, What does "importing fine" look like?
Do you know what the "import" keyword is really doing for you. (Hint: It has nothing to do with loading classes.)
but it throws its first error at
HttpServlet saying that it cannot be resolved to a
type. You haven't added the JAR to the CLASSPATH properly then. More details, please. What container are you using? Tomcat? If so, you need to look for /common/lib/servlet-api.jar and get that into your CLASSPATH.
This has been holding me up all day.There's no way something like this should be holding you up for a day. Ask somebody in your area that knows Java and CLASSPATH.
%
Similar Messages
-
Dear all,
First of all sorry, if this is not the right place for my question.
I am facing some problem with the XFire Webservices. When i am trying to access the WSDL through the url. server is throwing the following exception :
javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
org.jdom.Namespace.getNamespace(Namespace.java:164)
org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
cont.......
I am not able to figure out the root cause for this. The service.xml file looks like below:
<?xml version="1.0" encoding="UTF-8"?>
<!-- START Service.xml -->
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<!-- Construct the castor service factory by Spring -->
<bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
<bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
<constructor-arg ref="castorTypeRegistry"/>
</bean>
<bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
<constructor-arg index="0" ref="xfire.transportManager"/>
<constructor-arg index="1" ref="bindingProvider"/>
</bean>
<service>
<name>ReleaseManager</name>
<namespace>ReleaseManager</namespace>
<serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
<implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
<schemas>
<schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
</schemas>
<style>document</style>
<serviceFactory>#castorServiceFactory</serviceFactory>
</service>
</beans>
<!-- END Service.xml-->
The issue which i am facing is it due to the problem with the service.xml (Which i dont think so..), Or is it any thing to do with the XSD file which i am using.
Can any body give me some guide lines for this ????
Thanks in advance.
Thanks and Regards,
Manjunath.Any one any thoughts..
I need to find out the solution for this as soon as possible; Not able to proceed further...
Thanks and Regards,
Manjunath. -
Javax.servlet..ServletException in jaser report in jsp page
Hi all,
In my web application i am using jasperreport 3.0. to generate reports in excel format
My Application is configured in apache-tomcat-5.5.26 in Mac Server.
I have placed the following jar files in webapps/xxxx/WEB-INF/lib.
jasperreports-3.0.0.jar,commons-digester-1.7.jar,itext-1.3.1.jar,commons-logging-1.1.jar,commons-beanutils-1.7.jar,commons-collections-3.2.jar,poi-3.0.1-FINAL-20070705.jar
The reports are generated automatically and stored inside the webappss/xxxx/Reports/ folder. And i have given link to the generated excel file dynamically in JSP page.
When i load the jsp pag, i am getting javax.servlet.servletExcetion displayed in jsp page and the following display in catalina.out file
Nov 9, 2009 12:02:01 PM org.apache.tomcat.util.http.Parameters processParameters
WARNING: Parameters: Invalid chunk ignored.
Nov 9, 2009 12:02:01 PM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.NoClassDefFoundError
at net.sf.jasperreports.engine.xml.JRAbstractStyleFactory.createObject(JRAbstractStyleFactory.java:166)
at org.apache.commons.digester.FactoryCreateRule.begin(FactoryCreateRule.java:389)
at org.apache.commons.digester.Digester.startElement(Digester.java:1361)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1647)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
at org.apache.jsp.source.admin.DateReport_jsp._jspService(DateReport_jsp.java:85)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:613)Please help me how to overcome this problem.
Thanks in advance.yes the class mentioned in the stack trace is found in the jar file placed in web-inf/lib folder. can you tel what else can be the reason for this.
-
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.
-
Javax.servlet.http.* package does not exist ?
i am using j2sdk which does not include servlets, so in the forums i found that including servlet.jar file in jdk1.6.0\jre\lib\ext javax.servlet.* was included but javax.servlet.http did not ..... now this is strange either both do not work or both work. here is the code
import javax.servlet.*;
import javax.servlet.Http.*;
class login
error is package javax.servlet.Http.*; does not exist.Dear,
javax.servlet is one of the J2EE (Java Enterprise Edition) packages that is not included in the J2SE (Java Standard Edition) , so that one used for developing server side application.
I hope this help.
Regards. -
Package javax.servlet does not exist
Trying to learn servlets. just installing software & tesing install.
What I have done:
1. read Deitel text, and written & tested applications and applets..even on my web site. surprise surprise.
2. installed J2Std Edition and did applications & applets.
3. Wanted to do servlets so downloaded and installed TOMCAT(got their index html so looks like it is at least running).
4. Took Deitel servlet pgm example and tried to compile, but got the subject msg and others concening methods i expect to be in the include.
5. After reading lots decided maybe I need to install J2EE to do servlets(I dont see where Deitel tells me I need to do this).
6. Went to SUN, downloaded and installed J2EE. Im on NT 4.0 so I set JAVA_HOME and J2EE_HOME.
7. Read topics this forum, so I found servlet.jar in my TOMCAT dir, copied it to jdk1.3.1\jre\bin and jdk1.3.1\jre\lib.
8. set CLASSPATH to one of these.
9 STILL get the error. I appreciate any help you can give. Im very new to SUN and am just blindly trying to follow what Dietel tells me to do. I love the JAVA part of the text, but the way they explain the software installs is very poor.
The jar file is listed as an executable, so I assume I dont need to do any type of unpacking like with a zip file. A puzzle to me is that the text talks about the INCLUDE stmts pointing to directory structurs/file names, but I cant find many of them.. they mmust be hidden in some other pack files I guess because all applications and applets are compiling and running just fine.
I there any documentation(at SUN or elsewhere) that kind of explains in English to the uninitiated how the different SUN products/packages work together/seperately.. when each one is necessary??
Thanks for your help [email protected]Grayman,
An application server like Tomcat needs access to a java runtime environment and all the libraries referenced from the application code that you deploy on it.
So maybe try debugging like this :
1)first check all your imports in the code
especially
import javax.servlet.*;
import javax.servlet.http.*;
2) Browse trough the tomcat documentation to see which runtime environment it is running on top of. This could be something like C:\JDK1.2\.. but could be also be C:\program files\java\JDK1.2\.. or
even (I dont know Tomcat very well) c:\Program Files\Tomcat\bin\Jdk1.2\
3) Once you have found which is the runtime environment for your application server, you can assume that all .jar-packaged libraries in ...\JDK1.2\lib\ are available to your code. So you could copy servlets.jar to that directory.
4) make sure to restart Tomcat.
if you want to check which Classes are available in a .jar - file, do this: 1)open a dos prompt 2)Set PATH=%PATH%;C:\...\JDK1.2\bin (i.e include the jar-utility) as a command line program
3)cd to the directory where the .jar-file can be found (ex: C:\JDK1.2\lib\rt.jar)
4) type: jar -tvf rt.jar
you should see the content on your screen
java.awt.Textbox.class
java.awt. etc..
good luck
Papyrus -
Package javax.servlet does not exist - settings appear to be correct
laugh as I write this post...it's hardly a "new topic."...but everything seems set just as it should be...
Okay...I'm a seasoned programmer in every language but JAVA. Here's the issue...every time I try to use the Core Servlets book/website by Marty Hall and Larry Brown I get hung up on the packages. This time, I downloaded and followed step by step what the website said to do...it was even preconfigured for me! Alas...I am getting the following compliation errors on a "simple packagless" program with NetBeans:
Compiling 1 source file to C:\Servlets+JSP\HelloServlet\build\classes
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:13: cannot find symbol
symbol: class HttpServlet
public class HelloServlet extends HttpServlet {
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:14: cannot find symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:15: cannot find symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:16: cannot find symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
6 errors
BUILD FAILED (total time: 0 seconds)
These are my environment settings (note that the JAVAX package is located under the src folder in Java)
Catalina Home:
C:\apache-tomcat-6.0.10
CLASSPATH:
C:\apache-tomcat-6.0.10\lib\servlet-api.jar;
C:\apache-tomcat-6.0.10\lib\jsp-api.jar;
C:\apache-tomcat-6.0.10\lib\el-api.jar;
C:\Servlets+JSP;..;..\..;
C:\Program Files\Java\jdk1.6.0_03\src
JAVA_HOME
C:\Program Files\Java\jdk1.6.0_03
Path:
C:\Program Files\Java\jdk1.6.0_03\bin;%PATH%
Any ideas (excluding the one that maybe I should let my hair grow out, put on some tackey shorts and sandles and start palying an instrument in the streets of Austin for living?)cabkats wrote:
You are then suggesting that I make the corrections directly to the files in apache using notepad instead of using the envir. variables?No I am not suggesting that. I am suggesting that you need to read the documentation about the product(s) and set them up the way they require, rather than blindly think that the CLASSPATH environment variable is some magical entity.
I will try this, but I was hoping that since my IDE auto configured (with exception to java_home) that I would not have to do this. I wil give it try....thanks for the suggestion.See, you're using an IDE. Like I mentioned, IDEs do not use the CLASSPATH environment variable. You need to set up your project in your IDE in such a way that it knows what the dependent jars are. I'm sure there's a way to add jars to your project's dependencies. -
Javax.servlet.* package does not exit
While compiling servlet followinng errors are coming
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:13: cannot find symbol
symbol: class HttpServlet
public class HelloServlet extends HttpServlet {
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:14: cannot find symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:15: cannot find symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:16: cannot find symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
Plz help me out for this problem.Hi There, I have recently got new pc and lost my development/test environment and have to setup tomcat/eclipse environment again. i installed Tomcat 5.5 and Java 1.5.0.22 version on my pc and also created local dev directory as C:\Java to compile and test sample .java files.
here is the class path i set:
CLASSPATH=.;C:\Java;"C:\Program Files\Apache\Tomcat 5.5\common\lib\servlet-api.jar";"C:\Program Files\Apache\Tomcat 5.5\common\lib\jsp-api.jar";"C:\Program Files\Apache\Tomcat 5.5\common\lib\jasper-runtime.jar";"C:\Documents and Settings\UserId\My Documents\ServletWork\workspace";..;..\..
However when I try to compile sample HelloServlet.java file, i get following errors:
C:\Java>javac HelloServlet.java
HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloServlet.java:13: cannot find symbol
symbol: class HttpServlet
public class HelloServlet extends HttpServlet {
^
HelloServlet.java:14: cannot find symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
^
HelloServlet.java:15: cannot find symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
^
HelloServlet.java:16: cannot find symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
^
6 errors
Not sure if I missed anything. I would appreciate any help/hint to resolve this issue.
Thanks,
SunIT -
Javax.servlet does not exit
hello all,
i m new and have recently started using java, servlets, jsp with netbeans and Tomcat.
There are some servlet examples in Tomcat5.5\webapps\servlets-examples\WEB-INF\classes\...
Using the //localhost:8080/....... , i can easily get these servlets working in the browser.
When i opened one of the java file say: HelloWorldExample.java in Netbeans, there area lot of red circles with exclamation mark in it.
it says: "package javax.servlet does not exist"
in this line: import javax.servlet.*;
i am surprised why such errors are there and with such errors also the program runs...i want to get rid of such red circles and the error it is showing.
I have jdk1.6.0_10 , jre1.6.0_05 , Netbeans IDE 6.0.1 , Tomcat 5.5 installed in my Windows Vista OS
i have set my classpath as
.;C:\root\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar;C:\root\jakarta-tomcat-5.5.9\common\lib\jsp-api.jar;
JAVA_HOME : C:\Program Files\Java\jdk1.6.0_10
any help is appreciated....
Thank you.
Edited by: kuchu on Jun 26, 2009 12:00 PMThe servlet API is included in the application server implementation which you're going to use (in this case Tomcat). You need to associate the application server with the Netbeans project. Check the project properties.
I cannot tell the detailed steps how to do it in Netbeans as I already uninstalled it after 5 minutes of trying some years ago, but in Eclipse you can select and add the application server during the 'create dynamic web project' wizard. It is smart enough to include the appserver's libraries in the project's build path. From what I heard and read about Netbeans is that it is also able to do so. -
Hi,
I am using BEA WebLogic Server 9.2
When I deployed my [ear] apllication (Struts 1, Java 1.4, EJB2) I get this error:
Message icon - Error javax.servlet.ServletException: [HTTP:101250][weblogic.servlet.internal.WebAppServletContext@11c2137 -
appName: 'test-ear', name: 'TEST', context-path: '/TEST']: Servlet class de.general.TestActionServlet for servlet action could not be loaded because a class on which
it depends was not found in the classpath . java.lang.NoClassDefFoundError:
org/apache/struts/action/ActionServlet.
Please help me in this ClassLoader problem,
RegardsHi
you can set the classpath struts.jar in setDomainEnv.cmd
you can get this file in your root domain under the bin directory.
set classpath=%classpath%;/struts.jar; -
Hi,
I have 2 servers.
One with WebLogic6.1 & one with WebLogic9.2
With WL6.1, i have errors like :
<i>
<2 août 2006 13:00:20 IRST> <Error> <HTTP> <[WebAppServletContext(10414345,imargo,/imargo)] Root cause of ServletException
javax.servlet.jsp.JspException: Missing message for key MG01.loc.index
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
at jsp_servlet._jsp.__im_in_tec_MGN01_MGN001._jspService(__im_in_tec_MGN01_MGN001.java:1711)
</i>
With WL9.2, i don't have those errors in my logs...
I have no errors o_o
Help me plz
Many thanksI never used DynaActionForm, what I have noticed here is, don't you need to declare the form bean? I may be wrong.
<form-beans>
<form-bean name="newProdForm" type="com.package.form.NewProdForm"></form-bean>
</form-beans> -
Javax.servlet.ServletException: runtime failure in custom tag 'content'
Hi When iam trying to click on a link which takes to an another JSP.
iam getting this error after few minutes and that page doesnt display at
all.
can anybody help me out????
==vasan++;
<Jan 9, 2001 11:50:10 AM PST> <Error> <HTTP>
<[WebAppServletContext(627219,console)] exception raised on
'/console/panels/mbean/Server.jsp'
javax.servlet.ServletException: runtime failure in custom tag 'content'
at
weblogic.management.console.pages._panels._mbean._server._jspService(_server
.java:9798)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Jan 9, 2001 11:50:10 AM PST> <Error> <HTTP>
<[WebAppServletContext(627219,console)] Root cause of ServletException
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
weblogic.servlet.internal.ChunkUtils.writeHeaderChunk(ChunkUtils.java:127)
at
weblogic.servlet.internal.ResponseHeaders.writeHeaders(ResponseHeaders.java:
345)
at
weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseIm
pl.java:683)
at
weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamI
mpl.java:124)
at
weblogic.servlet.internal.ServletOutputStreamImpl.flushWithCheck(ServletOutp
utStreamImpl.java:451)
at
weblogic.servlet.internal.ServletOutputStreamImpl.print(ServletOutputStreamI
mpl.java:243)
at
javax.servlet.ServletOutputStream.println(ServletOutputStream.java:286)
at
weblogic.servlet.jsp.JspWriterImpl.println(JspWriterImpl.java:204)
at
weblogic.management.console.pages._common._requestinfo.print(_requestinfo.ja
va:68)
at
weblogic.management.console.pages._common._requestinfo._jspService(_requesti
nfo.java:224)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
l.java:249)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
l.java:167)
at
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:104)
at
weblogic.management.console.pages._common._error._jspService(_error.java:162
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:149)
at
weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:100)
at
weblogic.management.console.pages._panels._mbean._server._jspService(_server
.java:9830)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
I just started getting this error after a year in production environment without any problems. Did you every find out what caused this or better yet how to prevent this?
Dan.
-
why i cant open my report in JDeveloper tools but i can open in report builder ????
this is the error i get ...
Reports Error Page
Fri Oct 18 15:41:54 SGT 2002
javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server reportserver failed
javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server reportserver failed
int oracle.reports.jsp.ReportTag.doStartTag()
ReportTag.java:329
void MyReport.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
MyReport.jsp:4
void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
HttpJsp.java:119
void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
JspPageTable.java:302
void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
JspServlet.java:407
void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
JspServlet.java:328
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
HttpServlet.java:336
void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
ServletRequestDispatcher.java:684
void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
ServletRequestDispatcher.java:269
boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
HttpRequestHandler.java:735
void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
HttpRequestHandler.java:243
void com.evermind.util.ThreadPoolThread.run()
ThreadPoolThread.java:64i still get the same error .. is it i need to set any environment variable or ... any setting ...??
login Oracle Database
user name = system
password = manager
services = dbhenry
setting JSP Report
Report Name = MyReport1
Reports Server = reportserver
Parameters = userid=system/manager@dbhenry
the cource code below is my JSP report coding :
<rw:report id="MyReport1" parameters="server=reportserver&userid=system/manager@dbhenry">
<rw:objects id="objects">
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<report name="MyReport1" DTDVersion="9.0.2.0.0">
<xmlSettings xmlTag="MYREPORT1" xmlPrologType="text">
<![CDATA[<?xml version="1.0" encoding="&Encoding"?>]]>
</xmlSettings>
<data>
<dataSource name="Q_1">
<select>
<![CDATA[SELECT ALL HENRY.TEL, HENRY."ADD", HENRY.NAME, HENRY.ID
FROM HENRY ]]>
</select> -
Javax.servlet.ServletException & java.lang.NoClassDefFoundError
I am getting this javax.servlet.ServletException & java.lang.NoClassDefFoundError
exceptions while running jsp in .netbeans.
Iwas able to compile and run jsp pgms , but i am getting this error when i use jsp:useBean.I think the java class created is not in the proper path..netbeans is using tomcat server.The ide put the jsp's in the proper path. but it is not putting the java class i created with setter and getter methods.I also set the classpath. but din't work
I t is eating up my time!Pl. suggest me a solution!
Directory structure is :source file
c:/windows/.netbeans/3.5/samples/jsp
I guess the ide is putting all the class files(jsp) in
C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
so i copied the userData.class from source dir to the above directory.
and i also did the
set CLASSPATH= C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
in dos prompt
pl. find the code below.
Html:
<HTML>
<HEAD>
<TITLE>getData</TITLE>
</HEAD>
<BODY>
<form method = post action="saveData.jsp">
What's your Name : <input type=text name =username size=10>
<br>
What's Age : <input type=text name=age size=10>
<br>
What's ur email id : <input type=text name=email size=10>
<input type=submit>
</FORM>
</BODY>
</HTML>
SaveData.jsp
<jsp:useBean id="user" class="JSP.userData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<html>
<head><title>using bean</title></head>
<body>
--Continue
Thank u
</body>
</html>
userData.java
* userData.java
* Created on February 12, 2004, 1:06 PM
package JSP;
* @author amano
public class userData {
String userName;
int age;
String email;
/** Creates a new instance of userData */
public userData()
public void setUsername(String str)
userName=str;
public void setAge(int str)
age=str;
public void setEmail(String str)
email=str;
public String getUsername()
return userName;
public int getAge()
return age;
public String getEmail()
return email;when i click on the submit button i get the following error msg.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
javax.servlet.ServletException: JSP/user_data
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:349)
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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
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:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
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.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
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:468)
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:174)
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:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NoClassDefFoundError: JSP/user_data
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.load(IDEJspServlet.java:106)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:160)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
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:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
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.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
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:468)
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:174)
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:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534) -
Getting javax.servlet.ServletException: General error
Someone pls help me....
I am getting General Error while inserting a row in database.I am not able to solve this error...I would really appreciate your help...Thanks in advance...
Following is my Code ::
<%! int countBts,countBts1,mmm; %>
<%! String msg; %>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dataSourceName = "ProjData";
String dbURL = "jdbc:odbc:" + dataSourceName;
Connection conn = DriverManager.getConnection(dbURL, "","");
int dataMgx= Integer.parseInt(request.getParameter("allocMgxId"));
int dataFrsm=Integer.parseInt(request.getParameter("allocFrsmSlotNo"));
int dataPort=Integer.parseInt(request.getParameter("allocPortNo"));
int dataBts=Integer.parseInt(request.getParameter("bts1"));
int dataRpm=Integer.parseInt(request.getParameter("allocRpmNo"));
int dataMultiLink=Integer.parseInt(request.getParameter("allocMultiLinkNo"));
String dataPortStatus= "vacant";
Statement myStat1 = conn.createStatement();
myStat1.execute("select count(BTS_ID) from MGX where BTS_ID=" + dataBts);
ResultSet result1 = myStat1.getResultSet();
if(result1.next())
countBts=Integer.parseInt(result1.getString(1));
countBts1=countBts+1;
if(countBts > 6)
msg="Configuration of more than 6 spans not allowed";
%>
<h3><%=msg %></h3>
<%}
else
PreparedStatement stmt1 =
conn.prepareStatement(("Insert into MGX (BTS_ID,Port_Status,MGX_Num,Port_No,FRSM_No,RPM_Card,Multi_Link) values ("+dataBts+",'"+dataPortStatus+"',"+dataMgx+","+dataPort+","+dataFrsm+","+dataRpm+","+dataMultiLink+")"));
mmm = stmt1.executeUpdate();
stmt1.close();
if(mmm == 1)
msg="One SpanRecord successfully added in the Database ";
else
msg="Failure in Update Operation";
result1.close();
myStat1.close();
conn.close();
%>
The error I am getting is as follows::
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: General error
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp._5_jsp._jspService(_5_jsp.java:179)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.sql.SQLException: General error
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6987)
sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:3150)
sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:214)
sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(JdbcOdbcPreparedStatement.java:136)
org.apache.jsp._5_jsp._jspService(_5_jsp.java:121)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Pls Help meThanks for the reply buddy...
As per your reply....I have tried modifying my Preparedstatement properly with ? and then binding values...
But even after doing this i am still getting the same error....
I am clueless...
Following is my modified Prepared Statement ::
conn.prepareStatement(("Insert into MGX (BTS_ID,MGX_Num,Port_No,FRSM_No,RPM_Card,Multi_Link,Port_Status) values (?,?,?,?,?,?,?)"));
stmt1.setInt(1,Integer.parseInt(request.getParameter("bts1")));
stmt1.setInt(2,Integer.parseInt(request.getParameter("allocMgxId")));
stmt1.setInt(3,Integer.parseInt(request.getParameter("allocPortNo")));
stmt1.setInt(4,Integer.parseInt(request.getParameter("allocFrsmSlotNo")));
stmt1.setInt(5,Integer.parseInt(request.getParameter("allocRpmNo")));
stmt1.setInt(6,Integer.parseInt(request.getParameter("allocMultiLinkNo")));
stmt1.setString(7,"Allocated");
Awaiting for a solution.... -
Problem: package javax.servlet.jsp does not exist
I am a novice JSP programmer. My projects that use any javax.servlet classes are not seeing those at all. I am working with a group of folks using Java SE 1.5. (Note: I'm using Windows so the directory separator is "\")
What Used to work:
1. Nearly all my projects were working using Java version 1.6. These projects were developed as examples from Wrox and Apress books about JSP and Struts.
What has changed:
1. I un-installed the version 1.6 of JDK and JRE, as well as tomcat, netbeans, and all the associated libraries/jars.
2. I installed version 1.5 of JDK and JRE, as well as tomcat, netbeans, and all the associated libraries/jars.
3. I updated my JAVA_HOME, CATALINA_HOME, CLASSPATH, and PATH environmental variables. I made sure that the path to servlet-api.jar (in the tomcat common\lib) is included in the classpath.
What is wrong:
1. References to javax.servlet.* are not satisfied--they are flagged in the source code in NetBeans and I get compiler errors with any project containing those references. For example:
... package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
What I've found:
1. My CATALINA_HOME=C:\Java\Tomcat 5.5
2. My JAVA_HOME=C:\Java\jdk1.5.0_11
3. My CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib;%JAVA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\common\lib\servlet-api.jar;C:\Java\logging-log4j-1.2.14\dist\lib\log4j-1.2.14.jar
4. My PATH=c:\wint\BIN;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%CATALINA_HOME%\bin;C:\MySQL\MySQL Server 5.0\bin;D:\MiKTeX 2.5\miktex\bin;C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\SFU\Perl\bin\;C:\SFU\common\;C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Bin;C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Win32\Bin
What I need:
1. I need to have some reference to the servlet classes satisfied in my configuration. Any help is appreciated.
thanks
jondrOh. I got some over-the-shoulder debug help.
My error was in the classpath specification:
The path: %JAVA_HOME%\lib\jsp-api.jar
Should be: %CATALINA_HOME%\lib\jsp-api.jar
That contains the javax.servlet.jsp.*
Thimk.
Message was edited by: jon
jondr
Maybe you are looking for
-
Hi, We're using Global Address Cleanse transform in one of our ETLs. For China (Beijing, Shanghai etc.) address, its populating China as both City and Country and Beijing/Shanghai as State. Below is the output field mappings: State: REGION1_NAME_BEST
-
Change the environment variables for sid adm failed
Hi Experts, I have installed ECC HA on AIX/ORACLE now i want to change the environment variables for the qr1adm user at the standby node i tried to change the /home/qr1adm/.profile with command vi /home/qr1adm/.profile it is changed and i saved th
-
Adding an 'Example Text' in Form Text Fields
Hi, I was wondering if anyone knows how to set the text which is temporarily in a text field in a form. It usually displays an example of what the user should be inputting into the field. (In italics and greyed out, and dissapears once the user click
-
Using the Workbench to convert a Sybase 11 application to 8i, I've seen all the Oracle temporary tables created as "... on commit preserve rows". But we want the temps to only have transaction duration rather than session. Is there any way to tweak t
-
Retrospect vs. time machine?
In connection to a recent question about a failed HD on our server in the office, I was talking with a friend who strongly urged me to dump Retrospect in favor of just using time machine. (note we don't actually run leopard right now, we would need t