Results 1 to 6 of 6
- 04-03-2008, 02:03 AM #1
Member
- Join Date
- Nov 2007
- Posts
- 50
- Rep Power
- 0
Problem with my first Struts program....please help me
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
My web.xml file isJava Code:<%@ 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>
Here is my struts-config.xml fileJava Code:<?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>
My preparation was stopped because of problem.Please help me.Java Code:<?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>
Thanks in advance.
sireesha.
- 04-03-2008, 01:18 PM #2
Member
- Join Date
- Apr 2008
- Location
- hyderabad
- Posts
- 11
- Rep Power
- 0
just comment out the struts tag lib in web.xml..
not specifies tag libs in web.xml because if u are creating new project and add struts capabilities all tld files and all supporting configuration files no need to specifies
- 04-03-2008, 06:43 PM #3
Member
- Join Date
- Nov 2007
- Posts
- 50
- Rep Power
- 0
Thanks,
I tried it but it didn't work for me.I am getting error again.
- 04-04-2008, 06:22 AM #4
Member
- Join Date
- Apr 2008
- Posts
- 1
- Rep Power
- 0
go for <html:form> instead of <form:form
- 04-04-2008, 06:33 AM #5
Member
- Join Date
- Apr 2008
- Posts
- 3
- Rep Power
- 0
- 10-16-2011, 04:19 PM #6
Member
- Join Date
- Oct 2011
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
Problem with Struts Menu
By sdp in forum Advanced JavaReplies: 4Last Post: 10-02-2009, 02:13 AM -
in struts reset was problem
By sureshBabu in forum Web FrameworksReplies: 1Last Post: 05-07-2008, 03:26 PM -
Problem with my program HelloWorld
By trill in forum New To JavaReplies: 1Last Post: 08-05-2007, 05:32 PM -
getting problem in compiling java program?
By sathish04021984 in forum New To JavaReplies: 3Last Post: 07-30-2007, 09:26 AM -
Struts problem
By ziniestro in forum Web FrameworksReplies: 2Last Post: 05-10-2007, 05:41 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks