Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error in struts-html.tld file

 
jethin chandran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i tried a simple struts application where there is a jsp page and struts.
I copied the struts-html.tld in the WEB-INF folder and used
the directive<%@ taglib uri="\WEB-INF\struts-html.tld" prefix="html"%>
so that i could use<html:form>,<html:text> etc.
But when i tried to run the application i am getting an eror that
required tag class is not found..
can anyone help me???
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using Struts 1.3.5 or above, you should be using the newer method of accessing the Struts taglibs, which is by their namespace, rather than their physical location. Just remove all TLDs from your WEB-INF directory and from your web.xml file and make sure that struts-taglib-1.3.x.jar is in your WEB-INF/lib directory. Then Declare the taglibs as follows:

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jethin,

One other thing I need to mention:

The name you are currently displaying does not meet the guidelines of the JavaRanch Naming Policy. In particular, the name you display must be a first and last name, and must not be obviously fictitious. Please change the Publicly Displayed Name in your user profile so that it meets the guidelines.

This may seem trivial to you, but it's an important part of the culture at JavaRanch, and we do appreciate your compliance with it.
 
jethin chandran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Merril,
Thank you so much for your solution..
It is necessary that i should abide by the naming policies and i will be displaying name according to the community policy..
Thank you
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic