struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oussama Jlassi <oussa...@live.fr>
Subject exception when running my struts jsp
Date Wed, 07 Mar 2012 22:02:48 GMT

i use struts 1.3.10in tomcat 6 when i run the url all i got http 500 how to solve my problem
localhost:8080/struts1/login.jsp i gotEtat HTTP 500 -type Rapport d'exceptionmessagedescription
Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.exceptionorg.apache.jasper.JasperException:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve definition
for form bean: "Loginform" on action: "/Login"
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mèrejavax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve
definition for form bean: "Loginform" on action: "/Login"
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
	org.apache.jsp.login_jsp._jspService(login_jsp.java:91)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mèrejavax.servlet.jsp.JspException: Cannot retrieve definition for form bean: "Loginform"
on action: "/Login"
	org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:881)
	org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488)
	org.apache.jsp.login_jsp._jspx_meth_html_005fform_005f0(login_jsp.java:173)
	org.apache.jsp.login_jsp._jspx_meth_html_005fhtml_005f0(login_jsp.java:124)
	org.apache.jsp.login_jsp._jspService(login_jsp.java:82)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note La trace complète de la cause mère de cette erreur est disponible dans les fichiers
journaux de Apache Tomcat/6.0.35.Apache Tomcat/6.0.35
localhost:8080/struts1/index2.jsp i gotEtat HTTP 500 -type Rapport d'exceptionmessagedescription
Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.exceptionorg.apache.jasper.JasperException:
javax.servlet.ServletException: java.lang.NullPointerException
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mèrejavax.servlet.ServletException: java.lang.NullPointerException
	org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
	org.apache.jsp.index2_jsp._jspService(index2_jsp.java:57)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mèrejava.lang.NullPointerException
	HelloWorldAction.execute(HelloWorldAction.java:18)
	org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
	org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
	org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
	org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
	org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709)
	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680)
	org.apache.jsp.index2_jsp._jspService(index2_jsp.java:57)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note La trace complète de la cause mère de cette erreur est disponible dans les fichiers
journaux de Apache Tomcat/6.0.35.Apache Tomcat/6.0.35login.jsp<%@ page language="java"
pageEncoding="ISO-8859-1"%><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"
%><%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"  %><%@ taglib
uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">    <head>        <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">        <title>JSP Page</title>    </head>    <body>
       <div style="color:red">            <html:errors />        </div>
     <html:form action="/Login">           User Name : <html:text name="LoginForm"
property="userName" /> <br>            Password  : <html:password name="LoginForm"
property="password" /> <br>            <html:submit value="login" />      </html:form>
</form><!-- <html:text styleClass="champ" property="login"></html:text>
-->    </body></html:html>
index2.jsp<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%>
<jsp:forward page="helloworld.do"/>
helloWorld.jsp<%@page contentType="text/html" pageEncoding="UTF-8"%><%@ taglib prefix="html"
uri="http://struts.apache.org/tags-html" %><%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"
%><%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %><!DOCTYPE
HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd">
<html>    <head>        <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">        <title>Hello World</title>    </head>    <body>
       <h1><bean:write name="HelloWorldAction" property="message"></bean:write></h1>
   </body></html>
struts-config.xml<?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE struts-config
PUBLIC          "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"        
 "http://struts.apache.org/struts/dtds/struts-config_1_3.dtd">

<struts-config>        	<form-beans>		<form-bean name="loginform " type="LoginForm
"/>		<form-bean name="helloWorldForm" type="HelloWorldForm"/>	</form-beans>
	<action-mappings>		                <action input="/login.jsp" name="Loginform" path="/Login"
 scope="request" validate="true"                type="LoginAction">                   
   <forward name="success" path="/success.jsp" />                       <forward
name="failure" path="/failure.jsp" />                </action>
               <action input="/index2.jsp" name="HelloWorldForm" path="/helloworld"   
            scope="session" type="HelloWorldAction">                      <forward name="success"
path="/helloWorld.jsp" />
               </action>	</action-mappings>
<message-resources parameter="ApplicationResource"/></struts-config>


 		 	   		   		 	   		   		 	   		  
Mime
View raw message