• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upgrading servlet spec 2.3

 
Paul Yule
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to convert our application to use servlet spec 2.4 and after downloading a pdf of the servlet spec I've been successful in making most of the changes to the deployment descriptor. I can't figure out what to make of the last error:



it is in relation to the following lines in my web.xml


as far as I can tell the login-config of the servlet spec shows the same thing as my descriptor so I'm fairly confident that it's choking on the PCData and not order or missing nodes. Is it having trouble with the forSlash? I wasn't able to find any requirements specific to this value in the element portion of the spec other than:



Is that saying it MUST begin with a forslash? I'm going to try that out... but since I already had this typed out... you suffer my ramblings
 
Ankit Garg
Sheriff
Posts: 9577
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try it, did it work?? It should work after including / ...
 
Paul Yule
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that was the issue. I basically started typing my question and realized the obvious answer as I finished typing -_-. In my defense the web.xml I'm looking at is rediculously long. That was the last error of approx 70ish or so. So now I'm on 2.4, yay! I have an issue with ${param} being used inside jsp at places which are now apache implicit objects. I think that's the only issue though. I need to find where they are being set and change variable names. I have a feeling it's in vendor code somewhere so... *heres to using a decompiler* It'll be good to finally be upgraded.
 
Paul Yule
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is something I'm confused about. Why after updating the web.xml to 2.4 do the jsp pages with tags for expressions give me errors like: Custom tag attribute test cannot be runtime expression. If they were on the old spec before with a URI like http://java.sun.com/jstl/core instead of http://java.sun.com/jsp/jstl/core why wouldn't they work now?

Note: i didn't import any new jars to the project. I noted that WAS 6 has the standard jar file with the updated c.tld included. If it's possible I would like to keep the old pages using the old URI but being able to use expressions, like they were before.

Is there a version of the tlib that used the old URI but allowed expressions?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By updating, you pulled your app out of compatibility mode. Correctly.

So the EL is now (correctly) evaluated by the JSP engine and not the JSTL.

So you must use the correct JSTL version, or things start to trip all over each other. The "attribute cannot be runtime expression" error is a frequent symptom of the ensuing tug of war.

Bottom line: be sure you are using the right versions of the components that work and play well with each other.
 
Paul Yule
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darn, I guess my understanding was that the jstl got a string literal of the EL in previous versions and each tag handled getting the expression out of objects. When I updated that's no longer the case. Which is a good thing, however it means changing the URI of some 250 pages. I have a feeling I'm going to be told we can't upgrade atm because of the glorious amount of testing that's going to need to be done.

So I was hoping against hope there was a way to do it on a page by page basis, having jstl evaluate attributes on some pages. I guess that's not the case since the container will now evaluate it regardless of whether the tld allows for rtexpression values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic