Hi all,

I am currently attempting to pass a URL to struts, with information
embedded in the URL (restful style).

So far this works, if I point a browser at /foo/000014/invoice.shtml,
the correct action is picked up and the right method is called:

        @Action("**/invoice*.shtml")
        public String shtml() throws Exception {
                return execute();
        }

The problem is, the following warning is being logged to catalina.out:

WARNING: Error setting expression '1' with value '/000014'
ognl.InappropriateExpressionException: Inappropriate OGNL expression: 1
        at ognl.SimpleNode.setValueBody(SimpleNode.java:312)
        at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
        at ognl.SimpleNode.setValue(SimpleNode.java:301)
        at ognl.Ognl.setValue(Ognl.java:737)

Is there a way to suppress this warning at tell ognl to stop trying to
parse the URL?

Is there another best practice method I should be using to achieve this?

I found the REST plugin for struts which seems hopeful, but the
documentation for the REST plugin is incomplete - it makes a vague
reference to me needing to implement a "ContentTypeHandler" to handle
xml, json, html, etc output, but offers no links or clues as to how this
is to be achieved. Does anyone know if documentation exists on how to do
this?

Regards,
Graham
--

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to