facebook

Need help configuring web project in eclipse

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

    shuvradeep
    Member

    i need some help with setting up my projects with eclipse/myeclipse
    here is how it is all organised. please note that i CANNOT change the physical location of the files. i have to configure eclipse to pick everything up from where they are.

    here are the eclipse features that i would be using.

    1. editing jsp source
    2. editing html and js source
    3. editing java source (as in java classes)
    4. code completion, content assist and error marking for any java code (jsp and java classes)
    5. code completion, content assist and error marking for custom tag libs and tag variables
    6. cvs integration

    – we use the sybase enterprise app server (jaguar) as our app server. i dont care if jaguar is not supported by eclipse.
    – classes get compiled to a folder called C:\Sybase\EAServer\java\classes
    – the webapplications reside in C:\Sybase\EAServer\Repository\WebApplication\

    i have a webapp called xyzproject under c:\Sybase\EAServer\Repository\WebApplication

    - xyzproject
        - WEB-INF
            - tlds
            - lib
        - WEB-XYZPROJECT
    
    the WEB-XYZPROJECT folder is a CVS module and contains jsps.

    java files for this webapp are under c:\implementations\XYZProject\java

    - sap
        - custom
            - xyzproject
                - actions
                - util
    
    the actions and util contains java files. the java folder is a cvs module.
    

    how do i put all this (the web files and the java files) together ?
    everything works fine with intellij idea right now, i am evaluating eclipse with myeclipse to see if we can move to the latter platform.

    #217260 Reply

    Riyad Kalla
    Member

    1) Create a new Java Project
    Project dir: c:\implementations\XYZProject
    source folder : /java
    output dir: (whatever you want)

    2) Create a new Web Module Project
    Project dir: c:\Sybase\EAServer\Repository\WebApplication
    WebRoot dir: /xyzproject
    Output dir: /xyzproject/WEB-INF/classes

    3) Edit Web Module Project, add a project dependency on the Java Project

    4) Click your Project Properties > MyEclipse-WEb, and adjust the deployment rule for ‘dependent projects’, this can JAR up your Java project and deploy it along with your Web project and also under the Java Build Path if you need those classes to be resolved during development-time (in JSP pages for example).

    5) Unfortunately Sybase is not supported, so you will need to use an Ant script for deployment.

    #217331 Reply

    shuvradeep
    Member

    created the java project fine.
    did not find a ‘Web Module Project’ option in the New->Project wizard. The nearest one is J2EE->Web Project. Assuming that this is what you meant by ‘web module project’, there are 3 things that i have to fill up. project ‘location’, ‘source folder’ and ‘web root folder’. what should i fill in these ? also how to CVS enable these 2 projects ? the ‘WEB-XYZPROJECT’ and ‘java’ folders in the original post above are CVS modules. i do not need any deployment features from inside eclipse.

    #217362 Reply

    Riyad Kalla
    Member

    The nearest one is J2EE->Web Project. Assuming that this is what you meant by ‘web module project’

    Correct

    what should i fill in these ?

    I gave you Project location and Web root above, make the src whatever your src dir is (where your Java class source files are, NOT your JSP pages)

    also how to CVS enable these 2 projects ?

    Then what you can do instead of doing File > New > J2EE > Web PRojects, is go to the CVS perspective, find your project and use “Check Out As…” and then check the project out into a new web module project.

    #217703 Reply

    stchome
    Participant

    I’m piggybacking on this thread, given that what I want to do is exactly the 6 things listed in the first post.

    I have a project I check out from CVS. I cannot change the structure (its been in place for years, and I’m one of the few people on the team using MyEclipse. I cannot get the JSP editor to do anything other than give me code assist on jsp tags (<jsp:useBean> etc)

    The pages will not find my custom tags (or any of the other tags for struts or JSTL).

    I put together a very simplified version of our project that mimics the structure of the project I’m trying to configure. You can get it from: ftp://charles:charles@buffy.stchome.com/TestCase.zip

    Eclipse 3.0.1
    ME 2.8.2
    Win XP
    Java 1.4.2_03

    I started it as a Java project. I added WPCs, changing the output directory back to bin after ME changed it to classes. When I go to edit the example.jsp page, I cannot get code assist for anything except <jsp> tags. CTRL-click on the include goes to the correct page fragment, and validating the page tells me that the taglib.jspf is ok, so I have no clue what is wrong.

    Note: the list of JARs that the project references are not all needed (obviously). We have a common set of libraries we use across all projects , so we don’t have to have them in each individual project. We simply set up our projects to reference the common lib directory.

    Any help that you can give me as to what I need to do to get teh project working would be greatly appreciated.

    #217706 Reply

    Riyad Kalla
    Member

    Charles,
    I can’t reproduce this (BTW thank you for posting the example project, it made trouble shooting extremely quick). All I did was add the Struts and JSTL libs to another project, and then add those to my build path and walla, all the errors went away. Then when I opened up the JSP page, I had autocomplete for all the tags that were from the include file definition.

    #217708 Reply

    stchome
    Participant

    Well, that always sucks to go through all that work only to have you have no issues. 😥 😥

    Ok, so I decided to try again. I went back to my original java project starting point and then added the WPCs. Instead of using the variable like I did to reference the libraries, I just used the add external jars.

    Suddenly, I was able to get the fmt, fmt_rt, c, and c_rt code assists, buts still nada on struts or my custom. I noticed that Eclipse was using a ton of memory in the task manager and the garbage collection option from the ME menu didn’t help, so I restarted eclipse. Lo and behold, after a restart I had no issues. I put the referenced libs back to the variable and still no issue.

    I’m glad I can get it working, but wish you had been able to reproduce the issue, because there is obviously an issue here. It looks like there is also a memory leak somewhere (again, no clue if its ME or the regular Eclipse).

    #217714 Reply

    Riyad Kalla
    Member

    Charles,
    1) I’m glad this is working for you now so you can continue to work
    2) I know that these ‘weird’ errors and bugs will get worked out as we get more time to bang on WTP
    3) A lot of this is going to totally change when we finally get around to revamping our project strcuture support… this is the absolute core of MyEclipse though and will take a while, but it will open up many more possibilities for us and our users.

    Thank you again for working with me on this, things WILL get smoother over time. Its inevitable as we massage this code base into perfection. (you can’t believe what we started with 2 months ago, it would make your head spin that you are even able to open files and edit them 😉

    #222941 Reply

    FYI,

    This is general information for people who need to integrate EAServer (Jaguar) with eclipse: Every management task that can be done thorugh the “sad” sybase central gui, could be done using ANT and the EAServer ant tasks. if you installed samples when you installed EAServer then you can find ant examples under $EAServer/sample/jagtool (or %EAServer%\sample\jagtool on windoze). you do not need to develop under the server itself, but use standard j2ee project (there is actualy x-doclet for EAServer (Jaguar) as well) and use ANT to deploy a built webapp (or EJB) to EAServer.

    This approach simplifies turnover as well. Since if you screw up and not package the webapp corectly it will blow up in your face during development , not turnover.

    HTH,

    Nick

    #222943 Reply

    Riyad Kalla
    Member

    Nick great followup, thank you.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Need help configuring web project in eclipse

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