View Single Post
  #5 (permalink)  
Old April 12th, 2006, 11:42 PM
suneel_agrawal suneel_agrawal is offline
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jon,

  I'm getting following error on JBoss:-
================================================== ===================
00:26:27,474 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException
        at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:254)
        at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
        at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.valves.CertificatesValve.invok e(CertificatesValve.java:246)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
        at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:171)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:509)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
        at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
        at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
        at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
        at java.lang.Thread.run(Thread.java:534)
00:26:27,474 ERROR [Engine] ----- Root Cause -----
java.lang.NullPointerException
        at org.apache.struts.taglib.TagUtils.retrieveMessageR esources(TagUtils.java:1175)
        at org.apache.struts.taglib.TagUtils.message(TagUtils .java:1038)
        at org.apache.struts.taglib.bean.MessageTag.doStartTa g(MessageTag.java:224)
        at org.apache.jsp.login_jsp._jspx_meth_bean_message_0 (login_jsp.java:102)
        at org.apache.jsp.login_jsp._jspService(login_jsp.jav a:68)
        at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:137)
        at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
        at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:210)
        at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
        at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.valves.CertificatesValve.invok e(CertificatesValve.java:246)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
        at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:171)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:509)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
        at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
        at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
        at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
        at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
        at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
        at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
        at java.lang.Thread.run(Thread.java:534)

================================================== ===================

I'm using following code:-
1) struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

<struts-config>

    <global-exceptions>
        <exception
         key = "global.error.invalidlogin"
         path = "/login.jsp"
         scope = "request"
         type = "com.oreilly.struts.banking.service.InvalidLoginEx ception"/>
    </global-exceptions>

    <global-forwards>
        <forward name = "SystemFailure" path = "/systemerror.jsp"/>
        <forward name = "SessionTimeOut" path = "/sessiontimeout.jsp"/>
    </global-forwards>

    <action
     path = "/login"
     type = "com.oreilly.struts.banking.action.LoginAction "
     scope = "request"
     name = "loginForm"
     validate = "true"
     input = "/login.jsp">
     <forward name = "Success" path = "/home.jsp" redirect = "true"/>
     <forward name = "Failure" path = "/login.jsp" redirect = "true"/>
    </action>

    <action
     path = "/logout"
     type = "com.oreilly.struts.banking.action.LogoutActio n"
     scope = "reuest">
     <forward name = "Success" path = "/login.jsp" redirect = "true"/>
    </action>

    <form-beans>
        <form-bean
         name = "loginForm"
         type = "com.oreilly.struts.banking.form.LoginForm"/>
        <form-bean
          name = "accountInformationForm"
          type = "org.apache.struts.action.DynaActionForm">
          <form-property name = "accounts" type = "java.util.ArrayList"/>
        </form-bean>
        <form-bean
        name = "accountDetailForm"
        type = "org.apache.struts.action.DynaActionForm">
        <form-property name = "view" type = "com.oreilly.struts.banking.view.AccountDetailView "/>
        </form-bean>
    </form-beans>

    <message-resources parameter="BaseResources" null="false" scope="application"/>
</struts-config>
2)web.xml
<?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>
    <servlet>
        <servlet-name>simpleloginapp</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>host</param-name>
            <param-value>localhost</param-value>
        </init-param>
        <init-param>
            <param-name>port</param-name>
            <param-value>7001</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>simpleloginapp</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <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>/WEB-INF/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
</web-app>
3)login.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

<html:html>
<% System.out.println("Hello++++333++");%>
    <head>
        <title><bean:message key="title.login"/></title>
    </head>
<% System.out.println("Hello---------------");%>
    <body>
    suneel
    </body>
</html:html>

4) BaseResources.properties
title.login = Struts Online Banking

I'm accessing login.jsp via http://localhost:8081/SimpleLoginApp/login.jsp


Please help !

Thanks,
Suneel.

Reply With Quote