/**
* Return the current ModuleConfig object stored in request, if it exists,
* null otherwise.
* This method can be used by plugin to retrieve the current module config
* object. If no moduleConfig is found, this means that the request haven't
* hit the server throught the struts servlet. The appropriate module config
* can be set and found with
* <code>[EMAIL PROTECTED] RequestUtils#selectModule(HttpServletRequest, ServletContext)} </code>.
* @param request The servlet request we are processing
* @return the ModuleConfig object from request, or null if none is set in
* the request.
*/
public ModuleConfig getModuleConfig(HttpServletRequest request) { return (ModuleConfig) request.getAttribute(Globals.MODULE_KEY); }
That is in org.apache.struts.util.ModuleUtils.
The comments lead me to believe that you have some sort of configuration problem, which has caused a request to hit your form JSP without having gone through the Struts controller Servlet. Perhaps you have something wrong in web.xml?
Sorry I'm only guessing here. Maybe you should be more specific about what "exercise" you are trying and what version of Struts you are using.
Erik
T. B. wrote:
Hi all,
I am new to Struts and tried out some exercise but got this error. Any ideas why?
Thanks,
Thong Bui
========================================================= Here is the error I got:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.register_jsp._jspService(register_jsp.java:75) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773) org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481) org.apache.jsp.register_jsp._jspx_meth_form_form_0(register_jsp.java:91) org.apache.jsp.register_jsp._jspService(register_jsp.java:68) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]