Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A few questions regarding JSTL and Glassfish

 
John Paul Hoey
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Firstly apologies for my ignorance but I have tried Googling this issue to no avail and most resolutions seem to relate more to JSTL and Tomcat rather than JSTL and Glassfish.

Anyway, I am currently in the process of learning JSP (JSLT & EL) using Netbeans 6.9.1 and Glassfish 3 and have encountered an issue that I cant seem to resolve.

When I add the following line into my JSP page:



I get the following error message displayed in Netbeans:

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the JAR files deployed with this application

As ive already mentioned, most resolutions to this point to JSTL and Tomcat e.g. check your JSTL version and then download the relevant JSTL JAR files and put them in the WEB-INF/lib directory. However when I try and adopt this same approach with Glassfish, I dont seem to see a WEB-INF/lib directory, only a WEB-INF directory where I have put my .jsp files.

Nevertheless my questions are as follows:

1) As im using annotations, I havent created a web.xml file, which I assumed would be OK with the version of JEE im using. Does JSTL need a web.xml file to be present and configured to work correctly?
2) I cant seem to figure out how to locate the version of JSTL I am using within Glassfish. Can someone explain how I go about finding out what version of JSTL im using?
3) What is the directory path within Glassfish / Netbeans where I need to put my JSTL JAR files if I need to download them again?
4) Lastly, anyone got any idea how to solve this issue? :)

Any help with my questions & issues would be very much appreciated!

Regards

JP

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WEB-INF/lib is a standard location and is not Tomcat specific. If your project doesn't have one, create it.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Paul Hoey wrote:1) As im using annotations, I havent created a web.xml file, which I assumed would be OK with the version of JEE im using. Does JSTL need a web.xml file to be present and configured to work correctly?

Don't know. Wouldn't think so, but I always create at least a bare-bones web.xml to give the app a name that appears in the Tomcat manager app (I use Tomcat, not glassfish).

2) I cant seem to figure out how to locate the version of JSTL I am using within Glassfish. Can someone explain how I go about finding out what version of JSTL im using?

Are you using any? Your post seems to indicate not. If JSTL was present, your directive would not be failing.

3) What is the directory path within Glassfish / Netbeans where I need to put my JSTL JAR files if I need to download them again?

WEB-INF/lib

4) Lastly, anyone got any idea how to solve this issue?

WEB-INF/lib once you find the right jar file, of course.

Sorry I cannot be of more help, but I have had no reason to adopt glass fish over Tomcat for any of my projects.
 
John Paul Hoey
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,

Thanks for your responses.

The reason why im using Glassfish is because this is what was used during my Java module at the Open University. However after doing some Googling it seems Tomcat is the most popular.

Hopefully someone who uses Glassfish browses these forums but if not and I dont get any joy, I may give Tomcat a try :)

Thanks again

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic