aspose file tools
The moose likes Struts and the fly likes html and bean tags not working in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "html and bean tags not working in struts" Watch "html and bean tags not working in struts" New topic
Author

html and bean tags not working in struts

Joy Mitra
Greenhorn

Joined: Jul 25, 2012
Posts: 1
jsp file

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<html:form action="CreateEmployee.do">
<!--<h1>Hello World</h1>
<input type ="submit" value = "Click"></input>
-->
<table>
<tr>
<td align="center" colspan="2">
<font size="4">Please Enter the Following Details</font>
</tr>
<tr>
<td align="right">
First Name
</td>
<td align="left">
<input type="text" name="firstName" size="30" maxlength="30"/>
</td>
</tr>
<tr>
<td align="right">
Last Name
</td>
<td align="left">
<input type="text" name="lastName" size="30" maxlength="30"/>
</td>
</tr>

<tr>
<td align="right">
Age
</td>
<td align="left">
<input type="text" name="age" size="10" maxlength="10"/>
</td>
</tr>

<tr>
<td align="right">
<button type="submit" value="Submit" >Submit</button>
</td>
<td align="left">
<button type="reset" value="Reset" >Reset</button>
</td>
</tr>
</table>

</html:form>
</body>
</html>


web.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<display-name>StrutsDemo</display-name>
<!-- Standard Action Servlet Configuration (with debugging)
-->
<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>



</servlet>
<!-- Standard Action Servlet Mapping
-->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- The Usual Welcome File List
-->
<welcome-file-list>
<welcome-file>/JSP/index.jsp</welcome-file>
</welcome-file-list>
<!-- Struts Tag Library Descriptors
-->
<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>

</web-app>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html and bean tags not working in struts
 
Similar Threads
error while creating struts application
wrong jar reference
Verification failed on Username existence check using AJAX
Getting null pointer Exception
struts-html.tld not found help me please