- This topic has 44 replies, 9 voices, and was last updated 19 years, 5 months ago by John Sawers.
-
AuthorPosts
-
Riyad KallaMemberJoseph,
I believe you are referring to the “basic editing” talked about in the other thread, I followed up on that there.
Joseph LiMemberScott,
Then hows that going to work in a Java project? I mean there isn’t any taglib configuration information anyway? Why would u make it work in Java project and not in Simple project? My concern is, I just wanted to open JSP files in ME, I don’t really care if the code completion is working or not, nor do I care about if the custom tags are being used properly. I will find those out after deployment anyway. Having resolve to use external editors is ok as long as I don’t open too many files. But it would be nice if I can keep the files opened within ME so it doesn’t liter icons all over the taskbar in XP.
And if Java project can have JSP pages open without problem, then how about a simple project with project references back to a Java project? Shouldn’t it be able to reference the class info in the Java project as well?
If u ask me, JSPs editors should not have code completion so to discourage people from piling up codes in JSP pages. But thats just my two cents. :>
Keith FettermanMemberchihangli,
I am compelled to respond to your last statement:
If u ask me, JSPs editors should not have code completion so to discourage people from piling up codes in JSP pages. But thats just my two cents. :>
Many developers, me being one of them, live in a world where we inherited Web applications that *do* have a lot of Java in JSP files. Many of these applications were developed before the current standards and libraries like taglibs, JSF, Struts, JSTL existed.
I find it very frustrating that the JSP editor does not have the same productivity aids found in the Java editor. These aids make supporting the existing code much easier. Especially refactoring. Refactoring in the JSP editor would make it much easier to move Java code out of JSP files in to Java classes. Also when I use refactoring, like method or class renaming, I wish the refactoring tools in the Java editor were JSP aware.
We should not dictate coding standards by limiting the features of our tools.
Fortunately, the developers of MyEclipse are making great strides at making the JSP editor on par with the Java editor.
I apologize to the other readers of this thread because I know this is a support thread. But, I want the developers of MyEclipse to know that these features are really needed.
Scott AndersonParticipantKeith,
I apologize to the other readers of this thread because I know this is a support thread. But, I want the developers of MyEclipse to know that these features are really needed.
Trust us. We know. In our prior lives (before becoming tool builders) we were all J2EE consultants so we have a good idea of what life in the “real world” is really like. 😉
Scott AndersonParticipantChihangli,
Then hows that going to work in a Java project? I mean there isn’t any taglib configuration information anyway?
The spec says that taglibs in the build path will be honored, so we’ll check the libs on the build path for them, just as we do for web projects. Additionally, if the project is laid out so that the project is the web root, we’ll look in /WEB-INF/web.xml for additional mappings. So, it won’t work perfectly in every case, but since the project has build capabilities we can certainly find most of what we need.
As for simple projects, you’ll be able to open JSP files and edit them, but validation and assistance won’t be functional. Since that seems to be exactly what you want, I think you’ll be happy.
Joseph LiMemberTo Scott,
Thanks, thats exactly what I need.
To Keith,
Thanks for the comment, my statement was a bit too harsh, code completion and other supports does help a lot. I just hate to see people abusing it. Thanks for the reply though.Joseph
Andrew ShackletonMemberI have this error but only in a single file in my web project. In my case, I believe there may be a problem with the metadata, because I can create a new workspace and open the file. However, nothing I do to the content in my current project will allow me to open the file using the JSP editor. Even refactoring the web project didn’t work. Refactoring created a copy of the original project and installed the files in the problemmatic workspace. Nor am I able to create a new JSP file using the standard JSP template; I get the “can’t create part:” error after I click ok to the JSP create dialog.
Is there something I could search the workspace for, to find the troublemaking data?
I am using 3.84-BetaFor3.1 in Eclipse 3.1M4: Version: 3.1.0 Build id: 200412162000
Riyad KallaMembermaplesoft,
It depends which version of the MyEclipse beta you are using, if you pay close attention to our current “3.1” download, there have been 3 M-compatiable builds, each specific to the M4, M6 and M7 builds of Eclipse respectively.Also you might try shutting down Eclipse, and restarting it with the -clean command line argument as outlined here:
http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#343
Andrew ShackletonMemberAfter much trial and error of cutting out pieces of my jsp, I found the problem to be the dataElement tag in the bbUI.tld. All the other tags from that library are parsed correctly but that one throws a SAXP parse exception.
I am using the 3.8.4 build for eclipse 3.1M4 but I am upgrading to the M7 build, with the corresponding ME upgrade to see if that fixes things.
Andrew ShackletonMemberHere’s the stack trace after the upgrade:
An error has occurred when initializing the input for the the editor’s source page.
at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.createPages(HTMLMultiPageEditorPart.java:249)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:241)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:577)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:357)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:559)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:266)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:126)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:391)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1064)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1013)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1222)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:406)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:109)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:212)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:202)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:719)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:631)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:594)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2254)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2185)
at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage.java:2177)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2163)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2158)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2132)
at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:278)
at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.java:270)
at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:177)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2921)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2554)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1601)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1565)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:315)
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:230)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:371)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:160)
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:330)
at org.eclipse.core.launcher.Main.basicRun(Main.java:274)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Andrew ShackletonMemberInteresting note. After the upgrade, I can no longer open the file at all, not even with the text editor, which used to work in the build for 3.8.4.
Want the file to help debug? =)
At this point, I will have to revert to M4.
Andrew ShackletonMemberMore from me. =)
I can open the file with the text editor after restarting eclipse with -clean, so it must be a caching issue with the ME plugin. That’s new to te M7 plugin.
John SawersParticipantThis problem seems to be back. I just upgraded to Eclipse 3.1 (Build id: I20050627-1435) and ME 4.0 (Version: 3.9.210
Build id: 20050627-4.0-Milestone-2). This is on OS X 10.4.1 w/ 1GB RAM.This problem appeared after the upgrade from Eclipse 3.01 and ME 3.8.4, which happened simultaneously. Most of my JSPs seem to be working fine, but a single JSP is causing the problems listed above. Here is the stack trace when I try to open it:
An error has occurred when initializing the input for the the editor’s source page.
at com.genuitec.eclipse.webdesigner.htmleditor.HTMLMultiPageEditorPart.createPages(HTMLMultiPageEditorPart.java:249)
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)
…I’ll post the rest of it if it is relevant. The JSP causing trouble has <%@ include tags, but so do all the others which are working fine. It is the only JSP in a folder under the main JSP dir.
Source = proj/src
Web = proj/web
Lib = proj/web/WEB-INF/lib
Output = proj/web/WEB-INF/classes
Problem Directory = proj/web/decoratorsThe project has Web Capabilities as well as Spring Capabilities. I can attach JSP if needed but I don’t want to clutter things too much.
Riyad KallaMemberThis is strange indeed, can you post the source of the JSP wrapped in code blocks (use the code button below)?
John SawersParticipantHere is the JSP:
<%@ page import="com.moticate.model.Member" %> <%@ page import="java.util.Set" %> <%@ page import="com.moticate.model.Site" %> <%@ page import="com.moticate.application.util.Constants" %> <%@ page import="java.util.Iterator" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ include file="/taglibs.jsp"%> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title><decorator:title default="Moticate SiteBuilder"/></title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <c:set var="ctx" value="${pageContext.request.contextPath}" scope="request"/> <link href="<app:css/>" type="text/css" rel="stylesheet"/> <link href="${ctx}/images/favicon.ico" rel="SHORTCUT ICON"/> <decorator:head/> </head> <body> <div id="titleBlock"> <div id="titleText"><app:siteProperty value="title"/></div> </div> <div id="bodyWrapper"> <div id="menu"> <app:menu orientation="vertical"/> <%pageContext.setAttribute("contextPath",((HttpServletRequest)pageContext.getRequest()).getContextPath());%> <authz:authorize ifAnyGranted="ROLE_ADMIN,ROLE_SUPER_USER"> <span id="adminMenu"><a href="${contextPath}/admin/admin.html">Administration</a></span> <span id="adminMenu"><a href="${contextPath}/logout.html">Logout</a></span> </authz:authorize> <authz:authorize ifNotGranted="ROLE_ADMIN,ROLE_SUPER_USER"> <span id="adminMenu"><a href="${contextPath}/login.html">Login</a></span> </authz:authorize> </div> <div id="mainPicture"></div> <div id="mainBlock"> <%@ include file="/messages.jsp"%> <decorator:body /> </div> <div id="footer"> <div id="footerText"> <app:siteProperty value="footer"/> </div> <div id="footerText" style="float: right"> <authz:authorize ifAnyGranted="ROLE_ADMIN,ROLE_SUPER_USER"> Currently logged in as: <authz:authentication operation="principal"/> </authz:authorize> </div> </div> </div> <div id="subtitleBlock"><app:siteProperty value="subTitle"/></div> <div id="emailLink"> <% Set admins = ((Site)session.getAttribute(Constants.SITE_KEY)).getAdmins();%> <% Iterator i = admins.iterator();%> <% Member admin = (Member)i.next();%> <a href="mailto:<%=admin.getEmail()%>">EMAIL</a> </div> </body> </html>
-
AuthorPosts