Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to just compile servlet  RSS feed

 
Randall Twede
Ranch Hand
Posts: 4690
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im having problems compiling my servlets. i only have minor changes to make. Netbeans seems to insist on managing the whole thing for me by creating project etc. BlueJ just cant seem to find package javax.servlet. i have J2SE 1.5 and new version of J2EE and new tomcat all set up. all i need is just to be able to compile source files without all the project crap. when i originally created these servlets i wrote them in notepad, changed the file extension, opened it in Forte and hit compile. why cant i do that now :=(
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you put j2ee on your classpath, you should be able to compile them pretty easily with the command line compiler that shipped with jdk1.5.

Similarly, with netbeans, you would "mount" j2ee.jar.

If you're using Tocmat as your container, you don't need j2ee at all.
In {tomcat home}\common\lib you will find servlet-api.jar (or servlet.jar in older versions). You can just put that on your classpath and compile.
[ July 21, 2005: Message edited by: Ben Souther ]
 
Randall Twede
Ranch Hand
Posts: 4690
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, ill see if i can do that. in fact, ill try both ways.
 
Randall Twede
Ranch Hand
Posts: 4690
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm. i went to settings|control panel|system|advanced and tried creating CLASSPATH variable set to first G:\...\...\lib\j2ee.jar then tried G:\...\...\common\lib\servlet-api.jar both files exist in those folders. BlueJ still complains it cant find javax.servlet

i rebooted each time i changed it. maybe i should reinstall BlueJ?

I could not figure out how to mount J2EE in Netbeans, and havent tried using it since defining classpath. when i get back online maybe the netbeans help will help.
 
Amos Coats
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try:


[ July 26, 2005: Message edited by: Amos Coats ]
[ July 26, 2005: Message edited by: Amos Coats ]
 
Randall Twede
Ranch Hand
Posts: 4690
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, that looks like what i need for now. i'll try to figure out the IDE's some other time.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!