| Author |
package javax.servlet not found in import
|
Tom Barns
Ranch Hand
Joined: Oct 27, 2000
Posts: 138
|
|
hi, i need to set classpath to get that package,it was working,but changed my classpath setting and i do not know how to get it work. any help will be appreciated.
|
Thanks for your help.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
The javax.servlet package classes are usually in servlet.jar Since this is a "standard extension" package you should be able to put servlet.jar in the JAVA_HOME\jre\lib\ext directory and not have to set it in CLASSPATH at all. Bill ------------------ author of:
|
Java Resources at www.wbrogden.com
|
 |
Tom Barns
Ranch Hand
Joined: Oct 27, 2000
Posts: 138
|
|
Thanks for the reply. how is that?the problem is when i compile my servlet program i got that message,I do that before even starting up my tomcat server.where exactly do i have to set to be able to compile my servlet. thanks alot.
|
 |
Desai Sandeep
Ranch Hand
Joined: Apr 02, 2001
Posts: 1157
|
|
Hi Tom, Check the following : - You have the current directory ".", in the classpath
- As William has suggested, move/copy the servlet.jar file manually to the %JAVA_HOME%\jre\lib\ext folder.If you do this you donot need to set the classpath for javax.servlet.* packages, as the Java Run-time environment would find it for you.
- Check my post at http://www.javaranch.com/ubb/Forum7/HTML/002990.html , to set the classpath on your machine, if you still require to do it(I hope not
) Hope this helps Regards, ------------------ Sandeep Desai vgdesai@vsnl.com - Sun Certified Java Programmer Scored 93 per cent
- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
- IBM Enterprise Connectivity with J2EE Scored 72 per cent
- Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
[This message has been edited by Desai Sandeep (edited April 10, 2001).]
|
<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
|
 |
 |
|
|
subject: package javax.servlet not found in import
|
|
|