Hi,

I am new to Struts and new to this list. I want to create a blog with struts as a university project and have been wrestling with this (obscenely) simple problem for two days without any progress. Maybe any of you struts experts may help out here:

All I want to do is access a GET parameter from an action to initialize an article object. This is how my URL looks like:

http://localhost:8080/struts_blog/artikel.action?artnr=1

In my struts.xml I specified an action that is correctly mapped to my action class:

<action name="artikel" method="input" class="action.ArtikelAction">
  <result name="success" type="redirectAction">admin</result>
  <result name="input">/WEB-INF/jsp/artikelForm.jsp</result>
</action>

My action class (ArtikelAction.java) contains the property "private Integer artnr" with the appropriate Getters and Setters. From what I read in the documentation and saw in the examples, this should be sufficient for the params interceptor to initialize the variable. However, this is not the case :-(

What am I missing?

I tried to get some debug information from the params interceptor and put the following code into my struts.xml (inside the action):
<interceptor-ref name="params">
  <param name="logEnabled">true</param>
  <param name="logLevel">DEBUG</param>
</interceptor-ref>

However, this just gave me the following exception when starting my project:
13.03.2008 09:18:42 com.opensymphony.xwork2.util.OgnlUtil internalSetProperty WARNUNG: Caught OgnlException while setting property 'logLevel' on type 'com.opensymphony.xwork2.interceptor.ParametersInterceptor'. ognl.NoSuchPropertyException: com.opensymphony.xwork2.interceptor.ParametersInterceptor.logLevel

So, how could I debug the params interceptor?

I am using the latest struts-2.0.11.1 release libraries and have set devMode to true in struts.xml.

Thanks for your help.
Christoph


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to