struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject xwork injecting parameters into requestScope
Date Tue, 21 Oct 2008 13:12:07 GMT
I have an Action and corresponding JSP form with the property "portfolio".

In my JSP, I have this JSTL tag test:

<c:if test="${not empty portfolio and gt 0}"> stuff </c:if>

which works fine for my purposes. But then when I submit the form and validation 
fails and myAction.portfolio is not initialized, Struts2 injects the portfolio 
request parameter into the requestAttributes.

Now my JSP blows up because:

${portfolio} = "0"


${not empty portfolio} = true

and then

${} ----> javax.servlet.jsp.JspException: 
javax.el.PropertyNotFoundException: Property 'id' not found on type 

What influence can I have over this injection behaviour?

Or perhaps, can I reformulate my test so that I can tell whether my 
"${portfolio}" is a string or a bean?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message