-none- 2007-08-14 - By ddu
Back
I am migrating an existing system(runs on Struts 1.1) to Struts 1.3.8 basically because I want to take advantage of EventActionDispatcher.
I also use tiles, however I keep getting the following error msg:
WARNING: Unhandled exception java.lang.IllegalArgumentException: path must begin with a "/" at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApplication .java:1668)
I tried a couple of things and none of them worked. tiles works fine in the existing system. Here are the codes:
action: public class DefaultAction extends DispatchAction { protected ActionDispatcher dispatcher = new EventActionDispatcher(this);
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return dispatcher.execute(mapping, form, request, response); }
public ActionForward login(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mapping.findForward("waterbodyList"); }
struts-config.xml <action name="defaultForm" path="/default" input="/default.jsp" scope="request" parameter="login,default=unspecified" type="com.tetratech.fac.app.action.DefaultAction"> <forward name="success" path="/index.jsp"/> <forward name="waterbodyList" path=".waterbodyList"/> <forward name="loeList" path=".loeList"/> <forward name="userManagement" path="/userManagement.do"/> <forward name="adminManagement" path=".adminManagement"/> <forward name="addNewLoe" path="/addNewLoe.do"/> <forward name="categoryMain" path=".categoryMain"/> <forward name="reportsMain" path=".reportsMain"/> <forward name="decisionsMain" path=".decisionsMain"/> </action>
tiles-defs.xml <tiles-definitions> <definition name="basicLayout" path="/templates/basicLayout.jsp"> <put name="title" value="California SWRCB - Assessment Facts Database v2.0" type="string"/> <put name="pageTitle" value="FAC" type="string"/> <put name="header" value="../appheader.jsp" type="page"/> <put name="body" value="../app/index.jsp" type="page"/> </definition> <definition name=".waterbodyList" extends="basicLayout"> <put name="pageTitle" value="Waterbody List" type="string"/> <put name="header" value="../appheader.jsp" type="page"/> <put name="body" value="../app/waterbodyList.jsp"/> </definition> </tiles-definitions>
thanks! David -- View this message in context: http://www.nabble.com/trouble-with-Tiles-and -EventActionDispatcher-tf4268798.html#a12149357 Sent from the Struts - User mailing list archive at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|