-
1. Re: Hot Swap Compiled JSP's
mculpepper Dec 15, 2004 5:57 PM (in response to springy)It's possible to do this if instead of deploying an actual compressed war, you create and deploy an "exploded" package (basically just a folder with a .war extension). In the packaging configuration of your project properties, if you open the properties of your package, and click the "Exploded" check box, and re-run packaging, you will have an exploded package
After deploying the exploded war into JBoss (make sure to undeploy you're old archive first), you should setup a user-defined Deploy target that points to the path of where the JSPs in your deployed exploded archive are in the JBoss deploy directory. You can create a user-defined target by going into Window > Preferences > JBoss-IDE > Deployer, and clicking the "Add" button on the right side of the "List of user-defined targets". The type of deployment will be a File System Copy. Browse for the path, it will probably look something similar to:
$JBOSS_HOME/server/default/deploy/yourwebapp.war/yourwebroot
At this point you can now right click on the JSP you want to update, and re-deploy it explicitly to the deployment target that you just created. In order for JBoss to pick up the changes under an exploded archive, you'll have to make sure to "touch" the WEB-INF/web.xml (update the timestamp) which forces JBoss to reload your JSP. -
2. Re: Hot Swap Compiled JSP's
springy Dec 16, 2004 4:42 AM (in response to springy)Hi,
That approch works but it doesn't really save me much time over deploying the whole war file from scratch. Especially if I have to touch the web.xml each time.
Wouldn't it be great if you could use the hot class swapping feature of java. After all a JSP is just a compiled class.
And whilst i'm on the subject of time saving features. Is there anyway to make the scope of the shortcut keys wider for the XDoclet, Packaging and Deployment features? To use the xDoclet or Packaging feature you need to have the project in focus in the Package Explorer. And to use the Redeploy feature you have to have the war file selected. I've found I might as well you the mouse if i'm going to have to select it with the mouse first!! I understand this would bugger up if you had more than one project open but couldn't it remmber the last one you ran, just like the Run or Debug functions in eclipse.
Great stuff otherwise... Just wanted to suggest a few things to make life easier.
Tim..