facebook

Exporting WAR file for Tomcat

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #282089 Reply

    sclewissr
    Member

    I am taking an Online College Advanced Java Development course and the professor has us using Java 1.5.0_06 and Tomcat 5.0.28. I created an Eclipse Web Project for the class and installed the EclipseTotale.com Tomcat Launcher plug-in. When I use the Tomcat export WAR file feature it pulls the src and Webroot diectories. Since the web-xml file, under WEB-INF, is under the Webroot directory, Tomcat cannot find it. I have to move WEB-INF out from under Webroot and delete the Webroot directory.

    I am using MyEclipse 5.5.1 GA.

    1) Should I have used a different project template? I tried several but none came as close as Web Project (I have jsps and servlets at this time).
    2) If the template is fine, is there a way to configurewhat I want exported to the WAR file? I would like to eliminate the src and high-level Webroot (keeping the sub-directory WEB-INF, etc.)

    Thank You!

    #282096 Reply

    Loyal Water
    Member

    If your using MyEclipse, why don’t you just right click on the project and go to Export > J2EE > WAR and export your project to a war. I guess thats what your looking for.

    #282114 Reply

    sclewissr
    Member

    Hi Nipun,
    That did not work. All I got was a 4K file that contained just the meta-inf, web-inf, and web-inf/classes directory. It did not export my img directory which contains my website images and my jsp files which are located at the root directory. If I use the Tomcat export I get my img directory and jsps from the root directory, BUT, I also get the high-level Webroot directory with meta-inf and web-if underneath. I can’t seem to get either one of these options to work right. With Tomcat I get too much, with your suggestion I get too little. I am trying to create a web project in MyEclipse and export to a Tomcat WAR file that can be deployed correctly. It is not going well.

    #282212 Reply

    Loyal Water
    Member

    Are you trying to deploy your application to the Tomcat Server using MyEclipse ? If you are, then I would suggest you go through this tutorial to get an idea on how that can be done.
    http://www.myeclipseide.com/documentation/quickstarts/webprojects/

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Exporting WAR file for Tomcat

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