• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

linux servlet class path compile help

 
Tom Reese
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I hate to start a new thread but I have not been able to find a solution to my problem. I am currently messing around with aws ec2 servers with suselinux environment. I am trying to deploy a web app but I am unable to because of my web-app cannot see the servlet-api.jar library. How do I set the class path permanently or temporarily so that I the web-app knows how to use servlets?
I have done a bit of digging around and one solution was to use the java -classpath command, which I never got to work, I also know that you can type set CLASSPATH=/usr/share/java/servlet-api.jar I am not sure how to get this to work either because everytime I tried to compile my java files they would still not compile even after trying this. I am feeling really lost on how to go about doing this. Any input would greatly help me, thanks!
-Tom R

nevermind just needed a more in depth guide http://www.yolinux.com/TUTORIALS/LinuxTutorialTomcat.html
 
Prashant Saraf
Ranch Hand
Posts: 57
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One solution you can try is put your jar files in lib folder of web-app, the address should be webapp/web-inf/lib.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prashant Saraf wrote:One solution you can try is put your jar files in lib folder of web-app

NO! Putting servlet-api.jar in a web app's lib folder is 100% guaranteed to cause no end of messed up issues! Never, ever, do that!

Tomcat should have a copy in its own lib folder and that's where it should stay.
 
Tom Reese
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the responses, always seem to be learning something new all the time.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic