Can we deploy web application as a folder instead of war file in JBoss AS 7 - jboss7.x

I am having two queries
1. Can I deploy web application as a folder instead of war file in JBoss AS 7?
2. If not ,how to update the JSP or html or js files with out building/deploying the war file again?

JBoss supports the ability to deploy an archive file or as an exploded directory. To explode a Java EE archive, unzip the archive to a directory that is named the same as the archive file. As long as the directory name has the correct extension (.war, .ear, etc.) JBoss will deploy the directory normally. So if your war file has name HelloWorld.war, your exploded directory name should be HelloWorld.war too.
Please also note that it is recommended to edit your deployment-scanner in the standalone.xml configuration file and changing auto-deploy-exploded property back to false for exploded deployment. Quote from JBoss 7.1 Documentation:
Manual deploy mode is strongly recommended for exploded content, as
exploded content is inherently vulnerable to the scanner trying to
auto-deploy partially copied content.
Edit:
Please see link https://community.jboss.org/thread/200114. Looks like this is a confirmed bug in JBoss 7.1.1 that JBoss ignores the configuration in jsp-configuration and does not reload modified jsp. It is fixed in 7.1.2. You need to build 7.1.2 nightly build yourself. Or talk to JBoss Support if you have Enterprise support.

Related

idea cannot hot deploy files under src/main/resources

i am using idea ultimate 2020.3
i created a maven web project.
when i changed java or jsp files and choose update class and resources, they can be hot deploy.
however, if i changed files under src/main/resources, e.g. mybatis xml file under src/main/resouces/config/mapper, they cannot be hot deploy.
how can i fix it?
Make sure you are deploying an exploded artifact, see Update applications on application servers
Also make sure the module has configured Web resources (has the Web facet with Web Resource Directories and Source Roots configured:

More then one project with log4j2 on Glassfish

I'm having an EAR project, consisting from 3 modules/projects: WEB, EJB and JPA. In WEB project, i have added log4j2 for logging. Therefore i've putted log4j2.xml file into WebContent/WEB-INF/ direcotry.
Now, i have made two projects out of one: the developer version and the test version. The differs mainly in project name. They also have different file location configured in log4j2.xml file, to which to write logs.
When i deploy only one project (for instance developer version), everything works fine. However, when im deploying both projects, then, both of them are logging to the same file (it is always the file configured in log4j2 from the project that was deployed first).
My Glassfish version is 3.1.2.2 and Log4j2 version is 2.0.2.
Does any one konws how to solve it?
The log4j2 manual has details on configuration for web applications.
Are the log4j2 jar files also in the WebProject1/WEB-INF/lib and WebProject2/WEB-INF/lib folders (and not in some shared location)? That way the log4j2 classes will be loaded by separate webapp class loaders and they can have separate configurations.

Is it possible to deploy an exploded war file to JBoss 4.2.3?

I'm trying to use IntelliJ to deploy exploded wars to JBoss 4.2.3. I seem to have no problem with doing this with 5.0.1.
But when I switch the server to 4.2.3, IntelliJ tells me that the extension for the exploded war is invalid, which makes very little sense, given that it is an exploded war. It seems to be expecting a .war file extension.
It seems that JBoss 4.2.3 can only take compressed war files, though I haven't found documentation to prove it.
Is there a way to configure JBoss 4.2.3 to accept exploded wars?
JBoss 4.x requires the exploded directory to have .war in the end of its name, adjust IDEA artifact settings and it will work fine.

How can I deploy an exploded web app through WebLogic 11g administrative console?

I need to deploy a web applicataion as an exploded archive (instead of .war) due to some legacy servlet path location code used in it (ServletContext.getRealPath()). I only have web-based admin console access to the WebLogic 11g server that I intend to deploy to. However, I can't figure how to do it. I see an option for deploying archives, but not directories.
Thanks!
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/deployment/overview.html
"WebLogic Server supports deployments that are packaged either as archive files using the jar utility, or as exploded archive directories".
The link
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/deployment/overview.html
is for version 8.1. In newer versions this option does not exist in the admin console (production mode).
The only way is if you somehow access the operating system, or ask somebody to, unzip the war file in some place and then install from that directory (through admin console). You can also upload the war using admin console, and then in the uploaded directory ask to whom as access to SO to unzip it in that place.
You can also try some ninja stuff like: upload the war that you want to expand. Then make another war that contains code that unzips the war you want to expand.
To solve your problem in weblogic11gR1,In admin console in configuration tab -->web-App container click the option "Archived Real path enabled" so that you can access the servletcontext.getRealpath().

Packaging Apache configuration files with WAR

I have built a Spring 3 MVC driven RESTful web service app. I use Maven 2 to manage the application lifecycle including packaging up the WAR for distribution. As part of the end solution, I filter application requests through Apache to handle some of the GET requests for static content. This of course requires that I have several custom configurations in Apache configuration files.
My question is this, I would like to package and version these Apache configurations with ( not inside) the WAR, is there a clean way to do this? (using maven?)
Currently, the configuration changes are just included as installation instructions.
My question is this, I would like to package and version these Apache configurations with (not inside) the WAR, is there a clean way to do this? (using maven?)
I'd put such files in a dedicated module (with a pom packaging) and use the Maven Assembly Plugin to create a .zip archive to be unzipped on the target machine(s) and that would be part of the delivery.
Worked pretty well in the past.