File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes A few questions regarding JSTL and Glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "A few questions regarding JSTL and Glassfish" Watch "A few questions regarding JSTL and Glassfish" New topic
Author

A few questions regarding JSTL and Glassfish

John Paul Hoey
Greenhorn

Joined: Apr 15, 2012
Posts: 25
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

Joined: Jan 10, 2002
Posts: 61753
    
  67

WEB-INF/lib is a standard location and is not Tomcat specific. If your project doesn't have one, create it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61753
    
  67

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

Joined: Apr 15, 2012
Posts: 25
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A few questions regarding JSTL and Glassfish