The thing is that I do not want to replace an entire web app contained in “war” file just because there needs to be a change in a single JSP file. So is it possible to deploy JSP pages on to a Web Server without packaging it into the “war” file? If so then on which Web Servers can this be done (and how)?
Actually, I am looking for a solution like classic ASP or PHP. In these environments, there is no need for a specific XML configuration file, and they do not need to be packaged in a WAR file that gets expanded to a directory. If I were to change a single ASP/PHP page then I only need to upload that to the Web Server and they have a simple directory layout. Is that possible with JSP?
Only if the container is configured to expand the WAR on disk (most by default do), then you can just replace the file directly in the expanded WAR folder. If the container doesn’t support hotdeploy (most production server configs don’t, at least if they are managed by a very good server admin), then you also need to restart the server.
Update: if you don’t want to deploy with a WAR, but just want to manually create the deployment files, then just create the necessary folders/files in the deploy folder directly. In Tomcat 7.0 for example, which is a Servlet 3.0 compatible container, just create a new subfolder in its
/webappsfolder.It’ll be available as
http://localhost:8080/jazz/page.jsp.If you want it to be on domain root like so
http://localhost:8080/page.jsp, then rename the subfolder toROOT(yes, uppercased). You can just delete/rename the existing one which contains the Tomcat default homepage.