baigmz
asked on
Eclipse reports "The import javax.servlet cannot be resolved"...
Hi -
My Eclipse IDE has been setup to use JRE 1.5.0_03. The IDE reports that it is unable to locate the following classes:
javax.servlet.http.Cookie;
javax.servlet.http.HttpSer vletReques t;
javax.servlet.ServletExcep tion;
I checked rt.jar for the above version of JRE and don't find a javax.servlet package. Have these classes moved to another location?
My Eclipse IDE has been setup to use JRE 1.5.0_03. The IDE reports that it is unable to locate the following classes:
javax.servlet.http.Cookie;
javax.servlet.http.HttpSer
javax.servlet.ServletExcep
I checked rt.jar for the above version of JRE and don't find a javax.servlet package. Have these classes moved to another location?
Download servlet.jar from Apache.
;JOOP!
;JOOP!
If you have TOMCAT installed on your computer, look at:
C:\Program Files\Apache Group\jakarta-tomcat-3.2.3 \lib\servl et.jar
The TOMCAT version may be different.
Then add that .jar to your ECLIPSE project.
;JOOP!
C:\Program Files\Apache Group\jakarta-tomcat-3.2.3
The TOMCAT version may be different.
Then add that .jar to your ECLIPSE project.
;JOOP!
You need to add servlet.jar or if you are using Tomcat 5.x add the all the jars starting with servlet to the build path.
Follow these steps
right click on the project and select properties
and then select java Build Path in that select libraries tab and click add external jars button and point to the above mentiond jars.
Your problem will be resolved.
Thank You.
Follow these steps
right click on the project and select properties
and then select java Build Path in that select libraries tab and click add external jars button and point to the above mentiond jars.
Your problem will be resolved.
Thank You.
Download Tomcat from: http://tomcat.apache.org/
ASKER
I am using WebLogic Server as my application server. Doesn't it support web application development for HTTP servlets?
It should - are you using a Weblogic plug-in for Eclipse? Make sure you have added the JARs into your project's build-path. They should be present in some lib directory under Weblogic's root folder.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
;JOOP!