Re: Forward to exception page instead of result in case of ognl runtime exception ?

2014-06-12 Thread Lukasz Lenart
Define validation for this field, then you will get validation error and Struts will forward to input result 2014-06-12 7:48 GMT+02:00 Mohit Gupta motgu...@gmail.com: I have below action class where customerId is integer. If i pass customerId as string from UI(I know it should not be allowed

Re: Control Struts2 Tags with Conditional Tags

2014-06-12 Thread Lukasz Lenart
I'm not sure what do you want to achieve tags are rendered on server side and when user will interact with your webpage there will be just pure Html. You must send user selection back to server to allow re-render the page based on user choice and then s:if tag come into play. 2014-06-11

Issues in Struts2 unit testing

2014-06-12 Thread Krishnaraj A
Hi Team, Iam new to using Struts2 unit testing. Iam using the Struts 2 JUnit plugin http://struts.apache.org/2.3.1.2/docs/junit-plugin.html. The normal actions which is working fine. But I have issue when I am testing the action which has interceptor. action name=MainAdminPage

Re: Issues in Struts2 unit testing

2014-06-12 Thread Dave Newton
Without knowing what's in your interceptor stack it's impossible to help. Dave On Thu, Jun 12, 2014 at 11:11 AM, Krishnaraj A akrajmscjavaquest...@gmail.com wrote: Hi Team, Iam new to using Struts2 unit testing. Iam using the Struts 2 JUnit plugin

Re: Issues in Struts2 unit testing

2014-06-12 Thread Paul Benedict
Put a breakpoint in your execute() and see if it's being called. The error message might be telling the truth: the action has already been executed. Cheers, Paul On Thu, Jun 12, 2014 at 10:15 AM, Dave Newton davelnew...@gmail.com wrote: Without knowing what's in your interceptor stack it's

Re: Issues in Struts2 unit testing

2014-06-12 Thread Krishnaraj A
Hi Dave, I added my struts code. Junit Code: public class AdminValidation extends StrutsTestCase { @Test public void testUserNameErrorMessage() throws Exception { HttpSession session = request.getSession(); UserVO uservo1 =new UserVO();

Re: Issues in Struts2 unit testing

2014-06-12 Thread Krishnaraj A
Hi Paul, The control is not redirected to execute() method. Thanks Krishnaraj On Thu, Jun 12, 2014 at 8:48 PM, Paul Benedict pbened...@apache.org wrote: Put a breakpoint in your execute() and see if it's being called. The error message might be telling the truth: the action has already