File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about HttpRequest

 
amanda wu
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using j2sdk1.4.1, ant, and tomcat,
why javax.servlet etc cannot be found?
and methods like getRequestedSessionID() etc also cannot be found
the following is the msg :
C:\jakarta-tomcat-4.1.18\webapps\cartapp\WEB-INF\classes\com\cartapp\user>javac
statBean.java
statBean.java:3: package javax.servlet does not exist
import javax.servlet.*;
^
statBean.java:4: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
 
Praful Thakare
Ranch Hand
Posts: 642
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amanda
Try setting ur classpath as
ON WINDOWS
CLASSPATH=%CLASSPATH%;TOMCAT_HOME/common/lib/servlet.jar
[B] ON LINUX [\B]
CLASSPATH=$CLASSPATH:CAT$TOMCAT_HOME/common/lib/servlet.jar
where TOMCAT_T_HOME is path of directory where u have install tomcat
now compile ur file
regards
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic