This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2, DisplayTags OGNL-error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2, DisplayTags OGNL-error " Watch "Struts2, DisplayTags OGNL-error " New topic
Author

Struts2, DisplayTags OGNL-error

abi chitnis
Greenhorn

Joined: Feb 13, 2009
Posts: 11
I am using displaytags in my jsp and using displaytags pagination. When I click to go next page I get following error in the error log. Any help regarding this is appreciated.

ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d
- 49653) - o
at ognl.SimpleNode.setValueBody(SimpleNode.java:257)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:184)
at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:162)
at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:150)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
ParametersInterceptor.java:173)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(Para
metersInterceptor.java:139)
at
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

IIRC this is an issue with spaces in parameter names; there have been a couple of threads about it on the struts-user mailing list.

I *believe* this has been fixed for future releases, but you'll probably want to check the list archives to make sure.
Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
David Newton wrote:IIRC this is an issue with spaces in parameter names; there have been a couple of threads about it on the struts-user mailing list.

I *believe* this has been fixed for future releases, but you'll probably want to check the list archives to make sure.



Hi David,
I am also facing the same problem.

I am using the latest version of struts i.e 2.1.8 . Hope this issue is not yet fixed. can you please suggest any work arround for the same.

OGNL is not able to understand the pattern (?d-49653-o=2&d-49653-s=3) .

can anybody please suggest


Prajatna Mahunta
Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
David Newton wrote:IIRC this is an issue with spaces in parameter names; there have been a couple of threads about it on the struts-user mailing list.

I *believe* this has been fixed for future releases, but you'll probably want to check the list archives to make sure.




Hi David,
I am also same error, as OGNL is not able to recognize the "href " tags generated by display tag (EX. http:XXX/{Application}/YYY.action?d-49653-o=2&d-49653-s=3 )

And I am using Struts 2.1.8.1 & displaytag-1.2.jar , so hope this problem is not yet resolved.

Can anybody please suggest any work around for the same. I'll be really thakfull for that.
Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
Can anybody please help me in this regard..
Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
Any one able to solve this....
Tj Andrews
Greenhorn

Joined: Nov 22, 2010
Posts: 1
The trick is to modify the interceptor-ref in struts.xml for the "params" interceptor. I am excluding these params:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2, DisplayTags OGNL-error
 
Similar Threads
Inappropriate OGNL expression and a strange problem
Need help on understanding ww:token
ognl.InappropriateExpressionException
ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d - 16544) - p
from struts 2.0. to 2.1 - tokenSession