facebook

Moving an existing struts project to My Eclipse [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #218141 Reply

    rbhogal
    Member

    Hello Support:
    I have just installed MyEclipse 3.8.2 over Eclipse 3.0. The istall was successfull but I think that the project doers not know that it is a struts project, although I have gone to the right click menu abd selected My Eclipse and added struts capabilities.

    Please note that the project has existed for more then a year and I have just started working n it as a new Developer.

    Also when I load a jsp page into the editor I find that the editor does not provide the intell-isense about the struts tags.

    It does not detect syntax errors in tags and also does not offer the help.

    I have used myeclipse before on a different project but the difference was that in that case I had created teh project using MyEclipse.

    Thanks in advance

    Rajeev

    #218142 Reply

    Riyad Kalla
    Member

    Rajeev,
    We need more information from you. What is the structure of the project? What does an example JSP page that you are editing look like? What <taglib> entries do you have in the web.xml file? What version of Struts is this? Where are the struts JARs located? Are they in your build path? What is your Project Root, WebRoot and Source directory all set to? Do you have validation turned on? Do you have javac.exe in your system PATH? (open up a console and type “javac.exe”, do you get any reply or “Bad command or file name”?).

    #218170 Reply

    rbhogal
    Member

    Riyad,
    Answering your last question first, I have javac in the PATH.
    IN order to make it more compliant and consistent with what My Eclipse expects, I went and deleted all the files from our current existing project and created a brand new project in the workspace called nsr , the web.xml file was created by MyEclipse and I added struts capability to it using teh Right Click Menu provided for that.
    For this new Project struts config and web.xml was vreated by MYEclipse and jars added by My EClipse.
    Instead of your WebRoot Default I used ApplicationRoots as that is how it is set in our project which I will ultimately have to import.

    Also instead of src for source I used WEB-INF/classes as for some reason the source files are placed in this directory as well.

    I created a JSP using create New JSP option and added the taglibs declaration as under :
    <%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>
    <%@ taglib uri=”/WEB-INF/struts-logic.tld” prefix=”logic” %>
    <%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>

    I still can not have the JSP Editor provide the JSP Intellisense.
    Regarding your question if I have validation turned on. I don’t know how to turn it on.
    Thanks

    Rajeev

    #218173 Reply

    rbhogal
    Member

    Riyad,
    If I type <html:form/> and leave it like that the editor does find an error and tells me that a mandatory attribute is missing but it does not provide any completion and coloring of the tags. Also it does not even color and provide help for completion of html tags. I have used MYEclipse before an dit was very smart and helped with both html and jsp struts tags.

    #218175 Reply

    Riyad Kalla
    Member

    Those URIs are most likely invalid, please read this entry to better understand how URIs work for taglibs: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251

    You can turn on validation globallly via the Window > Prefs > MyEclipse > Validation menu, or per-project via the Project Properties > MyEclipse-Validation preferences.

    #218179 Reply

    rbhogal
    Member

    Riyad:
    I looked at the post that you pointed to:
    According to that if we had the following in web.xml
    <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    and following in jsp it should work:
    <%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>
    <%@ taglib uri=”/WEB-INF/struts-logic.tld” prefix=”logic” %>
    <%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>

    however it does not, but there must be something else also wrong there as it still does not provide the intellisense for plain simple html.

    Thanks

    Rajeev

    #218180 Reply

    rbhogal
    Member

    If I create an HTML file (not jsp) it does provide the completion support for html tags but does not provide completion support for HTML in JSP. Does not provide the completion support for Struts Tags either , as I stated before. However it does provide the error message if a required atribute is missing.

    Thanks

    Rajeev

    #218187 Reply

    Riyad Kalla
    Member

    Are you sure you are opening the JSP pages with your editor? (right click > open with > MyEclipse JSP Editor)?

    #218197 Reply

    rbhogal
    Member

    Hi Riyad,
    You are right It was using Java Editor as default for JSP Pages.
    I remember that in my last assignment I did not have to do any file association for JSP Editor. It always aopened .jsp with Eclipse Editor. How can I set this file association so that it always opens .jsps with JSP Editor
    Thanks in advance,

    Rajeev

    #218199 Reply

    Riyad Kalla
    Member

    So now things are working?

    #218201 Reply

    rbhogal
    Member

    OK Riyad
    I got it , it is at the workbench level that you associate file extensions with the editors.

    I have set it and now it works.
    Kind of strange it used to do it itself. May be I had opened a JSP file before installing MY Eclipse and it remembered the old preference.

    Thanks for your help

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Moving an existing struts project to My Eclipse [Closed]

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