- This topic has 3 replies, 2 voices, and was last updated 19 years, 4 months ago by ledelste.
-
AuthorPosts
-
ledelsteMemberHi all –
My installation: Eclipse 3.1 and MyEclipse 4.0M2.
I’m using the WebWork framework and its JSP tags. The appropriate jar (webwork-2.1.7.jar), like many other jars on which my app depends, is contained in a directory structure underneath my project’s top level folder, and not in <project-root><web-root-folder>/lib. This jar contains a taglib.tld file in its META-INF, just like a good tag library jar should.
The problem: I can’t get code assist to work for WebWork tags. My app deploys and runs fine on Tomcat, but MyEclipse (I am assuming) doesn’t find the WebWork tag library descriptor and thus can’t provide code assist for those tags.
I have no reference to the WebWork jar in web.xml; rather, each JSP declares the tag library using a reference to the implicit taglib map entry from the taglib.tld file contained in the jar, i.e.
<%@ taglib uri="webwork" prefix="ww" %>
The jar itself is deployed by MyEclipse in <Tomcat-home>/webapps/<webapp-root folder>/WEB-INF/lib; i.e. Since the uri in the taglib declaration above matches the contents of the <URI> element in the taglib.tld file in the WebWork jar, and since the WebWork jar is part of the Eclipse project’s build path, I expect the tags it contains to be targets for content assist.
But they ain’t, apparently. Can someone help?
Riyad KallaMemberOk I could not reproduce this problem, using Eclipse 3.1 Final, MyEclipse 4.0 Milesdtone 2 for Eclipse 3.1
I created two web projects, in 1 I dropped the webwork JAR file (2.1.7) in the WEB-INF/lib dir and in the other I made a top level /lib dir. I added the JAR to the build path in the 2nd project. I created the following page:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="webwork" prefix="webwork" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <webwork:action name="bla"></webwork:action> </body> </html>
And got autocompelte for the webwork tags in both projects. I also saved the proejct and validation worked as well in both.
ledelsteMemberInteresting. I’m working on reproducing the problem in a simpler project now. In the mean time, can you attach an archive containing the one you just built?
ledelsteMemberHere’s some more.
I’ve made a simple project like the one you’ve described and it exhibits the same behavior I’m having in the big project. Here are a couple of clues:
1) When I open the JSP in an editor, it underlines the WebWork tag with a warning (yellow). In the right gutter a little yellow warning box appears, but nothing in the left gutter. The warning says “(Unknown tag (webwork:<name of tag I used>)”. There is also a very interesting error in the PDE error log, from com.genuitec.eclipse.j2eedt.core; the stack trace is:
Info 2005-07-11 08:23:19.131
java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractWebTaglibLocator.searchJarFile(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractWebTaglibLocator.searchJarFile(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.WebProjectTaglibLocator.searchFile(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.WebProjectTaglibLocator$2.visit(Unknown Source)
at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:103)
at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:50)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:60)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:101)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:80)
at com.genuitec.eclipse.j2eedt.taglib.WebProjectTaglibLocator.search(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry.searchForTaglibs(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry.processFile(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry$1.visit(Unknown Source)
at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:103)
at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:50)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:60)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:101)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:80)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry.handleResourceModified(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry.handleResourceAdded(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry.refresh(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.AbstractTaglibRegistry.<init>(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.WebTaglibRegistry.<init>(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.TaglibRegistryManager.createNewRegistry(Unknown Source)
at com.genuitec.eclipse.j2eedt.taglib.TaglibRegistryManager.getTaglibRegistry(Unknown Source)
at com.genuitec.eclipse.j2eedt.core.J2EEProjectUtil.getTaglibURIStream(Unknown Source)
at com.genuitec.eclipse.integration.Integrator.projectResolver_NA1(Unknown Source)
at com.ibm.sse.model.util.ProjectResolver.getURIStream(ProjectResolver.java:204)
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager.loadTaglib(TLDCMDocumentManager.java:725)
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager.getCMDocument(TLDCMDocumentManager.java:564)
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.enableTaglibFromURI(TLDCMDocumentManager.java:72)
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processTaglib(TLDCMDocumentManager.java:308)
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.processTaglib(TLDCMDocumentManager.java:256)
at com.ibm.sse.model.jsp.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.nodeParsed(TLDCMDocumentManager.java:117)
at com.ibm.sse.model.xml.internal.parser.XMLSourceParser.fireNodeParsed(XMLSourceParser.java:287)
at com.ibm.sse.model.jsp.parser.JSPSourceParser.parseNodes(JSPSourceParser.java:251)
at com.ibm.sse.model.xml.internal.parser.XMLSourceParser.getDocumentRegions(XMLSourceParser.java:178)
at com.ibm.sse.model.internal.text.BasicStructuredDocument.setText(BasicStructuredDocument.java:1845)
at com.ibm.sse.model.internal.text.BasicStructuredDocument.set(BasicStructuredDocument.java:1760)
at com.ibm.sse.model.jsp.modelquery.ModelQueryAdapterFactoryForJSP$TaglibSupportModelLifecycleListener.setDocument(ModelQueryAdapterFactoryForJSP.java:81)
at com.ibm.sse.model.jsp.modelquery.ModelQueryAdapterFactoryForJSP$TaglibSupportModelLifecycleListener.processPostModelEvent(ModelQueryAdapterFactoryForJSP.java:52)
at com.ibm.sse.model.LifecycleNotificationManager.signalLifecycleEvent(LifecycleNotificationManager.java:88)
at com.ibm.sse.model.AbstractStructuredModel.signalLifecycleEvent(AbstractStructuredModel.java:168)
at com.ibm.sse.model.AbstractStructuredModel.setStructuredDocument(AbstractStructuredModel.java:982)
at com.ibm.sse.model.xml.internal.document.XMLModelImpl.setStructuredDocument(XMLModelImpl.java:742)
at com.ibm.sse.model.AbstractModelLoader.load(AbstractModelLoader.java:162)
at com.ibm.sse.model.ModelManagerImpl._commonGetModel(ModelManagerImpl.java:253)
at com.ibm.sse.model.ModelManagerImpl._commonGetModel(ModelManagerImpl.java:192)
at com.ibm.sse.model.ModelManagerImpl.getModelForEdit(ModelManagerImpl.java:1120)
at com.ibm.sse.editor.FileModelProvider.selfCreateModel(FileModelProvider.java:867)
at com.ibm.sse.editor.FileModelProvider.createModelInfo(FileModelProvider.java:324)
at com.ibm.sse.editor.FileModelProvider.createElementInfo(FileModelProvider.java:313)
at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:398)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:3008)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:173)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1303)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:262)
at com.ibm.sse.editor.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1260)
at com.ibm.sse.editor.jsp.StructuredTextEditorJSP.doSetInput(StructuredTextEditorJSP.java:133)
at org.eclipse.ui.texteditor.AbstractTextEditor$16.run(AbstractTextEditor.java:2360)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:624)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:621)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2134)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2378)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2405)
at com.ibm.sse.editor.StructuredTextEditor.init(StructuredTextEditor.java:1837)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:152)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:132)
at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.createSourcePage(HTMLMultiPageEditorPart.java:300)
at com.genuitec.eclipse.webdesigner.jspeditor.JSPMultiPageEditorPart.createSourcePage(JSPMultiPageEditorPart.java:54)
at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.createPages(HTMLMultiPageEditorPart.java:232)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:241)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:585)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:365)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2325)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2258)
at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2250)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2236)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2231)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2212)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:371)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:334)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:251)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:131)
at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:169)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:153)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:222)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:198)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:296)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:869)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:741)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:739)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:968)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1067)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:243)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:238)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:277)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)2) After I do a clean, I get a different error in the PDE error log, this time from the com.ibm.etools.validation plugin. (I don’t see this plugin in my eclipse plugin directory…) It’s a NoClassDefFoundError, for com/opensymphony/xwork/util/OgnlValueStack. Interstingly, WebWork depends on XWork, which includes the above class…but presumably this plugin that I can’t find also happens to use it.
-
AuthorPosts