0 Replies Latest reply on Mar 25, 2003 10:04 AM by 3004

    default error-page question for whom have experience

    3004
      I search the forum, there are more than ten similiar questions, but seems no
                answer. Hope weblogic expert can help.
                
                I have javax.servlet.ServletException on jsp page. If I define errror page
                in web.xml, it can not catch error. But if I define errorpage directive on
                each jsp, it works.
                in jsp it work
                <%@ page errorpage="general_error.jsp" >
                
                in web.xml it do not work. why?
                <error-page>
                <exception-type>javax.servlet.ServletException</exception-type>
                <location>/general_error.jsp</location> //include full path or
                webapp/general_error.jsp
                //or general_error.jsp only
                </error-page>
                
                
                I use j2ee petstore WAF(web application framework) and struts for web tier.
                Included is web.xml and error info. <error-code>404</error-code> also works
                well.
                
                
                Error from console: (this is a error I create to test error in jsp, I delete
                a getter method for a bean. The jsp use struts bean write to output bean
                property)
                
                insertTag screen=[Screen: name=ticket-list, parameters={body=[Parameter:
                key=bod
                y, value=/TicketList.jsp, direct=false], title=[Parameter: key=title,
                value=Welc
                ome to TicketList page, direct=true]}]
                parameter=body
                direct=false
                getKey=body
                para key=body
                getValue=/TicketList.jsp
                para value=/TicketList.jsp
                doEndtag...
                getValue=/TicketList.jsp
                doEndtag 2/TicketList.jsp
                getValue=/TicketList.jsp
                getValue=/TicketList.jsp
                [Loaded jsp_servlet.__ticketlist]
                [Loaded org.apache.struts.taglib.html.ErrorsTag]
                [Loaded javax.servlet.jsp.tagext.BodyTagSupport]
                [Loaded org.apache.struts.taglib.logic.IterateTag]
                [Loaded org.apache.struts.taglib.bean.WriteTag]
                [Loaded jsp_servlet.__ticketlist]
                [Loaded org.apache.struts.util.MessageResources]
                [Loaded org.apache.struts.util.MessageResourcesFactory]
                [Loaded org.apache.struts.util.PropertyMessageResourcesFactory]
                [Loaded org.apache.struts.util.PropertyMessageResources]
                [Loaded org.apache.struts.action.ActionErrors]
                [Loaded org.apache.struts.util.RequestUtils]
                [Loaded org.apache.struts.util.PropertyUtils]
                [Loaded java.beans.IntrospectionException from
                d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.FeatureDescriptor from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.PropertyDescriptor from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded org.apache.struts.util.FastHashMap]
                [Loaded java.beans.Introspector from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.BeanInfo from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.BeanDescriptor from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.Introspector$1 from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.EventSetDescriptor from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.MethodDescriptor from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.SimpleBeanInfo from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.GenericBeanInfo from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded java.beans.IndexedPropertyDescriptor from
                d:\bea\jdk131_03\jre\lib\rt.ja
                r]
                [Loaded org.apache.struts.util.ResponseUtils]
                [Loaded java.io.CharArrayReader from d:\bea\jdk131_03\jre\lib\rt.jar]
                [Loaded weblogic.servlet.internal.CharChunkOutput]
                [Loaded java.beans.PropertyVetoException from
                d:\bea\jdk131_03\jre\lib\rt.jar]
                javax.servlet.ServletException: No getter method for property inputDate of
                bean
                ticket
                at
                weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextI
                mpl.java:280)
                at jsp_servlet.__ticketlist._jspService(TicketList.jsp:29)
                at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
                at
                weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                (ServletStubImpl.java:945)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:332)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:376)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:242)
                at
                weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
                cherImpl.java:539)
                at
                weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
                cherImpl.java:368)
                at
                com.sun.j2ee.blueprints.waf.view.template.tags.InsertTag.doEndTag(Unk
                nown Source)
                at jsp_servlet.__template._jspService(template.jsp:16)
                at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
                at
                weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                (ServletStubImpl.java:945)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:332)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:376)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:242)
                at
                weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(Req
                uestDispatcherImpl.java:341)
                at
                weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
                eManager.java:721)
                at
                weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
                cherImpl.java:251)
                at
                com.sun.j2ee.blueprints.waf.view.template.TemplateServlet.insertTempl
                ate(Unknown Source)
                at
                com.sun.j2ee.blueprints.waf.view.template.TemplateServlet.process(Unk
                nown Source)
                at
                com.sun.j2ee.blueprints.waf.view.template.TemplateServlet.doPost(Unkn
                own Source)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at
                weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                (ServletStubImpl.java:945)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:332)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:242)
                at
                weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(Req
                uestDispatcherImpl.java:341)
                at
                weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
                eManager.java:721)
                at
                weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
                cherImpl.java:251)
                at
                com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doProcess(Unkn
                own Source)
                at
                com.sun.j2ee.blueprints.waf.controller.web.MainServlet.doPost(Unknown
                Source)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at
                weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                (ServletStubImpl.java:945)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:332)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:242)
                at
                weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(Req
                uestDispatcherImpl.java:341)
                at
                weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
                eManager.java:721)
                at
                weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
                cherImpl.java:251)
                at
                weblogicx.jsp.tags.validators.Summary.processRedirect(Summary.java:20
                6)
                at weblogicx.jsp.tags.validators.Summary.doStartTag(Summary.java:67)
                at jsp_servlet.__getbyrange._jspService(getByRange.jsp:7)
                at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
                at
                weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                (ServletStubImpl.java:945)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:332)
                at
                weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
                pl.java:242)
                at
                weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
                n.run(WebAppServletContext.java:5360)
                at
                weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
                eManager.java:721)
                at
                weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
                rvletContext.java:3043)
                at
                weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
                pl.java:2468)
                at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
                at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
                InsertTag:doEndTag caught: javax.servlet.ServletException: No getter method
                for
                property inputDate of bean ticket
                insertTag screen=[Screen: name=ticket-list, parameters={body=[Parameter:
                key=bod
                y, value=/TicketList.jsp, direct=false], title=[Parameter: key=title,
                value=Welc
                ome to TicketList page, direct=true]}]
                parameter=footer
                direct=false
                para null
                doEndtag...
                
                
                web.xml
                <?xml version="1.0" encoding="ISO-8859-1"?>
                <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application
                2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
                <web-app>
                <display-name>WAF WebTier Components</display-name>
                <description>Web Tier DD for the PetStore application</description>
                <context-param>
                <param-name>weblogic.httpd.inputCharset./*</param-name>
                <param-value>GBK</param-value>
                </context-param>
                <!-- Service Locator Class -->
                <listener>
                
                <listener-class>com.sun.j2ee.blueprints.waf.controller.web.ServiceLocatorImp
                l</listener-class>
                </listener>
                <servlet>
                <servlet-name>webTierEntryPoint</servlet-name>
                <display-name>HTML Client Front Controller Servlet</display-name>
                <description>no description</description>
                
                <servlet-class>com.sun.j2ee.blueprints.waf.controller.web.MainServlet</servl
                et-class>
                </servlet>
                <!-- Template Servlet Configuration -->
                <servlet>
                <servlet-name>TemplateServlet</servlet-name>
                <display-name>Template Servlet</display-name>
                
                <servlet-class>com.sun.j2ee.blueprints.waf.view.template.TemplateServlet</se
                rvlet-class>
                <init-param>
                <param-name>languages</param-name>
                <param-value>en_US</param-value>
                </init-param>
                <init-param>
                <param-name>default_language</param-name>
                <param-value>en_US</param-value>
                </init-param>
                <load-on-startup>2</load-on-startup>
                </servlet>
                <!-- Template Servlet Mapping -->
                <servlet-mapping>
                <servlet-name>TemplateServlet</servlet-name>
                <url-pattern>*.screen</url-pattern>
                </servlet-mapping>
                <!-- Template Servlet Configuration Complete -->
                <servlet-mapping>
                <servlet-name>webTierEntryPoint</servlet-name>
                <url-pattern>*.do</url-pattern>
                </servlet-mapping>
                <session-config>
                <session-timeout>54</session-timeout>
                </session-config>
                <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
                </welcome-file-list>
                <error-page>
                <error-code>404</error-code>
                <location>/general_error.jsp</location>
                </error-page>
                <error-page>
                <exception-type>java.lang.Exception</exception-type>
                <location>/general_error.jsp</location>
                </error-page>
                <error-page>
                <exception-type>javax.servlet.ServletException</exception-type>
                <location>/general_error.jsp</location>
                </error-page>
                <error-page>
                
                <exception-type>weblogic.servlet.jsp.PageContextImpl.handlePageException</ex
                ception-type>
                <location>/general_error.jsp</location>
                </error-page>
                
                
                <!-- Struts Tag Library Descriptors -->
                <taglib>
                <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
                <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
                </taglib>
                <taglib>
                <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
                <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
                </taglib>
                <taglib>
                <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
                <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
                </taglib>
                <taglib>
                <taglib-uri>validatorTag</taglib-uri>
                <taglib-location>/WEB-INF/lib/weblogic-vtags.jar</taglib-location>
                </taglib>
                <!-- Service Locator Class -->
                <env-entry>
                <description>Define the implementation class of the Service
                Locator</description>
                <env-entry-name>web/controller/ServiceLocatorImpl</env-entry-name>
                
                <env-entry-value>com.sun.j2ee.blueprints.waf.controller.web.ServiceLocatorIm
                pl</env-entry-value>
                <env-entry-type>java.lang.String</env-entry-type>
                </env-entry>
                <!-- Web Controller Proxy Class -->
                <env-entry>
                <description>Define the implementation class of the Web Client
                Crontroller</description>
                <env-entry-name>web/controller/WebClientControllerImpl</env-entry-name>
                
                <env-entry-value>com.sun.j2ee.blueprints.waf.controller.web.WebClientControl
                lerImpl</env-entry-value>
                <env-entry-type>java.lang.String</env-entry-type>
                </env-entry>
                <ejb-local-ref>
                <ejb-ref-name>ejb/controller/EJBController</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                
                <local-home>>com.sun.j2ee.blueprints.waf.controller.ejb.EJBClientControllerL
                ocalHome</local-home>
                
                <local>com.sun.j2ee.blueprints.waf.controller.ejb.EJBClientControllerLocal</
                local>
                <ejb-link>TheEJBClientController</ejb-link>
                </ejb-local-ref>
                <ejb-local-ref>
                <ejb-ref-name>ejb/session/local/ticket</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                <local-home>com.netsboss.ticketMg.TicketSessionLocalHome</local-home>
                <local>com.netsboss.ticketMg.TicketSessionLocal</local>
                <ejb-link>TicketSession</ejb-link>
                </ejb-local-ref>
                </web-app>