facebook

Eclipse 2.0 to 3.0, editing JSP with XML editor [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #215492 Reply

    raheel
    Member

    I have recently installed evaluation version of myeclipse with Eclipse ver: 2.1.2. I create a new web module project and add a JSP page to it. On the top of this jsp page there is a line for page directive:

    <%@ page import="java.lang.* , java.util.* " %>

    Eclipse reports error on this line, stating:

    Fatal error – The markup in the document preceding the root element must be well-formed.

    Also, it didn’t open up any intelli-sense like popups when i want to insert jsp tags.

    I don’t know why it did so? Plz HELP. Myeclipse plugin is installed out of the eclipse folder. Other system parameters are given below:

    – System Setup ——————————-
    Operating System and version: Windows 2000 Prof. with SP3
    Eclipse version: 2.1.2
    Eclipse build id: 200311030802
    Fresh Eclipse install (y/n): n
    MyEclipse version: 2.7.101
    Eclipse JDK version: 1.3.1
    – Message Body ——————————-

    #215503

    Riyad Kalla
    Member

    Please paste the contents of your entire JSP page for us to look at.

    #215552

    raheel
    Member

    @support-rkalla wrote:

    Please paste the contents of your entire JSP page for us to look at.

    @support-rkalla wrote:

    Please paste the contents of your entire JSP page for us to look at.

    <%@ page language=”java”%>
    <%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean&#8221; prefix=”bean”%>
    <%@ taglib uri=”http://jakarta.apache.org/struts/tags-html&#8221; prefix=”html”%>

    <html>
    <head>
    <title>JSP for loginForm form</title>
    </head>
    <body>
    <html:form action=”/login”>
    name : <html:text property=”name”/><html:errors property=”name”/></br>
    <html:submit/><html:cancel/>
    </html:form>
    </body>
    </html>

    #215568

    Riyad Kalla
    Member

    raheel,
    In your first post you mentioned a line containing the @page directive, now you are showing me a page contents that does not have a page directive.
    What I need from you is the contents of the page that you are seeing the Error with so I can try and reproduce it locally.

    #215580

    raheel
    Member

    <%@ page language=”java”%>

    above line shows the “Fatal error – The markup in the document preceding the root element must be well-formed” with a yellow line in the start of the statement.

    in my previous post, first line of jsp page has page directive. can u see it??

    #215586

    Riyad Kalla
    Member

    Yes I do see it, it just looked different from your first post (that had the import directives).

    Additionally I cannot reproduce this. Are you willing to move to the Eclipse 3 platform? Later this week we will be releases 3.8.2 for Eclipse 3.

    #215661

    raheel
    Member

    Actually Eclipse 3 platform needs JDK 1.4 and we are developing with jdk1.3.1 as a matter of compatibility and contractual issues. Some or few of our existing codes (and projects) will broke up in no time with jdk1.4 ( i guess). Is there anyway that i can continue with jdk1.3 but using Eclipse 3 along with it??

    Secondly, I m using a lot of plugins right now, some of them are related to xml formatting and j2ee facilities. Is this yellow line and error marker comes from some other side … just random guessing!!!! Otherwise my jsp compiles in eclipse, i can successfully deploy and browse it.

    Can you also help me if there is anyway in your plug-in to interactively edit or create JSP pages with struts based tags like what we normally do with standard html tags in some editors (for instance MS Frontpage) … I think there should be some way to get a feel of WYSIWYG when editing .jsp pages with struts TLDs … Am I thinking right??

    #215671

    Riyad Kalla
    Member

    Actually Eclipse 3 platform needs JDK 1.4 and we are developing with jdk1.3.1 as a matter of compatibility and contractual issues. Some or few of our existing codes (and projects) will broke up in no time with jdk1.4 ( i guess). Is there anyway that i can continue with jdk1.3 but using Eclipse 3 along with it??

    Definately, just make sure when you load Eclipse 3 to navigate to the Window > Preferences > Java > Compiler preferences page, and set the “Class compliance level” from 1.4, to 1.3. That will make sure to keep your class files in check.

    Also since we use the javac.exe compiler found in the path to compile JSP pages, you likely will want to keep your 1.3 JDK in your path, which means you will *have* to launch Eclipse with the -vm argument pointing to your 1.4 JDK, so it doesn’t find & use the 1.3 JDK in your path. Something like this:

    eclipse.exe -vm c:\j2sdk1.4.2_05\bin\javaw.exe -vmargs -Xmx512m

    Secondly, I m using a lot of plugins right now, some of them are related to xml formatting and j2ee facilities. Is this yellow line and error marker comes from some other side … just random guessing!!!! Otherwise my jsp compiles in eclipse, i can successfully deploy and browse it.

    Yes its very likely, you can always right click on the files and go to “Open With” and see what is selected as the default to open that file type. MyEclipse ships with strong XML editing and J2EE functionality so maybe you don’t need all those plugins? If you do, that’s no problem, just make sure we aren’t duplicate work here.

    Can you also help me if there is anyway in your plug-in to interactively edit or create JSP pages with struts based tags like what we normally do with standard html tags in some editors (for instance MS Frontpage) … I think there should be some way to get a feel of WYSIWYG when editing .jsp pages with struts TLDs … Am I thinking right??

    Yes you are thinking exactly right, we hope to get the JSP page designer in the 3.9 release and it is planned to do EXACTLY this. Drag and Drop with the struts tags and such.

    #215717

    raheel
    Member

    >Definately, just make sure when you load Eclipse 3 to navigate to the Window > Preferences > Java > ?>Compiler preferences page, and set the “Class compliance level” from 1.4, to 1.3. That will make sure to >keep your class files in check.

    You mean that i should install eclipse 3 in a separate folder from eclipse 2. If it is the case, then I am afraid that i can’t share my old workspace with new eclipse install.

    Any guesses??

    #215725

    Riyad Kalla
    Member

    raheel,
    Absolutely your Eclipse 3 install will need to go some place totally different, e.g. C;\Eclipse3, and you likely will need to create a new workspace and cannot use the existing one (you can import the projects into Eclipse 3 I believe).

    Eclipse 2 and Eclipse 3 are *vastly* different, you can imagine them like having Windows 98 and Windows XP installed, you wouldn’t install Windows XP ontop of Windows 98, they are too different. You’d probably do a clean system install and then copy over your files.

    To be safe, same goes for Eclipse. If you *did* unzip Eclipse 3 ontop of Eclipse 2 and just keep using the same workspace, I’m almost positive that you will spend quite a few days tracking down and trying to get rid of very strange/hard to reproduce problems like editors not opening, preference pages not displaying correctly, etc.

    #215802

    raheel
    Member

    Riyad,
    You are quite right, now I understand this very well. Still I’m facing much problem in writing jsp pages as whenever I saved my pages, eclipse build the code and popup with results with same error “fata error: the markup ….”. I just can’t figure out which plugin disturbs it. I have also right click at the start of the line containing <@page ….> directive, in the context menu it shows “Open DTD” entry, when I select it then nothing happens. Just for your info, i have installed “XML buddy” plugin and a tomcat plugin called “Sysdeo”.

    So, any guesses??

    #215814

    Riyad Kalla
    Member

    raheel,
    I think you may not be using our editor to edit your JSP pages, it sounds like you are using XML Buddy… close your JSP page, then right click on it and go to “Open With” and select “MyEclipse JSP Editor”, did the problem go away?

    #215882

    raheel
    Member

    Yes …you were right. I did open my jsp page with myeclipse jsp editor and it works pretty fine. Thanks for your help and be with me.

    Thanks alot. I will wait for the next release of myeclipse workbench which will have the feature of WYSIWYG editing of struts based pages.

    #215889

    Riyad Kalla
    Member

    raheel,
    I’m glad its working, also the JSP designer will hopefully be in the first beta of 3.9, our next release (due out today) is 3.8.2 and will contain many bug fixes and optimizations.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Eclipse 2.0 to 3.0, editing JSP with XML editor [Closed]

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