facebook

Adding Struts Capabilities to existing eclipse project

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

    Klaus UNGER
    Member

    Hello all,

    I did search a bit (sorry, only but only a bit, because I’m currently moving from one flat to another) for a solution, but did’nt find any!

    So any hints and redirects are welcome!

    I’ve an existing eclipse-project with an more or less complex ant build-file and manually setup struts-, jstl-, hiberante-capabilities (.jars, .tlds, etc. are coming from a central software repository)

    How to add struts-capabilities to this project, so that we can use struts-config-editor, hibernate-editor, etc. …

    As mentioned before, any hints are highly welcome!

    thx & kind regards
    K:)

    #227377 Reply

    Riyad Kalla
    Member

    K,
    We can’t really start to provide suggestions until you can give us a good outline of what the project looks like. List all your dirs along with short desc of what is in them, then we can suggest. Also please use either quote blocks or code blocks (Code/Quote button below) to enter the info into so the indentation is preserved.

    #227591 Reply

    Klaus UNGER
    Member

    hello,

    I’ve a central software repository (represented as a eclipse project, named repository) and a normal eclipse java project for my work.
    Both are on the same level in my workspace! The repository holds several libraries and frameworks (Struts, Hibernate, JSTL, Log4J, …) in a special structure e.g.

    
      Hibernate
        2.1.7
          docs
          lib
          lib-dependencies
          lic
          src
        2.1.8
          docs
          ...
      Struts
        2.1.4
          docs
          lib
          lib-dependencies
          lic
          src
    

    my project has the following outling

    
      build                                          compile output
      dist                                            packaged war-files
      docs                                           generated documentations (java-doc, code-coverage, todo-lists, metrics, ...)
      src                                             my java-sources (Actions, BusinessLogic, ...)
      src-gen                                       generated sources (Hibernate Model Classes coming from Middlegen)
      src-test                                      JUnit test-classes
      src-web                                      the web-root
        images
        styles
        scripts
        META-INF
        WEB-INF
          tld
          config      
    

    As mentioned before, I have a rich Ant build.xml, which is doing almost everything I want … 😉
    I just want to use the editors of myeclipseide for struts-config.xml, HQL-Database-Queries, …

    Please respond quickly!

    Thx in advance!
    K:) for Klaus

    #227596 Reply

    Riyad Kalla
    Member

    Klaus,
    Just be sure to add Web and Struts capabilities to your project project, set your Web Root dir to be /src-web. The only thing I can see that might be a bit of an issue is that MyEclipse will attempt to make your output dir /src-web/META-INF/classes, so you might need to change that back. Also you won’t be able to use our deployment tool but it sounds like your Ant script already handles all this, so no worries. Also when adding Struts capabilities, be sure to point at your existing struts-config.xml file.

    Additionally your Repository project, IMO, should be replaced by a set of User Libraries that you configure and setup within Eclipse, then they can be added/removed to projects at will.

    #227623 Reply

    Klaus UNGER
    Member

    Riyad,

    Thx for the quick reply!

    I’ll try and let you know about the outcome of my work!

    Why will I not be able to use de deployment tool?

    Thx for the hint with the user libraries …
    but how to use them in ant-scripts? – any hints are welcome!

    kind regards
    K:)

    #227632 Reply

    Riyad Kalla
    Member

    Why will I not be able to use de deployment tool?

    The deployment tool expects your WebRoot folder to become the root of your deployed webapp, it doesn’t perform a combination of assets to create the resulting directory, it just copies out the WebRoot folder recursively out to your app server. So in your case your compiled output dir is /build and not a /src-web/WEB-INF/classes, so when the deployment tool deploys, it will completely miss your class files.

    This will all be changed in our 5.0 release however. (late august-ish time frame).

    but how to use them in ant-scripts? – any hints are welcome!

    Oh, in that case don’t use them. They are an Eclipse construct, I don’t know that you can get to them ‘natively’ via an Ant script. Sorry didn’t realize this was necessary.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Adding Struts Capabilities to existing eclipse project

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