- This topic has 5 replies, 2 voices, and was last updated 20 years ago by Riyad Kalla.
-
AuthorPosts
-
Sunder *MemberEnvironment:
OS: Win XP SP1
Tomcat: 5.0.28
JDK:1.4.2
IDE: Eclipse 3.0.1 (new install) and Workbench 3.8.2 (new install)Error: “HTTPServer Symbol unresolved”
javax.servlet cannot be resolved or is not avalid superclass
– System Setup ——————————-
Operating System and version: Window XP SP1
Eclipse version: 3.0.1
Fresh Eclipse install (y/n): y
Other installed external plugins:
Number of plugins in the <eclipse>/plugins directory that begin with MyEclipse version: 3.8.2
Eclipse JDK version: 1.4.2
Application Server JDK version: 1.4.2
Are there any exceptions in the Eclipse log file? NAppreciate it once again for all responses.
Thanks,
Sunder❓
Riyad KallaMemberSunder… I have no idea where this error is comming from, can you clarify where you are seeing this error, what you are doing/etc?
If you are trying to run an app or compile an app and getting this error, you are likely forgetting to add either the J2EE 1.4 library Set OR the jsp-api.jar and servlet-api.jar files from Tomcat to your build path for class resolution.
Sunder *MemberHi support-rkalla ,
Thank you for responding to my queries. Quiet simply here are the steps:
1.) System CLASSPATH is set to:
C:\>echo %CLASSPATH%
.;C:\IBM\Java142\lib\tools.jar;C:\IBM\Java142\src.jar;C:\IBM\Tomcat5.0\common\lib\servlet-api.jar;C:\IBM\Tomcat5.0\common\lib\jsp-api.jar
2.) Create a new java project file with:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
3.) Change settings to Appserver :
Open MyEclipse IDE, Windows->Preferences->MyEclipse->Application Servers->Tomcat5->
a) Enable
b) Set the Tomcat Home/Base/Temp directories etc.
4.) Restarted IDE and Tomcat5 app server.It is still unable to resolve the javax.servlet.* api’s.
Again navigated onto:
Windows -> Preferences-> Java -> Build Path-> Set all api’s etc.Still problem persists.
Error seen as below:
Severity Description Resource In Folder Location Creation Time
2 The import javax.servlet cannot be resolved HelloServlet2.java testplat/coreservlets line 16 November 3, 2004 11:21:26 AM
2 The import javax.servlet cannot be resolved HelloServlet2.java testplat/coreservlets line 17 November 3, 2004 11:21:26 AM
2 HttpServlet cannot be resolved or is not a valid superclass HelloServlet2.java testplat/coreservlets line 27 November 3, 2004 11:21:26 AM
2 HttpServletRequest cannot be resolved (or is not a valid type) for the parameter request of the method doGet HelloServlet2.java testplat/coreservlets line 28 November 3, 2004 11:21:26 AM
2 HttpServletResponse cannot be resolved (or is not a valid type) for the parameter response of the method doGet HelloServlet2.java testplat/coreservlets line 29 November 3, 2004 11:21:26 AM
2 ServletException cannot be resolved (or is not an exception type) for the method doGet HelloServlet2.java testplat/coreservlets line 30 November 3, 2004 11:21:26 AM
Riyad KallaMemberFew things
1) You don’t need a system-wide CLASSPATH
2) What JARs exactly do you have listed under your Tomcat 5 > Paths settings? And which box are they in?
3) If you go to jakarta.apache.org and download Tomcat 5.0.28 ZIP file, and unzip it to C:\tomcat or something like that, and then change your connector settings to point to that instead AND then start it, does it work?This is most definately a simple classpath issue and I’m sure we’ll get it fixed soon.
Sunder *MemberThank you for responding to my queries.
Here are the answer to your questions:
1. Tomcat5 -> Path Settings:
a.) All jar under JAVA_HOME\lib,
a.) All jar files under TOMCAT_HOME\common\lib
b.) Jar’s under MYSQL_HOME\connector\2. Tomcat5 was installed before myeclipse and exe file was used to install and not a zip file.
I can still see the problem persists. If this a general CLASSPATH error, could you please point me to location where does IDE look for settings when resolving api (javax.servlet.*) etc. which I believe to be
Windows->Preferences->MyEclipse->AppServer->Tomcat5 and settings underneath it. I am unable imagine if there could there be anything more.
I have done everything possible, seems like a bug to me.
Riyad KallaMembersundern,
I assure you, if this were a bug we would have found it a while ago as 70% of our user base (including our team) use Tomcat.1) Please remove ALL the jars from your Tomcat 5 > Paths preference page (yes all of them)
2) Copy your MySQL Connector/J JAR file to <tomcat dir>\common\lib, this is per the Tomcat/MySQL install instructions.And try and start it. If it still doesn’t wokr then please download the zip like I instructed you to, and change your connector settings to point to the new Tomcat and try and start that.
-
AuthorPosts