OracleJSP: oracle.jsp.parse.JspParseException: /sfs/local/topic/showDispatcher.jsp:
Line # 351, --%><spfparam:register name="topic" value="catator"
redirect="<%= !"catator".equals(request.getParameter("topic")) %>" /><%--
Error: Attribute: catator".equals(request.getParameter("topic")) is not a valid attribute name
Can you try
redirect='<%= !"catator".equals(request.getParameter("topic")) %>'
Note the single quotes here.
The error message, which talks about "not a valid attribute name", is indeed not enlightening. The issue is about the correct quoting convention. Excerpt from the JSP 1.2 specification,
--------begin quoting the spec
Quoting in Attributes
A ' is quoted as \'. This is required within a single quote-delimited attribute
value.
A " is quoted as \". This is required within a double quote-delimited attribute
value.
Examples
The following line shows an illegal attribute values.
<mytags:tag value="<%= "hi!" %>" />
end quoting the spec
The same specification are also in JSP spec 2.0, which is implemented in oc4j 10.1.3 and JSP spec 2.1, which will be released soon. So it is certainly not a defect of oc4j to throw parsing exception for your code.
I've tested it also with Tomcat 4.1.31. and there is no problem with the code.
Ok. So Tomcat is tolerant to that illegal usage. As I tested, the recent glassfish is also tolerant to that illegal usage. However, I doubt whether that behavior is indeed conforming to the spec. Maybe a bug can be filed against them.
Anyway, it is better to write strictly according to the spec instead of relying on the fault tolerance of any particular server. Your code will be more portable across j2ee servers then.
Now please tell me this is helpful.
