facebook

Struts2 / MyEclipse : Where to put struts.xml

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

    prismmed
    Member

    With Struts2 we have to have struts.xml in the class path, so it no longer works to have it under WEB-INF. So the way I got my project to deploy was to stick it under WEB-INF/classes and have it include ../struts2.xml

    2 Problems:
    1) MyEclipse cleans out the classes folder when I do a rebuild, so it deletes struts.xml
    2) MyEclipse doesn’t show the classes folder in my project browser, so its a poor place to stick config files in the first place.

    How are you Struts2 Eclipse developers doing this?

    #284576 Reply

    Loyal Water
    Member

    1) MyEclipse cleans out the classes folder when I do a rebuild, so it deletes struts.xml

    You can go to Windows > Prefs > Java > Compiler > Building > Output Folder and uncheck “Scrub output folder while cleaning projects”. I guess that will fix this issue.

    2) MyEclipse doesn’t show the classes folder in my project browser, so its a poor place to stick config files in the first place.

    There is not way to show the classes folder in the package explorer. If you go to Windows > Show View > Other > Navigator then you should be able to see the WEB-INF/classes folder.

    p.s. MyEclipse doesn’t support Struts 2 yet.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Struts2 / MyEclipse : Where to put struts.xml

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