This is my application error log,

DEBUG - Path Based Include
DEBUG - insert page='/portal/forms.jsp'.
DEBUG - servletPath=/portal/forms.jsp, pathInfo=null, queryString=null, name=null
DEBUG - Path Based Include
ERROR - Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.portal.forms_jsp._jspService(org.apache.jsp.portal.forms_jsp:52)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)


This is the forms.jsp,

<%@ page import="java.util.*" %>

<html>
<body>
<h1 align="center">Forms Listing</h1>
<p>

<%
 ArrayList forms = (ArrayList)request.getAttribute("forms");
 Iterator it = forms.iterator();

 while(it.hasNext()) {
   out.print("<br>try " + it.next());
 }

%>

</body>
</html>

...and this is the code that sets the attribute forms.jsp is tryimng to access,

public final class RetrieveFormAction extends Action {

private final static Logger log = Logger.getLogger(RetrieveFormAction.class);

public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response)
//throws IOException, ServletException {
throws Exception {


        ArrayList forms = new ArrayList();
       String userName = ((LogonForm) form).getUsername();

        DataSource dataSource = getDataSource(request, "userDB");
        Connection conn = dataSource.getConnection();
        Statement stmt = conn.createStatement();

        ArrayList result = forms;
        request.setAttribute("forms", result);
        return mapping.findForward("show_forms");

 }
}

What is it?

Jim

From: "David G. Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: Mapping issue
Date: Wed, 15 Dec 2004 19:31:14 -0500

Have you checked your application server's log files to see if there were
any Struts startup errors?  Where are you putting the "struts-conf" file?
Are you putting it in the file "/WEB-INF/struts-config.xml"?

Regards,
David

-----Original Message-----
From: Jim Douglas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 15, 2004 7:17 PM
To: [EMAIL PROTECTED]
Subject: Mapping issue


To all,

This is my error message in the browser,

javax.servlet.ServletException: Cannot retrieve mapping for action
/SelectUser

The class files are in the right place.  This is struts-conf,

<form-beans>
    <form-bean name="ReturnStudentForms"
               type="app.model.FormsSelect" />
  </form-beans>

<action-mappings>

  <action-mappings>
    <action path="/SelectUser"
            type="app.web.RetrieveFormAction"
            name="ReturnStudentForms" scope="request"
            validate="true" input="/portal/user.jsp">
        <forward name="show_forms"
                 path="/portal/forms.jsp" />
    </action>
  </action-mappings>


Thanks, Jim



---------------------------------------------------------------------
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]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to