File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes regarding updating web.xml with struts1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "regarding updating web.xml with struts1.1" Watch "regarding updating web.xml with struts1.1" New topic
Author

regarding updating web.xml with struts1.1

k srinivas
Greenhorn

Joined: May 31, 2004
Posts: 4
Hi All
Can any one let me know as what tld files should i specify in the web.xml file if we are using struts1.1 because im getting a error whenever im trying to invoke a jsp through my browser

The following is the error im getting.............
Im using JRun3.1

java.lang.NoClassDefFoundError
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:795)
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi Srinivas,

Please add these code in your web.xml file at appropriate position, I mean
before this tag ends. </web-app>

<taglib id="TagLibRef_1">
<taglib-uri>/WEB-INF/app.tld</taglib-uri>
<taglib-location>/WEB-INF/app.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_2">
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_3">
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_4">
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib id="TagLibRef_5">
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>

And also Please don't forget to refer tld files in ur JSP's at top in this way....

<%@ 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" %>


thanks
Anurag


SCJP 1.2
k srinivas
Greenhorn

Joined: May 31, 2004
Posts: 4
Hi Thanks for the response,
But what is this app.tld i do not have any such file? apart from that i have updated my web.xml as suggested but it is still giving the same problem.

Thanks in advance............
Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
This is what I've got. When in doubt, I think it's best not to include libraries that you're not using, especially if you don't have them in your WEB-INF folder.

Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
please don't add app.tld and check if your struts-config.xml file is correct??

Pls chk this link it will help you i believe..

http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html


thanks
Anurag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding updating web.xml with struts1.1