• Post Reply Bookmark Topic Watch Topic
  • New Topic

2 tomcat and JSP spec questions  RSS feed

Raf Szczypiorski
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have been recently reading the JSP.2.4 specs, and have a few questions regarding it and tomcat. Here they are:
1. point in the specs (page 96), there is a table of possible conversion sources and targets, and its says at the very top, for Bean Property: "As converted by the corresponding PropertyEditor, if any,
using PropertyEditor.setAsText(string-literal) and PropertyEditor.
getValue(). If there is no corresponding PropertyEditor
or the PropertyEditor throws an exception, �null� if the
string is empty, otherwise error." So, if there is no property editor, and the string value which is used to set the attribute is empty (""), it should set the property to null. However, tomcat 5.5.26 throws an exception complaining no editor can be found. Is this a violation of the specs, or have I misunderstood something? (I am using jsp:setProperty with value="" to test this.)
2. point 7.2.3 in the specs (page 159):
"If the JSP container cannot locate a TLD resource path for a given URI, a fatal
translation error shall result. Similarly, it is a fatal translation error for a URI
attribute value to resolve to two different TLD resource paths."
However, I created a TLD file with URI "test", placed it under WEB-INF; then created an exact copy (with a different file name of course) and placed it beside the first one. It has the same URI specified for the taglib. Then, in a JSP I specify a taglib with the URI "test", and use the tag I defined there, and this works fine. I also tried creating two taglib declaratios in a jsp-config, but got the same result - it worked fine, always taking the second taglib definition (I know this because I also duplicated the tag handler so that the output tells me which one is used). This seems like violation of the specs, but I am not sure?
3. also, what is not clear to me is the fact that JSP in standard syntax and JSP documents handle unresolved taglibs differently. Standard pages report error when a URI cannot be found, and documents ignore this and output the tags verbatim, is that right? This might not be the question to tomcat directly, but maybe you will be able to answer.

Please don't get my questions wrong, it's just I like to know what I am using and how it works.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!