• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

package javax.servlet.jsp.tagext does not exist

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

This is my code (as seen in HSFJ):



It's in this folder: Tomcat/webapps/scwcd-ctags2/WEB-INF/src/foo/SimpleTagTest1.java

I placed all the jar library files at Tomcat/webapps/scwcd-ctags2/WEB-INF/lib, namely, jsp-api.jar, jstl.jar, servlet-api.jar, standard.jar

But I still get that error, "package javax.servlet.jsp.tagext does not exist", whenever I do any of the ff javac from the scwcd-ctags2 directory:



Can anybody tell me if there is still lacking in my compilation?

Thank you in advance!
 
Sheriff
Posts: 67403
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Denise Advincula wrote:I placed all the jar library files at Tomcat/webapps/scwcd-ctags2/WEB-INF/lib, namely, jsp-api.jar, jstl.jar, servlet-api.jar, standard.jar


Firstly, this is the run-time location for jars. It has nothing to do with javac or compiling your sources.

Secondly, once you get everything compiled, the fact that you moved the servlet and JSP jars into WEB-INF/lib will cause no end of weird errors. Remove them from WEB-INF lib.



You need to add the jar files to your classpath, not just the folder where the jars files sit.
 
Denise Advincula
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Thanks a lot. Now my compilation worked. It's right that I need to add the jar files explicitly in my javac.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also having the same issue. Will you please explain it in detail ?
 
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is your project setup?
Please provide more information

Regards
Frits
 
sanjay kankariya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frits,

I tried using javac (from my project directory) command with explicitely defining jsp-api.jar in it. It worked.

javac -classpath C:\Archana\Tomcat5.5\common\lib\jsp-api.jar;classes:. -d WebContent/WEB-INF/classes src/mytags/HelloWorld
.java

Thanks a lot.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I tried using javac (from my project directory) command with explicitely defining jsp-api.jar in it. It worked.


Great!

Thanks for posting the answer so that others know how to fix it when they encounter the same problem.

Regards,
Frits
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic