facebook

Including files relative to web root blows up JSP editor

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #214630 Reply

    Jon Nermut
    Member

    This is a bit complex to reproduce, but bear with me.
    Using 3.8.1 with QF3 on windows XP

    1. Create a web project
    2. Create a subdirectory under the web root called new
    3. Create a JSP file called /new/testcase.jsp consisting of the following:

    <%@ page language=”java” %>
    <%@ include file=”/template/testheader.jsp” %>

    4. Create a sub directory under the web root called template
    5. Create a JSP called /template/testheader.jsp consisting of

    <%@ page language=”java” import=”java.util.*” %>
    header

    6. Close testcase.jsp
    7. Try and open testcase.jsp (in the MyEclipse JSP editor)
    8. I get a dialog box with “Unable to create part”, and the following exception in my log:

    !ENTRY org.eclipse.core.runtime 4 2 Sep 07, 2004 09:20:22.230
    !MESSAGE Problems occurred when invoking code from plug-in: “org.eclipse.core.runtime”.
    !STACK 0
    An error has occurred when initializing the input for the the editor’s source page.
    at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.createPages(Unknown Source)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:187)
    at org.eclipse.ui.internal.PartPane$2.run(PartPane.java:137)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:133)
    at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:205)
    at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:939)
    at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:921)
    at org.eclipse.ui.internal.EditorStack.setVisibleEditor(EditorStack.java:170)
    at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:338)
    at org.eclipse.ui.internal.EditorAreaHelper.openEditor(EditorAreaHelper.java:268)
    at org.eclipse.ui.internal.EditorManager$4.run(EditorManager.java:697)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:686)
    at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:782)
    at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:585)
    at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:573)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2201)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2134)
    at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2126)
    at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2113)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2108)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:299)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:137)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:110)
    at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:164)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:150)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:212)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:289)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:490)
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:429)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:427)
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:635)
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:731)
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:211)
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:206)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:238)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
    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:183)
    at org.eclipse.core.launcher.Main.run(Main.java:644)
    at org.eclipse.core.launcher.Main.main(Main.java:628)

    I also get an unable to Index JSP error when I save the file.

    Hope you can reproduce this.

    Cheers,

    Jon

    #214631 Reply

    Jon Nermut
    Member

    Btw, In case it wasn’t clear, the actual problem is the <%@ include file=”/template/testheader.jsp” %>
    If you use instead <%@ include file=”../testheader.jsp” %> the problem goes away.

    #214635 Reply

    Scott Anderson
    Participant

    Jon,

    I just tried to replicate this behavior in my installation and could not. I walked through the test case as stated and had no problem reopening testcase.jsp and it validated successfully with either relative or absolute reference to the include file, once it existed. I *know* absolute URL-based includes was fixed in quick fix #1 as “ID 904 Taglib resolution from included files is not working if absolute path from web root”. Given the difference in behaviors in our installs it appears that the quickfixes may not have been successfully applied in your installation. What build id is reported on the Window > Preferences > MyEclipse preference page.

    Riyad, can you follow up and see if your results are different than mine?

    #214737 Reply

    Jon Nermut
    Member

    Version 3.8.1 + QF20040825

    When I have time I will try and rebuild my environment from scratch and see if the problem persists.

    #214749 Reply

    Patryn
    Member

    I can confirm this bug, with a freshly installed eclipse 3.0.1 + 3.8.1 QF 3.
    There are some more problems with JSP and i am short before uninstalling myeclipse and waiting on a stable version.
    Nice tool, but very anoying bugs in the latest version even with plain JSP stuff.

    /template? Coremedia-programming? 😉


    André

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Including files relative to web root blows up JSP editor

You must be logged in to post in the forum log in