• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

linux servlet class path compile help

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 57
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the responses, always seem to be learning something new all the time.
 
reply
    Bookmark Topic Watch Topic
  • New Topic