I am using netbeans 6.8 + struts 1.3 + glassfish v3.I am not able to open add.jspx which contains add form.please help.
index.jsp
[code]
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
struts-config.xml [code] <?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" /> <forward name="welcome" path="/Welcome.do"/> </global-forwards> <action-mappings> <action path="Add" forward="add.jspx"/> <action path="/Welcome" forward="/welcomeStruts.jsp"/> </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> [/code] add.jspx [code] <?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> [/code] web.xml [code] <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <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>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</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> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <jsp-config> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> </jsp-config> </web-app> [/code]
Ads