Bug 40903 - how to do for preventing the EL parse the "." as Operators?
Summary: how to do for preventing the EL parse the "." as Operators?
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1.0
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 40902 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-05 22:54 UTC by tom liu
Modified: 2006-11-06 09:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tom liu 2006-11-05 22:54:04 UTC
i use Struts and JSTL tags. When Struts Action throws exception, the error jsp 
page would be opened as to catch and display the exception. You know, Struts 
set exception infos to request attribute Global.EXCEPTION_KEY
("org.apache.struts.action.EXCEPTION"). So, if use struts logic & bean tag, it 
looks like this:
<logic:present name="org.apache.struts.action.EXCEPTION">
	<h4>Stack</h4>
	<pre>
    <%
    		Exception e = (Exception) request
    		.getAttribute("org.apache.struts.action.EXCEPTION");
    		e.printStackTrace(new PrintWriter(out));
    %>
  </pre>
</logic:present>
If changed to jstl, it would like this:
<c:if test="${org.apache.struts.action.EXCEPTION != null}">
	<p />
	<h4>Stack</h4>
	<pre>
    <%
    		Exception e = (Exception) request
    		.getAttribute("org.apache.struts.action.EXCEPTION");
    		e.printStackTrace(new PrintWriter(out));
    %>
  </pre>
</c:if>
But the EL parse class explains the expression as org object,and apache 
attribute...
So, how to do if using the JSTL?
Comment 1 Vit Timchishin 2006-11-06 02:42:33 UTC
Use requestScope["org.apache.struts.action.EXCEPTION"]
Comment 2 Henri Yandell 2006-11-06 09:05:19 UTC
*** Bug 40902 has been marked as a duplicate of this bug. ***