• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

referenced servlet-api.jar in my classpath  RSS feed

 
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I work under linux fedora 27 server + Gnome.
I test a new method to develop in java EE, with eclipse ide for java developer.
The method consite to develop directly in the Webapps of Tomcat 8.5.x,
So I do not use the standard method of developing with Eclipse for Java EE.
In the <webapps> directory of tomcat I put my files containing servlets with their reciprocal class.
It's a bit complicated but I test it.

My problem is that I can not find my ClassPath of jdk 1.8 which is operational.
when I run to compile my servlet >> javac myservlet.java.
>> javac can not find: servlet-api.jar which is in my classpath.

How can I make the link and referenced servlet-api.jar in my classpath ?

Regards
Philippe
 
author
Posts: 23832
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Philippe Ponceblanc wrote:
How can I make the link and referenced servlet-api.jar in my classpath ?



Your JEE container, in this case, Tomcat, should have the jar file. Just add it to the classpath.

Henry
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Henry Wong wrote:

Philippe Ponceblanc wrote:
How can I make the link and referenced servlet-api.jar in my classpath ?



Your JEE container, in this case, Tomcat, should have the jar file. Just add it to the classpath.

Henry



How do you do that ?
 
Henry Wong
author
Posts: 23832
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Philippe Ponceblanc wrote:
How do you do that ?



Which part? Finding the jar file in the Tomcat distribution? Or adding it to the classpath?

For the first, refer to your Tomcat instructions. Or you can simply do a search (either via find command or the Windows search function) for it in the distribution. For the latter, refer to this... https://coderanch.com/wiki/660138/Set-Classpath

Henry

* just noticed that this was in the Linux forum, so removed the reference to Windows.

 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am under linux fedora server 27 + gnome,
I put <servlet-api.jar> a little by all in the path and it still does not work.
Is the Path dynamic or do you have to reboot the server?
 
Marshal
Posts: 24461
55
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Philippe Ponceblanc wrote:I put <servlet-api.jar> a little by all in the path and it still does not work.



No, put it in the classpath, not the path.
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where is the classpath, or how can i found the classpath
 
Henry Wong
author
Posts: 23832
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Philippe Ponceblanc wrote:where is the classpath, or how can i found the classpath



https://coderanch.com/wiki/660138/Set-Classpath
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!