struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adam pinder <apin...@hotmail.co.uk>
Subject RE: Error creating form bean struts 1.2 + weblogic 8.1 + myeclipse 5.5
Date Thu, 01 Apr 2010 12:56:52 GMT

 
seems like form definition isn't in struts config file or properly defined....

----------------------------------------
> Date: Thu, 1 Apr 2010 11:45:42 +0000
> To: user@struts.apache.org
> Subject: Error creating form bean struts 1.2 + weblogic 8.1 + myeclipse 5.5
> From: nanukhota@rediffmail.com
>
> Hi All,
> I am a newbee to struts and trying some hands on it. I was just trying to develop a simple
login form but getting following exception on initial run only.
> ---------------------------------------------------------------------------------------------
> SEVERE: Error creating form bean of class com.abc.struts.form.LoginFormjava.lang.NullPointerExceptionat
org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:212)at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:292)at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:191)at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:477)at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:457)at jsp_servlet.__login._jspService(__login.java:196)at
weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
> ---------------------------------------------------------------------------------------------
> I tried searching thru all forums from last 2 days but could not found any solution to
the issue. This seems to be a very common problem but I don't know why its not going away.
I am really stuck up.
> Below are the listing of files required to analyize the cause of error.
> web.xml------------<?xml version="1.0" encoding="UTF-8"?><!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>
 <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>3</param-value>    </init-param>    <init-param>
     <param-name>detail</param-name>   &
> nbsp;  <param-value>3</param-value>    </init-param>    <load-on-startup>0</load-on-startup>
 </servlet>  <servlet-mapping>    <servlet-name>action</servlet-name>
   <url-pattern>*.do</url-pattern>  </servlet-mapping>  <welcome-file-list>
   <welcome-file>index.jsp</welcome-file>  </welcome-file-list>  <taglib>
  <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
 </taglib></web-app>
> index.jsp---------......<body>    <html:link page="/home.do">Login</html:link>
 </body>.....
> struts-config.xml-----------------<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE
struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
> <struts-config>  <data-sources />  <form-beans>    <form-bean name="loginForm"
type="com.siemens.struts.form.LoginForm" />
>   </form-beans>
>   <global-exceptions />  <global-forwards />  <action-mappings>   
<action      attribute="loginForm"      name="loginForm"      path="/empLogin"      scope="request"
     type="com.siemens.struts.action.EmpLoginAction"      validate="false" />         
<action forward="/Login.jsp" path="/home" />
>   </action-mappings>
>   <message-resources parameter="com.siemens.struts.ApplicationResources" /></struts-config>
> Login.jsp---------
> <body>    <html:form action="/empLogin" method="post" focus="login">    
 <table border="0">        <tr>          <td>Login:</td>         
<td><html:text property="login" /></td>        </tr>        <tr>
         <td>Password:</td>          <td><html:password property="password"
/></td>        </tr>        <tr>          <td colspan="2" align="center"><html:submit>Login</html:submit></td>
   &nbs
> p;   </tr>      </table>    </html:form>  </body>
> I can also provide the form bean and action class if required but I believe it won't
add to solving the problem as the exception occurs when I click on the link on index.jsp and
then it tries to render the Login.jsp.
> Please help.
> Nanu
>   		 	   		  
_________________________________________________________________
Send us your Hotmail stories and be featured in our newsletter
http://clk.atdmt.com/UKM/go/195013117/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message