Hello, I was wondering if someone might have insight into the following problem:
I have a struts-based application to which I have added a sub-application. When I try to directly access a .jsp file that belongs to the sub-application and has an <html:form> tag in it, I receive the following exception: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /doSomething at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:828) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:528) ..where the action "doSomething" is defined in the sub-application's struts-config.xml file. By looking at the tag library source code and doing some tests, I've discovered that the the cause of the problem might be here (the first few lines of the lookup method of FormTag): appConfig = (ApplicationConfig) pageContext.getRequest().getAttribute(Action.APPLICATION_KEY); if (appConfig == null) { // Backwards compatibility hack appConfig = (ApplicationConfig) pageContext.getServletContext().getAttribute(Action.APPLICATION_KEY); } It appears that the "backwards compatibility hack" is invoked, and the application config object is retrieved from the servlet context, rather than the request. Because the sub-application's config object is located under the key "Action.APPLICATION_KEY+"/subapplicationname" in the servlet context, the config object for the main application is retrieved, and consequently, the mapping for the action cannot be found. If this .jsp file is forwarded to by an action, however, the correct config object is retrieved from the request, and the page loads without exceptions. My question is, am I misunderstanding something? Or is there no support for this kind of operation? (meaning, just typing the URL of such a .jsp into a browser) Any suggestions would be appreciated. Thanks, Vlad -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>