Thanks Mark ! , it worked. On 3/13/07, Mark Shifman <[EMAIL PROTECTED]> wrote:
You should look at the source http://svn.apache.org/viewvc/struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/DispatchAction.java?view=markup and the javadoc > Method which is dispatched to when there is no value for specified > request parameter included in the request. Subclasses of > DispatchAction should override this method if they wish to provide > default behavior different than throwing a ServletException.overriding unspecified should do the trick > *protected* ActionForward unspecified(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) > *throws* Exception { > String message = > messages.getMessage(*"dispatch.parameter"*, mapping.getPath(), > mapping.getParameter()); > > log.error(message); > > *throw* *new* ServletException(message); > } mas Nitin Ahuja wrote: > Hi, > > I am using "DispatchAction" as my base action class. > > when submit url "http://.../myAction.do?action=view" and there is no > "view" method defined in my action class, then it throws following > exception. > > Is there any way to call a default method when the method "view" does > not exists ? > Or how can I redirect or forward the request to a default page ? > > javax.servlet.ServletException: Action[/myAction] does not contain > specified method (check logs) > at > org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) > > at > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) > > at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) > > at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) > at > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720) > > at > org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118) > > at > org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278) > > at java.security.AccessController.doPrivileged(Native Method) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274) > > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505) > > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212) > > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505) > > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203) > > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505) > > at > com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157) > > at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598) > > > Thanks, > -Nitin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- ........... "Yesterday I dared to struggle, today I dare to win." --- Bernadette Devlin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

