Struts does not support multiple mappings.  See the first warning at
the bottom of 
http://struts.apache.org/userGuide/configuration.html#dd_config_mapping

Hubert

On Thu, 16 Dec 2004 21:18:18 +0530, uma.k <[EMAIL PROTECTED]> wrote:
> It doesn't make any difference as the same works in another context.
> 
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> Sent: Thursday, December 16, 2004 9:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: NullPointerException
> 
> Hmm -- I do see that you have two servlet mappings for the
> ActionServlet. You should only have one of these.
> 
> uma.k wrote:
> 
> > This is my web.xml file
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE web-app
> >     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> >     "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> >
> > <web-app>
> >
> >   <!-- Standard Action Servlet Configuration (with debugging) -->
> >   <servlet>
> >     <servlet-name>action</servlet-name>
> >     <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> >     <init-param>
> >       <param-name>config</param-name>
> >       <param-value>/WEB-INF/struts-config.xml</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>debug</param-name>
> >       <param-value>2</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>detail</param-name>
> >       <param-value>2</param-value>
> >     </init-param>
> >     <load-on-startup>2</load-on-startup>
> >   </servlet>
> >
> >   <!-- Standard Action Servlet Mapping -->
> >   <!-- if you use this then you need to give /do/somename in path -->
> >   <servlet-mapping>
> >     <servlet-name>action</servlet-name>
> >     <url-pattern>/do/*</url-pattern>
> >   </servlet-mapping>
> >
> >   <!-- if you use this then you need to give /somename.do in path -->
> >   <servlet-mapping>
> >     <servlet-name>action</servlet-name>
> >     <url-pattern>*.do</url-pattern>
> >   </servlet-mapping>
> >
> >   <!-- The Usual Welcome File List -->
> >   <welcome-file-list>
> >     <welcome-file>index.jsp</welcome-file>
> >   </welcome-file-list>
> >
> >
> >   <!-- Struts Tag Library Descriptors -->
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-bean</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> >   </taglib>
> >
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-html</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
> >   </taglib>
> >
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-logic</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
> >   </taglib>
> >
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-nested</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
> >   </taglib>
> >
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-tiles</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
> >   </taglib>
> >
> >   <taglib>
> >     <taglib-uri>jstl/c</taglib-uri>
> >     <taglib-location>/WEB-INF/c.tld</taglib-location>
> >   </taglib>
> >
> >
> > </web-app>
> >
> >
> >
> > -----Original Message-----
> > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow
> > Sent: Thursday, December 16, 2004 8:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: NullPointerException
> >
> >
> >
> > Wierd -- it looks to me from the original message that you are getting
> > the error on line 1219 of TagUtils which is:
> >
> >              resources =
> >                      (MessageResources) pageContext.getAttribute(
> >                              bundle + moduleConfig.getPrefix(),
> >                              PageContext.APPLICATION_SCOPE);
> >
> > This would seem to indicate that your 'moduleConfig' would be null.
> > What does your web.xml look like?
> >
> > uma.k wrote:
> >
> >
> >>If you look at the error message, I get NullPointer at this line in the
> >>generated java file
> >>
> >>int _jspx_eval_bean_message_0 = _jspx_th_bean_message_0.doStartTag();
> >>//NULLPOINTER
> >>
> >>package org.apache.jsp;
> >>
> >>import javax.servlet.*;
> >>import javax.servlet.http.*;
> >>import javax.servlet.jsp.*;
> >>import org.apache.jasper.runtime.*;
> >>
> >>
> >>public class index$jsp extends HttpJspBase {
> >>
> >>
> >>    static {
> >>    }
> >>    public index$jsp( ) {
> >>    }
> >>
> >>    private static boolean _jspx_inited = false;
> >>
> >>    public final void _jspx_init() throws
> >>org.apache.jasper.runtime.JspException {
> >>    }
> >>
> >>    public void _jspService(HttpServletRequest request,
> >
> > HttpServletResponse
> >
> >>response)
> >>        throws java.io.IOException, ServletException {
> >>
> >>        JspFactory _jspxFactory = null;
> >>        PageContext pageContext = null;
> >>        HttpSession session = null;
> >>        ServletContext application = null;
> >>        ServletConfig config = null;
> >>        JspWriter out = null;
> >>        Object page = this;
> >>        String  _value = null;
> >>        try {
> >>
> >>            if (_jspx_inited == false) {
> >>                synchronized (this) {
> >>                    if (_jspx_inited == false) {
> >>                        _jspx_init();
> >>                        _jspx_inited = true;
> >>                    }
> >>                }
> >>            }
> >>            _jspxFactory = JspFactory.getDefaultFactory();
> >>            response.setContentType("text/html;ISO-8859-1");
> >>            pageContext = _jspxFactory.getPageContext(this, request,
> >>response,
> >>                              "", true, 8192, true);
> >>
> >>            application = pageContext.getServletContext();
> >>            config = pageContext.getServletConfig();
> >>            session = pageContext.getSession();
> >>            out = pageContext.getOut();
> >>
> >>            // HTML // begin
> >>[file="/articles/index.jsp";from=(0,58);to=(1,0)]
> >>                out.write("\r\n");
> >>
> >>            // end
> >>            // HTML // begin
> >>[file="/articles/index.jsp";from=(1,58);to=(4,7)]
> >>                out.write("\r\n<html>\r\n<head>\r\n<title>");
> >>
> >>            // end
> >>            // begin [file="/articles/index.jsp";from=(4,7);to=(4,46)]
> >>                /* ----  bean:message ---- */
> >>                org.apache.struts.taglib.bean.MessageTag
> >>_jspx_th_bean_message_0 = new org.apache.struts.taglib.bean.MessageTag();
> >>                _jspx_th_bean_message_0.setPageContext(pageContext);
> >>                _jspx_th_bean_message_0.setParent(null);
> >>                _jspx_th_bean_message_0.setKey("title.employeeApp");
> >>                try {
> >>                    int _jspx_eval_bean_message_0 =
> >>_jspx_th_bean_message_0.doStartTag();
> >>                    if (_jspx_eval_bean_message_0 ==
> >>javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
> >>                        throw new JspTagException("Since tag handler class
> >>org.apache.struts.taglib.bean.MessageTag does not implement BodyTag, it
> >>can't return BodyTag.EVAL_BODY_TAG");
> >>                    if (_jspx_eval_bean_message_0 !=
> >>javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
> >>                        do {
> >>                        // end
> >>                        // begin
> >>[file="/articles/index.jsp";from=(4,7);to=(4,46)]
> >>                        } while (_jspx_th_bean_message_0.doAfterBody() ==
> >>javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
> >>                    }
> >>                    if (_jspx_th_bean_message_0.doEndTag() ==
> >>javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> >>                        return;
> >>                } finally {
> >>                    _jspx_th_bean_message_0.release();
> >>                }
> >>            // end
> >>            // HTML // begin
> >>[file="/articles/index.jsp";from=(4,46);to=(7,4)]
> >>                out.write("</title>\r\n</head>\r\n<body>\r\n<h1>");
> >>
> >>            // end
> >>            // begin [file="/articles/index.jsp";from=(7,4);to=(7,43)]
> >>                /* ----  bean:message ---- */
> >>                org.apache.struts.taglib.bean.MessageTag
> >>_jspx_th_bean_message_1 = new org.apache.struts.taglib.bean.MessageTag();
> >>                _jspx_th_bean_message_1.setPageContext(pageContext);
> >>                _jspx_th_bean_message_1.setParent(null);
> >>                _jspx_th_bean_message_1.setKey("title.employeeApp");
> >>                try {
> >>                    int _jspx_eval_bean_message_1 =
> >>_jspx_th_bean_message_1.doStartTag();
> >>                    if (_jspx_eval_bean_message_1 ==
> >>javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
> >>                        throw new JspTagException("Since tag handler class
> >>org.apache.struts.taglib.bean.MessageTag does not implement BodyTag, it
> >>can't return BodyTag.EVAL_BODY_TAG");
> >>                    if (_jspx_eval_bean_message_1 !=
> >>javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
> >>                        do {
> >>                        // end
> >>                        // begin
> >>[file="/articles/index.jsp";from=(7,4);to=(7,43)]
> >>                        } while (_jspx_th_bean_message_1.doAfterBody() ==
> >>javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
> >>                    }
> >>                    if (_jspx_th_bean_message_1.doEndTag() ==
> >>javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> >>                        return;
> >>                } finally {
> >>                    _jspx_th_bean_message_1.release();
> >>                }
> >>            // end
> >>            // HTML // begin
> >>[file="/articles/index.jsp";from=(7,43);to=(9,0)]
> >>                out.write("</h1>\r\n<br>\r\n");
> >>
> >>            // end
> >>            // begin [file="/articles/index.jsp";from=(9,0);to=(9,34)]
> >>                /* ----  html:link ---- */
> >>                org.apache.struts.taglib.html.LinkTag _jspx_th_html_link_0
> >
> > =
> >
> >>new org.apache.struts.taglib.html.LinkTag();
> >>                _jspx_th_html_link_0.setPageContext(pageContext);
> >>                _jspx_th_html_link_0.setParent(null);
> >>                _jspx_th_html_link_0.setPage("/do/articleForm");
> >>                try {
> >>                    int _jspx_eval_html_link_0 =
> >>_jspx_th_html_link_0.doStartTag();
> >>                    if (_jspx_eval_html_link_0 !=
> >>javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
> >>                        try {
> >>                            if (_jspx_eval_html_link_0 !=
> >>javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
> >>                              out = pageContext.pushBody();
> >>
> >>_jspx_th_html_link_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent)
> >>out);
> >>                              _jspx_th_html_link_0.doInitBody();
> >>                          }
> >>                          do {
> >>                          // end
> >>                          // HTML // begin
> >>[file="/articles/index.jsp";from=(9,34);to=(9,48)]
> >>                              out.write("Add An Article");
> >>
> >>                          // end
> >>                          // begin
> >>[file="/articles/index.jsp";from=(9,48);to=(9,60)]
> >>                          } while (_jspx_th_html_link_0.doAfterBody() ==
> >>javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
> >>                      } finally {
> >>                          if (_jspx_eval_html_link_0 !=
> >>javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
> >>                              out = pageContext.popBody();
> >>                      }
> >>                  }
> >>                  if (_jspx_th_html_link_0.doEndTag() ==
> >>javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> >>                      return;
> >>              } finally {
> >>                  _jspx_th_html_link_0.release();
> >>              }
> >>          // end
> >>          // HTML // begin
> >>[file="/articles/index.jsp";from=(9,60);to=(13,0)]
> >>              out.write("\r\n</body>\r\n</html>\r\n\r\n");
> >>
> >>          // end
> >>
> >>      } catch (Throwable t) {
> >>          if (out != null && out.getBufferSize() != 0)
> >>              out.clearBuffer();
> >>          if (pageContext != null) pageContext.handlePageException(t);
> >>      } finally {
> >>          if (_jspxFactory != null)
> >>_jspxFactory.releasePageContext(pageContext);
> >>      }
> >>  }
> >>}
> >>
> >>Any ideas why its getting NULL there?
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
> 
>

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

Reply via email to