facebook

WebSphere 6.1 and WAR file

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #262856 Reply

    Ralph Largo
    Member

    Your documentation says that WS6.1 will not deploy a WAR file unless it is in an EAR file first. This is not true. You can deploy a WAR file if you fill in the Context Root in the IBM admin console. However, MyEclipse will not hot deploy or dynamic reload if you do so. We do not have EJBs, and so do not want to make a dummy EJB just to get MyEclipse to work. If I manually export a jsp file to the exploded installed apps directory, WS will happily reload it without a restart. (With proper configuration of the app). How do I get MyEclipse to copy modified files over when I do a save so that I can dynamically reload pages during development?

    Everything else works fine, including starting and stopping from within the IDE. Re-deployment of the WAR works fine from the server view, except you then have to go to the IBM admin console to manually update the app while it is still running, and this takes a lot of unnecessary time.

    Thanks.

    #262859 Reply

    Scott Anderson
    Participant

    How do I get MyEclipse to copy modified files over when I do a save so that I can dynamically reload pages during development?

    When you deploy only a WAR to WebSphere, it creates an EAR behind the scenes and wraps it for you. If you don’t create your own EAR, the deployment layout in the applications area for your WAR looks like an exploded WAR in the auto-generated EAR, which is not what MyEclipse expects for a simple Web project. That’s why we suggest you create your own “wrapper” EAR project; so the deployment layouts will match.

    Here’s what will likely work around the issue if you don’t want to create an EAR: Create a Custom Deployment (in addition to your existing WebSphere 6.1 deployment) for the Web project. With a Custom Deployment, you can set it to deploy the project, in exploded format, anywhere on your file system. You’ll want to pick the location so that the deployment location for the Custom Deployment of your Web Project will exactly overlap with the exploded war the WebSphere creates in its “installed applications” cache area. After you do this, when you save you modify files in MyEclipse in your Web Project, our Sync-On-Demand deployer will keep the Custom Deployment sychronized, thereby overwriting what’s in WebSphere’s cache. I hope that makes some sense. It’s basically the same technique described in the WebSphere 6.1 tutorial, but just with a Web Project instead of an EAR.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: WebSphere 6.1 and WAR file

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