2012/10/15 pirzada rashid <pirzada.ras...@gmail.com>: > Thanks for the reply. I have commented person = > personDAO.get(this.getId());. To make things more clear. Just wanted to see > Method prints "id" passed in URL. Below are changes. > See this line below 10:56:05,583 DEBUG PersonAction:62 - getPersonById() = > null executed---->>>> . I get id value null. Thats the problem. > > URL : http://localhost:8000/1_Struts2_Tiles_mvn/person/edit/8 > > JSP Page: > > <s:url id="editURL" action="edit/%{id}" /> > <s:a href="%{editURL}"><i class="icon-edit"></i></s:a> > > struts.xml > > <action name="edit/*" class="com.myapp.action.PersonAction" > method="getPersonById" > > <param name="id">{1}</param> > <interceptor-ref name="byPassValidation"/> > <result name="success" type="tiles">/person.edit.tiles</result> > </action> > > Action Class method > > public String getPersonById() throws Exception { > LOG.debug("getPersonById() = {} executed---->>>>", this.getId()); > return SUCCESS; > } > > CONSOLE -> Stacktrace > > 10:56:05,578 DEBUG DefaultActionProxy:68 - Creating an DefaultActionProxy > for namespace /person and action name edit/8 > 10:56:05,581 DEBUG AbstractMatcher:68 - Attempting to match 'edit/8' to a > wildcard pattern, 2 available > 10:56:05,581 DEBUG AbstractMatcher:68 - Value matches pattern 'edit/*' > 10:56:05,582 DEBUG ParametersInterceptor:68 - Setting params > 10:56:05,582 DEBUG DefaultWorkflowInterceptor:68 - Skipping Interceptor... > Method [getPersonById] found in exclude list. > 10:56:05,582 DEBUG DefaultActionInvocation:68 - Executing action method = > getPersonById > 10:56:05,583 DEBUG PersonAction:62 - getPersonById() = null executed---->>>>
I think the problem is how you defined your stack - it's missing a lot of other interceptors. Take a look how it is defined in Showcase App [1] [1] https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/showcase/src/main/resources/struts.xml Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org