Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Communication Patterns: A Guide for Developers and Architects
this week in the
Design and Architecture
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Struts
help me tell solve the following error
kumar nandha
Greenhorn
Posts: 6
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Register.jsp
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <html:form action="/Reg"> <table border="1"> <tr> <td>Name:</td> <td> <html:text property="name"/></td> </tr> <tr> <td> Age:</td> <td><html:password property="age"/></td> </tr> <tr> <td>Addrees:</td> <td><html:textarea cols="10" rows="5" property="addr"> enter address </html:textarea> </td> </tr> <tr> <td>Gender:</td> <td> <html:radio property="gender" value="M">MALE</html:radio> <html:radio property="gender" value="F">FEMALE</html:radio> </td> </tr> <tr> <td>Maritatal Status:</td> <td> <html:checkbox property="ms" value="mstatus">Married</html:checkbox></td> </tr> <tr> <td>Qualification:</td> <td> <html:select property="qul"> <html:option value="engg">Engineering</html:option> <html:option value="med">Medicine</html:option> <html:option value="arts">Arts</html:option> </html:select> </td> </tr> <tr> <td> Courses:</td> <td> <html:select multiple="yes" property="cour"> <html:option value="java">Java Package</html:option> <html:option value="test">Testing</html:option> </html:select> </td> </tr> <tr> <td>Hobbies:</td> <td><html:checkbox property="hb" value="reading"/>Reading Books</td> <td><html:checkbox property="hb" value="roaming"/>Roaming</td> </tr> <tr> <td><html:submit value="send"/></td> <td><html:reset value="reset"/></td> </tr> </table> </html:form>
RegisterForm
package com.form; import org.apache.struts.action.ActionForm; public class RegisterForm extends ActionForm { private String name; private int age; private String addr; private String gender; private String ms; private String qul; private String[] cour; private String[] hb; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getAddr() { return addr; } public void setAddr(String addr) { this.addr = addr; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getMs() { return ms; } public void setMs(String ms) { this.ms = ms; } public String getQul() { return qul; } public void setQul(String qul) { this.qul = qul; } public String[] getCour() { return cour; } public void setCour(String[] cour) { this.cour = cour; } public String[] getHb() { return hb; } public void setHb(String[] hb) { this.hb = hb; } }
RegisterAction
package com.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.form.RegisterForm; public class RegisterAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { RegisterForm rm=(RegisterForm) form; String name=rm.getName(); int age=rm.getAge(); String add=rm.getAddr(); String gen=rm.getGender(); String marital=rm.getMs(); String qual=rm.getQul(); String cor[]=rm.getCour(); String hb[]=rm.getHb(); if(age>=18) { request.setAttribute("msg","Eligible for vote"); } else { request.setAttribute("msg", "Eligible for not vote"); } request.setAttribute("name1", name); request.setAttribute("age1", age); request.setAttribute("add1", add); request.setAttribute("gen1", gen); request.setAttribute("marital1", marital); request.setAttribute("qual1", qual); request.setAttribute("cor", cor); request.setAttribute("hb", hb); return mapping.findForward("success"); } }
<?xml version="1.0" encoding="ISO-8859-1" ?> <!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> <form-beans> <form-bean name="regForm" type="com.form.RegisterForm"/> </form-beans> <action-mappings> <action path="/Reg" type="com.action.RegisterAction" name="regForm"> <forward name="success" path="/result.jsp"/> </action> </action-mappings> </struts-config>
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>StrutsExample1</display-name> <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> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>Register.jsp</welcome-file> </welcome-file-list> </web-app>
22 May, 2013 11:15:55 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jdk1.6.0_17\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jdk1.6.0_17/bin/../jre/bin/client;C:/Program Files (x86)/Java/jdk1.6.0_17/bin/../jre/bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Java\jdk1.6.0_17\bin 22 May, 2013 11:15:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:StrutsExample1' did not find a matching property. 22 May, 2013 11:15:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:LoginApplication' did not find a matching property. 22 May, 2013 11:15:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:RegisterApplication' did not find a matching property. 22 May, 2013 11:15:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:webapplication' did not find a matching property. 22 May, 2013 11:15:56 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-7070 22 May, 2013 11:15:56 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 839 ms 22 May, 2013 11:15:56 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina 22 May, 2013 11:15:56 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.32 22 May, 2013 11:15:56 PM org.apache.struts.action.ActionServlet initChain INFO: Loading chain catalog from jar:file:/G:/Practise/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/RegisterApplication/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml 22 May, 2013 11:15:57 PM org.apache.struts.action.ActionServlet initChain INFO: Loading chain catalog from jar:file:/G:/Practise/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/StrutsExample1/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml 22 May, 2013 11:15:58 PM org.apache.struts.action.ActionServlet initChain INFO: Loading chain catalog from jar:file:/G:/Practise/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/LoginApplication/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml 22 May, 2013 11:15:58 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-7070 22 May, 2013 11:15:58 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 22 May, 2013 11:15:58 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/44 config=null 22 May, 2013 11:15:58 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2707 ms 22 May, 2013 11:15:59 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException: Module 'null' not found. at org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755) at org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735) at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488) at org.apache.jsp.Register_jsp._jspx_meth_html_005fform_005f0(Register_jsp.java:125) at org.apache.jsp.Register_jsp._jspService(Register_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)
Kindly solve my problem
Joe Ess
Bartender
Posts: 9626
16
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please
UseCodeTags
. It preserves formatting and makes your code easier to read.
Have a look at this
FAQ Entry: Module Null
and see if that helps.
[
How To Ask Questions On JavaRanch
]
Arthur, where are your pants? Check under this tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Unable to compile class for JSP
javax.servlet.jsp.JspException: Cannot find bean: "registerForm" in scope: "session"
URL not found..TOmcat server error
to understand which *.MF to use
Struts 2 application using eclispe and tomcat 7
Give me explanation about following struts config file
Validation is not worked in strust
Struts2 Iterator Radio Tag Display Issue.
Initializing Spring FrameworkServlet 'appServlet'
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...