- This topic has 10 replies, 3 voices, and was last updated 20 years, 6 months ago by Riyad Kalla.
-
AuthorPosts
-
BryanMemberI have a project that I enabled the MyEclipse Web capabilities on and it is failing in the compile stages. It says that it can’t find the first struts taglib used in each jsp. For example my jsp looks like:
<snip>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean” prefix=”bean”%>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-html” prefix=”html”%>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-logic” prefix=”logic”%>
<%@ taglib uri=”http://displaytag.org” prefix=”display”%></snip>
My web.xml has these tags defined correctly as far as I can tell. (It works and also compiles with jasper in Any). web.xml is:
<snip>
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-html</taglib-uri>
<taglib-location>tlds/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-bean</taglib-uri>
<taglib-location>tlds/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-logic</taglib-uri>
<taglib-location>tlds/struts-logic.tld</taglib-location>
</taglib></snip>
My tlds are under WEB-INF/tlds.
It gives me an singles error for each jsp page saying that it “could not load TLD for uri=http://jakarta.apache.org/struts/tags-bean”. If I change the order of my imports in the jsp it gives a different location (for the different tag location) in the task window.
Thanks for your help,
Bryan
Riyad KallaMemberchange your taglib-location values to be relative to your webproject’s root, i.e.:
<taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
That should do the trick.
snpeMemberyour web.xml is not good
You have to set like :
<taglib-uri>http://jakarta.apache.org/struts/tags-logic</taglib-uri>
<taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>
</taglib>if You have tlds under WEB-INF/tlds.
tomcat 5.0.x and servlet 2.4 (maybe 2.3) don’t need setting tlds in web.xml
(that is in jars files)regards
BryanMemberOk, I was under the impression that paths could be relative under the WEB-INF dir. When I changed that I got rid of a few errors, but picked up some others:
Error 39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at java.beans.Introspector.instantiate(Introspector.java:1301)
at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:393)
at java.beans.Introspector.<init>(Introspector.java:342)
at java.beans.Introspector.getBeanInfo(Introspector.java:144)
at de.bb.jsp.JspCC.y(Unknown Source)
at de.bb.jsp.JspCC.t(Unknown Source)
at de.bb.jsp.JspCC.s(Unknown Source)
at de.bb.jsp.JspCC.g(Unknown Source)
at de.bb.jsp.JspCC.s(Unknown Source)
at de.bb.jsp.JspCC.g(Unknown Source)
at de.bb.jsp.JspCC.f(Unknown Source)
at de.bb.jsp.JspCC.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at de.bb.bje.eclipse.support.JspCompiler.compile(Unknown Source)
at de.bb.bje.eclipse.IncrementalJspBuilder.compile(Unknown Source)
at de.bb.bje.eclipse.IncrementalJspBuilder.visit(Unknown Source)
at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:106)
at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:50)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:76)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:119)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:60)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:104)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:82)
at de.bb.bje.eclipse.IncrementalJspBuilder.buildProject(Unknown Source)
at de.bb.bje.eclipse.action.RecompileJspsAction.basicRun(Unknown Source)
at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583) EditTranslationItem.jsp facility_locator/src/webapp/secure line 0
Riyad KallaMemberWhat is the whole exception? What does the line of code look like where this error is comming from? How are you getting this error? (Compiling JSP?)
BryanMember@support-rkalla wrote:
What is the whole exception? What does the line of code look like where this error is comming from? How are you getting this error? (Compiling JSP?)
This happens when I recompile the JSP pages (right click on project and say recompile all jsps). The error message just show up as one of the tasks to fix like a compile error. The message that I pasted in before was the entire error message. Is there something else that I should include?
Riyad KallaMemberIf you open up the page it is complaining about, are there any error markers anywhere in the gutters on the left or right side? Is this a full valid JSP page, or is it a piece you use to include in other pages and its not valid by itself?
BryanMemberI pasted one of the other lines into a text editor and it looked like there was some more text to it:
Kind Status Priority Description Resource In Folder Location
Error 39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at java.beans.Introspector.instantiate(Introspector.java:1301)
at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:393)
at java.beans.Introspector.<init>(Introspector.java:342)
at java.beans.Introspector.getBeanInfo(Introspector.java:144)
at de.bb.jsp.JspCC.y(Unknown Source)
at de.bb.jsp.JspCC.t(Unknown Source)
at de.bb.jsp.JspCC.s(Unknown Source)
at de.bb.jsp.JspCC.g(Unknown Source)
at de.bb.jsp.JspCC.s(Unknown Source)
at de.bb.jsp.JspCC.g(Unknown Source)
at de.bb.jsp.JspCC.s(Unknown Source)
at de.bb.jsp.JspCC.g(Unknown Source)
at de.bb.jsp.JspCC.f(Unknown Source)
at de.bb.jsp.JspCC.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at de.bb.bje.eclipse.support.JspCompiler.compile(Unknown Source)
at de.bb.bje.eclipse.IncrementalJspBuilder.compile(Unknown Source)
at de.bb.bje.eclipse.IncrementalJspBuilder.visit(Unknown Source)
at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:106)
at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:50)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:76)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:80)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:119)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:60)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:104)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:82)
at de.bb.bje.eclipse.IncrementalJspBuilder.buildProject(Unknown Source)
at de.bb.bje.eclipse.action.RecompileJspsAction.basicRun(Unknown Source)
at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.easystruts.struts.config.EasyStrutsLogFactory
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:609)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:561)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:298)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
at org.displaytag.util.BeanInfoUtil.<clinit>(BeanInfoUtil.java:31)
… 62 more
Caused by: java.lang.ClassNotFoundException: org.easystruts.struts.config.EasyStrutsLogFactory
at de.bb.util.ZipClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:571)
… 67 more ManageRoles.jsp facility_locator/src/webapp/secure line 0
BryanMember@support-rkalla wrote:
If you open up the page it is complaining about, are there any error markers anywhere in the gutters on the left or right side? Is this a full valid JSP page, or is it a piece you use to include in other pages and its not valid by itself?
There are no error pages in the gutter the page is very simple and is not even part of a tile.
The page source is:
<%@ page contentType=”text/html; charset=UTF-8″ %>
<%@ taglib uri=”http://java.sun.com/jstl/fmt” prefix=”fmt” %>
<%@ taglib uri=”http://java.sun.com/jstl/core” prefix=”c”%>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean” prefix=”bean”%>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-html” prefix=”html”%>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-logic” prefix=”logic”%>
<%@ taglib uri=”http://jakarta.apache.org/struts/tags-tiles” prefix=”tiles” %>
<%@ taglib uri=”http://displaytag.org” prefix=”display”%><display:table name=”sessionScope.locatorForm.searchResultsList” pagesize=”10″
requestURI=”facilityLocator.do?command=tag” sort=”list” defaultsort=”1″
decorator=”org.lds.ics.pfd.loc.web.dec.FacilityDecorator”><display:column property=”nameFacilityId” title=”Name/Facility ID” sortable=”true” headerClass=”sortable” />
<display:column property=”organizationStake” title=”Organization/Stake” sortable=”true” headerClass=”sortable”/>
<display:column property=”physicalAddress” title=”Physical Address” sortable=”true” headerClass=”sortable”/>
<display:setProperty name=”paging.banner.include_first_last” value=”true” />
</display:table>
BryanMemberInteresting, I figured it out. It wasn’t complaining about this before, but I noticed that the developer that wrote this page (not me) was setting the response content type using the page directive. I basically deleted the first line in the source that I just posted up and it compiled.
<%@ page contentType=”text/html; charset=UTF-8″ %>
There must have been a problem with the editor that the code was written in because when I TYPED it back in it works just fine?!?
Riyad KallaMemberVery odd! I’ll pass this on and see if we can uncover something, we really appreciate you patience and help running this down!
-
AuthorPosts