facebook

Looking for the right testing sequence for Tomcat and JSF

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    Ed Thompson
    Member

    I am running Eclipse 3.0
    MyEclipse 4M2
    Tomcat 5.5.9
    all under Windows XP

    I am trying to discover the ‘right sequence for successfullt redeploying my app so I can test, getting around file lovking issues etc…

    Starting wqith a working app, I find a JSF bug, or weant to make a chnage. I make it in my workspace, redeploy, and bring up the pager in a browser. I get

    1) app not found
    or
    2) unable to find javax.faces. something
    or
    3) WAR file corrupt
    or
    4) file lock on redeploy
    or

    I try
    redeploy
    stop Tomcat then redeploy
    stop tomcat, clean out directories under webapps, start tomcat, redeploy
    stop tomcat, clean out directories under webapps, redeploy, start tomcat

    The results always inconstistent. I don’t know which sequence will consitently get me the results I want, IE I can retest the JSF page wtih minimal effort.

    Can those in the know shed some light???

    #233938

    Riyad Kalla
    Member

    1) Shut down Tomcat
    2) Remove your project deployment
    3) Create a new deployment of type “Exploded” to Tomcat
    4) Start Tomcat back up

    5) Load a page
    6) Switch back to MyEclipse, edit that page, make a change like adding “Hello” and save it (Make sure Project > Build Automatically is turned on)
    7) Switch back to browser, hit refresh. Should see change.

    NOTE: There are JSF caching issues when trying to change layout or styles with DataPanels, this is a framework issue and has nothing to do with myEclipse’s abilityt o hot deploy changes.

    #233946

    Ed Thompson
    Member

    I had no idea it was that simple, but I tried it, and it’s great!

    Is the same thing true for java classes, IE if I chnage a java class it gets rebuilt and de[ployed automagically?

    #233947

    Riyad Kalla
    Member

    Yep, but for Java classes make sure you have your context in Tomcat configured to be reloadable (reloadable=true) so it recognizes and reloads the changed classes for you.

    #233951

    peterstb
    Member

    Can you do this in a BEA deployment as well? I’m developing against a local BEA instance and am currently using a “packaged” deployment… It would be nice to not have to either shut down my BEA instance or use the BEA console to remove and redeploy an app.

    Thanks!

    #233952

    Riyad Kalla
    Member

    Peter,
    It’s a little different with full J2EE servers like WL, but the basic idea is this:

    1) deployed packaged to WL
    2) Login to admin console and “deploy” the app into the server
    3) Shut down the server
    4) Remove your package deployment in MyEclipse
    5) Create a NEW deployment of type “Exploded” in MyEclipse
    6) Start app server

    The idea is that you have to deploy it using the admin console, so after you do that, we remove the packaged version from MyEclipse and then “overlay” an exploded one ontop of the deployed one in WL. The server should reload changes, if it doesn’t make sure your server is setup to do so from the Admin console.

    #233956

    peterstb
    Member

    Thanks for the response! So…

    I have an application directory C:\MYAPP, which contains all of my source code:
    1. I created a Project Deployment (packaged archive) to point to C:\MYAPP\MYAPP.WAR
    2. From the BEA console, I created a new web deployment, pointing directly to C:\MYAPP\MYAPP.WAR
    This all works fine and I am able to navigate through my web application. So then, if I understand correctly:
    1. Shut down my WL instance
    2. Remove the Project Deployment from myEclipse
    3. Create new “exploded” Project Deployment in myEclipse (I had to say C:MYAPP\somedirectory because it didn’t like me creating a deployment where a deployment already existed)
    4. Restart the app server

    I can’t seem to get this to work? I keep getting the following error while trying different things:
    “Deployment is out of date due to changes in the underlying project contents. You’ll need to manually “Redeploy” the project to update the deployed archive.”

    Any thoughts?

    Thanks!
    Todd

    #233957

    Riyad Kalla
    Member

    Todd, your deployments shouldn’t be going into your project dir. If you have WebLogic configured correctly and are not using a Custom Location deployment, when you select packaged deployment it should want to put it in someplace like c:\bea\blahblahblah, tha’s what you want to do with the exploded as well. Don’t put it someplace custom.

    The trick is that we are fooling the WL server by overlaying an exploded deployment ontop of the one it deployed previously.

    #233959

    peterstb
    Member

    Very good… Thanks! I will see if I can get this going…

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Looking for the right testing sequence for Tomcat and JSF

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