Your form bean name does not match the name used in the action's configuration. Dave On Wednesday, March 7, 2012, Oussama Jlassi wrote: > i use struts 1.3.10 > in tomcat 6 when i run the url all i got http 500 how to solve my problem > localhost:8080/struts1/login.jsp i got > > Etat HTTP 500 - > > ________________________________ > > type Rapport d'exception > > message > > description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête. > > exception > > org.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ère > > javax.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ère > > javax.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 got > > Etat HTTP 500 - > > ________________________________ > > type Rapport d'exception > > message > > description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête. > > exception > > org.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ère > > javax.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ère > > java.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.35 > > login.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" %> > > > > > JSP Page > > >
> >
> > User Name :
> Password :
> >
> > > >
> index2.jsp > <%@page contentType="text/html"%> > <%@page pageEncoding="UTF-8"%> > > 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" %> > "http://www.w3.org/TR/html4/loose.dtd"> > > > > Hello World > > >

> > > struts-config.xml > > "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" > "http://struts.apache.org/struts/dtds/struts-config_1_3.dtd"> > > > > > > > > > type="LoginAction"> > > > > scope="session" type="HelloWorldAction"> > > > > > > > >