facebook

[Closed] Web root when adding Struts capabilities

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

    oervasti
    Member

    I have an issue that might cause problems later. I’m using version 5.1.0 of MyEclipse.

    In my web project, I’ve defined the web root folder by the name WebRoot. I have also changed the template (in Window -> Preferences -> J2EE -> Web Project) so that WebRoot is defined as the web root folder name for a new web project. But when I add Struts capabilities (version 1.2) to this project, the wizard shows just {/} as the web root folder. It can’t be changed. Instead I changed the Struts config path to /WebRoot/WEB-INF/struts-config, from /WEB-INF/struts-config that was suggested by the wizard. Is there another way to define the web root correctly for Struts?

    I’m still learning to use Struts, so I don’t know if this is going to be a problem at some point, but would appreciate any help.

    Regards,
    Valtteri

    #270794 Reply

    Riyad Kalla
    Member

    In my web project, I’ve defined the web root folder by the name WebRoot. I have also changed the template (in Window -> Preferences -> J2EE -> Web Project)

    “WebRoot” is actually the default name… minor note, but might indicate something was squirrely if that wasn’t what you had out of the box..

    It can’t be changed. Instead I changed the Struts config path to /WebRoot/WEB-INF/struts-config, from /WEB-INF/struts-config that was suggested by the wizard. Is there another way to define the web root correctly for Struts?

    Ahhh. The setting you changed is the system-wide default for *new* projects. The problem with Struts capabilities is that it’s reading the *existing* web root dir off of your project, which is stored in your .mymetadata file. What you need to do is change that value to /WebRoot, then the Struts wizard will pick it up.

    #270854 Reply

    oervasti
    Member

    Ahhh. The setting you changed is the system-wide default for *new* projects. The problem with Struts capabilities is that it’s reading the *existing* web root dir off of your project, which is stored in your .mymetadata file. What you need to do is change that value to /WebRoot, then the Struts wizard will pick it up.

    That worked. Thanks for the help!

    #270865 Reply

    Riyad Kalla
    Member

    Glad it worked.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] Web root when adding Struts capabilities

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