aspose file tools*
The moose likes Struts and the fly likes /tags-html can not be resolved in either web.xml or the jar files deployed with this Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "/tags-html can not be resolved in either web.xml or the jar files deployed with this " Watch "/tags-html can not be resolved in either web.xml or the jar files deployed with this " New topic
Author

/tags-html can not be resolved in either web.xml or the jar files deployed with this

anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
Hi all,
I am new to struts.Trying to compile first small application.
I am using struts-2.0.11.2 and apache-tomcat-6.0.18. I am getting this error since 2 days.Please help me out.

org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.


Hear is my index .jsp

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<html>
<head>
<title> ABC,Inc.Human Resources Portal</title>
</head>
<body>
<font size="+1"> ABC.Inc Human resources Portal</font><br>
<hr width="100%" noshade="true">
• ADD an Employee<br>
• <html:link forward="search">Search for employees</html:link><br>
</body>
</html>
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
It looks like you have a jsp that is trying to reference a struts 1 tag library. Where ever you are making a reference to http://struts.apache.org/tags-html, change it to <%@ taglib prefix="s" uri="/struts-tags" %>

You may also have references to tags-bean, tags-logic, and tags-nested. These are all struts 1 so you'll want to remove them.
anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
Hi tom ,
Thanks for reply.I did it the way you told me.But its giving this error now

org.apache.jasper.JasperException: /index.jsp(10,7) No tag "link" defined in tag library imported with prefix "s"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1231)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

here is index.jsp

<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
<title> ABC,Inc.Human Resources Portal</title>
</head>
<body>
<font size="+1"> ABC.Inc Human resources Portal</font><br>
<hr width="100%" noshade="true">
• ADD an Employee<br>
• <s:link forward="search">Search for employees</s:link><br>
</body>
</html>
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
Hi Anjali, I think you next problem is that link is a struts 1 tag and you say you're using struts 2. I've never used the html link tag so I'm not sure what its struts2 analog is, but see if you can find what you need here:

http://struts.apache.org/2.0.11.2/docs/tag-reference.html
Ananth Chellathurai
Ranch Hand

Joined: Nov 21, 2007
Posts: 349

Hi Anjali,

Is all your tag libraries registered properly in your web.xml.

Ananth Chellathurai


Ananth Chellathurai [Walk on software]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
anjali,

You may not be aware that there are two very different versions of Struts, generally referred to as Struts 1 and Struts 2.

I think the problem here is that you are using a tutorial or other instructional material that was written for Struts 1, but you have downloaded Struts 2. This isn't going to work. If you wish to use the same instructional material, I'd suggest you get rid of the Struts 2 downloaded materials and download Struts version 1.3.8, which is the latest Struts 1 version. Otherwise, you will need to find some instructional material made specifically for Struts 2.


Merrill
Consultant, Sima Solutions
anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
Thanks to everybody who replied my post.I dowloaded struts 1.But now I am getting this error.I am using Java 5 and tomcat 6. Oh please help me I loosing interst in struts.


org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
I don't know that error of the top of my head, I'm thinking maybe struts can't find your jsp. Make sure that your entry in struts-config.xml for the action you are executing has the correct path to your jsp in it. Post your struts-config.xml entry if you like.
dinesh thalis
Ranch Hand

Joined: Nov 19, 2008
Posts: 39
copy struts-taglib.jar into your /WEB-INF/lib directory and reference the tags in your code like



or

copy relevant tlds (like struts-html.tld) to WEB-INF
 
 
subject: /tags-html can not be resolved in either web.xml or the jar files deployed with this