The moose likes Struts and the fly likes tag library doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tag library doubt" Watch "tag library doubt" New topic

tag library doubt

Jagadeesh Seemakurthi

Joined: Apr 18, 2011
Posts: 3
I have used the following code in in one jsp
<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
Do i need to do anything like adding tld files anywhere???
Dont mind if it is a dumb question.....
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

From the JSP Specification:
If the URI is a URL or URN, then the TLD is located by consulting the mapping indicated in web.xml extended using the implicit maps in the packaged tag libraries. If URI is pathname, it is interpreted relative to the root of the web application and should resolve to a TLD file directly, or to a JAR file that has a TLD file at location META-INF/taglib.tld.

So the way you have it written, no.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jagadeesh Seemakurthi

Joined: Apr 18, 2011
Posts: 3
Thanks joe..
I have added struts.jar in lib folder of WEB-INF..
Still i am able to see the output..
It is showing the following output

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:747)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
at jsp_servlet.__index._jsp__tag0(__index.java:119)
at jsp_servlet.__index._jspService(__index.java:91)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3504)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

please fix it
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

We have an entry in our FAQ regarding that issue (#12)
subject: tag library doubt
Similar Threads
Struts Tag Library
struts error console-defs.idx file not found ( In RAD7 on XP)
tag lib declaration
Error related to struts-html.tld and struts-bean.tld
error in eclipse IDE for struts application