Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat 5.5(tried 6.0 as well)-JSTL 1.1 not resolved  RSS feed

 
Alan Bates
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"org.apache.jasper.JasperException: 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"

...been seeing that for the better part of 3 days now. Trying to deploy existing jsps that utilize jstl 1.1 (I would assume v1.1, because both jstl.jar and standard.jar were present in the other environment)

So, "big picture", I'm trying to get Tomcat 6.0.29 configured to serve up a local copy of the jsp to a local vhost proxy call from HTTPD2.2 . I'm having trouble getting

HTTPD's brand1.local virtual host to contact Tomcat's brand1.local virtual host, but that's another layer of complexity for another post. Right now, I'm trying to just get the darn server pages to work in Tomcat Through some reading, I eventually found out that JSTL 1.1's Servlet 2.4 and JSP 2.0 requirements are not minimum requirements, but absolute requirements.
Is this correct?=> Since TC6.0 runs Servlet 2.5 and JSP 2.2, it is incompatible with JSTL 1.1?
Whenever I discovered this info, I installed Tomcat 5.5, and am trying to get it going.

JSTL
But before I have the proxying all wired up, I've got a little problem with JSTL 1.1 not wanting to work in Tomcat. The existing pages used 1.1 and there is just way way way too much stuff to change in order to upgrade the pages to 1.2 . So for now, stuck with 1.1. I've tried placing the jstl and standard jars EVERYWHERE and I STILL get a JasperException. I put them in:
Catalina\common\lib
Catalina\Corporate Sites\brand1\WEB-INF\lib
Catalina\server\lib
Catalina\shared\lib
Catalina\webapps\ROOT\brand1\WEB-INF\lib

(I have 2 copies of brand1 while I'm working through this. I put one inside ROOT so that I could directly access the files and the one in "Corporate Sites" that I'm hoping to have set up as my virtual host)

Does anyone know of a procedure that will get Tomcat 5.5 working with JSTL 1.1?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66255
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alan Bates wrote:I would assume v1.1, because both jstl.jar and standard.jar were present in the other environment

Don't assume. Crack open the jar files and make sure that the JSTL 1.1 tld files are in there.

I eventually found out that JSTL 1.1's Servlet 2.4 and JSP 2.0 requirements are not minimum requirements, but absolute requirements.

No. 1.1 will work with any versions after 2.4 and 2.0.

Since TC6.0 runs Servlet 2.5 and JSP 2.2, it is incompatible with JSTL 1.1?

No. But JSTL 1.2 will be more up to date.

and there is just way way way too much stuff to change in order to upgrade the pages to 1.2

What changes? JSTL 1.2 is pretty much just like JSTL 1.1 down to the URIs. All you need to do is to replace the 1.1 jar files with the 1.2 jar file. Voila. DOne.

Does anyone know of a procedure that will get Tomcat 5.5 working with JSTL 1.1?

You drop the jar file(s) into WEB-INF/lib and you're done. If that's not working then you've done something to gum up the works or have JSTL 1.0 jar files.
 
Alan Bates
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply. I'll try to get things worked out whenever I get into the office tomorrow morning.

Seriously though, I was working from a FRESH install of Tomcat 5.5 . I hadn't done anything at all besides download 5.5 and install it. Got it running and nav'd to localhost:8080 to get my "blah blah blah Welcome to Tomcat" page. I dropped a jsp that taglib'd some jstl, put jstl.jar and standard.jar in ROOT's WEB-INF/lib folder and when I tried to nav to http://localhost:8080/page.jsp , I got the JasperException from jstl. I'm guessing at this point, they're the wrong jars but I'll confirm that tomorrow morning and repost.
 
Alan Bates
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YUP! Pulled jstl.jar and standard.jar from http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi , dropped them into brand1.local's WEB-INF/lib folder and voilĂ ! The libraries that I was working with were given to me by one of our developers and he said that they were 1.1. You know the age old saying about the word "assume"
 
Alan Bates
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So now that that is taken care of, I'm trying to pull my brand sites out of webapps\ROOT

Right now, brand1.local is deployed as a subfolder of webapps\ROOT such that access to it is via http://localhost:8080/brand1/index.jsp
I'm trying to set up a virtual host for it so that it is accessible via http://brand1.local:8080/index.jsp

So first things first, I added brand1.local to my hosts file pointing to 127.0.0.1. I dropped the following into my Engine within server.xml:


I have index.jsp for brand1 located within CATALINA_HOME\Corporate Sites\brand1

Naving to http://brand1.local:8080 displays index.jsp located at CATALINA_HOME\webapps\ROOT\index.jsp with broken image links and a title bar that says "Cannot find server"

instead of
"CATALINA_HOME\Corporate Sites\brand1\index.jsp"
and I have no idea why. Anyone know what gives?
 
Alan Bates
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...The reason I was working with Tomcat 5.5 was because I was having difficulties getting JSTL1.2 up and running in Tomcat 6 but have since resolved my JSTL1.2 issue as well as my virtualhosting issue. So now, this is JSTL 1.2 on Tomcat 6 with Tomcat VHosts being contacted by HTTPD2.2 VHosts. (Yay me lol)

I pulled jstl-1.2.jar from http://download.java.net/maven/1/jstl/jars/
then followed the procedure at:
http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts
for my virtual hosts

Dropped jstl-1.2jar into ${CATALINA_HOME}\hosts\brand1\webapp\WEB-INF\lib
and voilĂ .

"http://brand1.local" hits my local httpd2.2. the brand1.local Virtual Host runs the RewriteEngine and points the request to "http://brand1.local:8080/webapp/index.jsp"
Tomcat listens on port 8080 and serves up hosts\brand1\webapp\index.jsp (that includes a taglib reference: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>)

No JasperException. Just the JSP!!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!