A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Parameter in Action mapping in Struts config xml problem
Joined: May 20, 2008
Feb 17, 2011 12:35:03
<action path="/sample" type="SampleAction" parameter="sampleParam" name="SampleForm" scope="session"> <forward name="sampleForward" path="/SampleJSP.jsp"></forward> </action> 1. /sample.do?sampleParam=search 2. /sample.do 3. /sample.do?sampleParam=
1 is working fine.
2 is handled using unspecified method
3 is throwing unhandled exception
is there any better way to handle the 3rd case? In 3rd case I want to forward them to specified error page instead of common error page.
Any suggestions appreciated, Thanks.
Joined: Jan 30, 2011
Feb 18, 2011 08:59:19
Mark, provide more info regarding the 3 case (when, where and how it is happening).
Just to add, we can use global exceptions in struts-config with "type" attribute where we can define forward based on custom exception as well, but i didnt get the exact scenario of yours
Have Fun with Java
little,little.. little by little makes a lot..
I agree. Here's the link:
subject: Parameter in Action mapping in Struts config xml problem
How to use Formbean's validate method?
How to change the input attribute in the ActionForm ?
action mapping for pre-login
Can an action class forward to another action class?
why actionform gets reset?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015