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
Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework
this week in the
Java in General
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
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Struts
Exception:500 org.apache.jasper.JasperException: java.lang.NullPointerException
raje shah
Greenhorn
Posts: 8
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am using netbeans 6.8,
struts
1.3 & glassfish v3 server.I am getting this exception .please help.
index.jsp
<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <jsp:forward page="Add.do"/>
struts-config.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd"> <struts-config> <form-beans> <form-bean name="pointForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property type="int" name="id" initial="-1"/> <form-property type="double" name="x" initial="0"/> <form-property type="double" name="y" initial="0"/> <form-property type="java.lang.String" name="color" /> </form-bean> </form-beans> <global-exceptions> </global-exceptions> <global-forwards > <forward name="add" path="/Add.do" /> </global-forwards> <action-mappings> <action path="Add" forward="add.jspx"/> </action-mappings> <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> <message-resources parameter="com/myapp/struts/ApplicationResource"/> <!-- ========================= Tiles plugin ===============================--> <!-- This plugin initialize Tiles definition factory. This later can takes some parameters explained here after. The plugin first read parameters from web.xml, thenoverload them with parameters defined here. All parameters are optional. The plugin should be declared in each struts-config file. - definitions-config: (optional) Specify configuration file names. There can be several comma separated file names (default: ?? ) - moduleAware: (optional - struts1.1) Specify if the Tiles definition factory is module aware. If true (default), there will be one factory for each Struts module. If false, there will be one common factory for all module. In this later case, it is still needed to declare one plugin per module. The factory will be initialized with parameters found in the first initialized plugin (generally the one associated with the default module). true : One factory per module. (default) false : one single shared factory for all modules - definitions-parser-validate: (optional) Specify if xml parser should validate the Tiles configuration file. true : validate. DTD should be specified in file header (default) false : no validation Paths found in Tiles definitions are relative to the main context. --> <plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> <set-property property="moduleAware" value="true" /> </plug-in> <!-- ========================= Validator plugin ================================= --> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> </plug-in> </struts-config>
add.jspx
<?xml version="1.0" encoding="UTF-8"?> <!-- Document : add Created on : Mar 4, 2012, 7:00:38 PM Author : Administrator --> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:html="http://struts.apache.org/tags-html" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:bean="http://struts.apache.org/tags-bean" version="2.0"> <jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/> <html:xhtml/> <html:html > <head> <title> <bean:message key="add.title"/> </title> </head> <body> <h1> <bean:message key="global.heading"/> <jsp:text></jsp:text> <bean:message key="add.heading"/> </h1> <html:errors/> <html:form action="/add"> <table class="addedit" > <tr> <td> <fmt:message key="pointForm.prompt.x"/> </td> <td><html:text name="pointForm" property="x"/></td> </tr> <tr> <td> <fmt:message key="pointForm.prompt.y"/> </td> <td><html:text name="pointForm" property="y"/></td> </tr> <tr> <td> <fmt:message key="pointForm.prompt.color"/> </td> </tr> <tr> <td> <html:submit> <fmt:message key="pointForm.add.submit"/> </html:submit> </td> </tr> </table> </html:form> </body> </html:html> </jsp:root>
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem with the form.
Parsing error processing resource path /WEB-INF/struts-config.xml
hi
Getting Http 404 Error while running Strut Application
Unable to find setter method for attribute: locale
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...