Originally Posted by
sireesha
Hi Everyone,
I just started learning Struts programing.But got an error in my first program.From 2 days I am working on that...and i tried different solutions from different sites...but i couldn't find solution.I got this code from a book.I am using NetBeans6.0.
I wrote the following files
Registration.jsp,
RegistrationAction.java,
RegistrationForm.java,
Success.html,
Failure.html,
web.xml,
struts-config.xml,
I am getting error in my Registration.jsp file.
that error is..
File"/WEB_INF/struts-form.tld"not found
Here is my .jsp file
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
<form:form action="Registration.do">
UserName:<form:text property="username"/><br>
enter password:<form:password property="password1"/><br>
re-enter password:<form:password property="password2"/><br>
<form:submit value="Register"/>
</form:form>
My web.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>com.action.ApplicationResources</param-value>
</init-param>
<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>
<!--Struts tag lib discriptions-->
<taglib>
<taglib-uri>/WEB-INF/struts-form.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-form.tld</taglib-location>
</taglib>
</web-app>
Here is my struts-config.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name="RegistrationForm" type="application.RegistrationForm"/>
</form-beans>
<action-mappings>
<action path="/Registration" name="RegistrationForm" type="application.RegistrationAction">
<forward name="success" path="/Success.html" />
<forward name="failure" path="/Failure.html" />
</action>
</action-mappings>
</struts-config>
My preparation was stopped because of problem.Please help me.
Thanks in advance.
sireesha.
hi, i hadbeen suffued too many problems like what u expline, thing is that netbeans id doen't implementing properly exceptionhandling meachnisam
solution is as possiblee as just change ur id ,just try it agin