View war file as folder - JBOSS - jboss7.x

My old company using glassfish, when I deployed I can view deployed as folder, view inside with .xhtml and .class file
Ex: if I need hot fix something, I just access to folder that glassfish deploy and change something.
How can I do it JBoss, when deploy success just have a *.war, I cannot view inside.

It depends how you are publishing you war.
If you are using Eclipse to deploy WAR follow these steps.
Goto server view
Double Click on server
Goto Deployment tab
Uncheck "Deploy projects as compressed archives"
Publish it again.

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:

Deploy ear file to weblogic 12.1.3 from IntelliJ IDEA 2018.2.5 x64

I have a java EE 5 project. I'm building a project with maven. I use IntelliJ IDEA 2018.2.5 x64.I use weblogic 12.1.3. In the Department of deployment( edit configuration -> Deployment ) specify the ear file. Why doesn't IDEA put ear file in localhost:port/console -> deployments when running ?
Make sure the Runtime Server is added correctly in IntelliJ. Once Added Correctly,You should see the Application servers Tab, where you could Add/Remove Applications effectively.
The Status of the deployment can be seen as Module with a tick Mark in Application Servers Tab.
The answer was simple, the ear file did not deploy due to the fact that I did not enter the domain name and password in the configuration

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

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.

How do you deploy a non-web Java app through CloudBees Jenkins "Deploy Now" feature?

With CloudBees now supporting deployment of Java applications, is it possible to use the post-build action in Jenkins "Deploy to CloudBees" to deploy your app? Furthermore, I'd like to use the Maven assembly plugin's jar-with-dependencies goal so that I can simply and automatically deploy my entire app to CloudBees right through Jenkins.
While the current CloudBees deployer Jenkins plugin appears to not support this, in fact it does. Here are the steps that after much trial and error worked for me:
Include the jar-with-dependencies maven plugin in your pom.xml. I used the <goal>single</goal> and <descriptorRef>jar-with-dependencies</descriptorRef> described here. That will put an additional jar file in your target folder {artifactId}-{version}-jar-with-dependencies.jar
Deploy that jar via the CloudBees API. The last line of this page explains how to do that. Specify your runnable jar, make sure the runtimeContainer=java, and the jar file to be uploaded, and it should deploy. Even though CloudBees says to use a zip file, a jar file works just fine.
Once that has been deployed once via the command line, your app ID now "remembers" those settings so that it can be done via Jenkins so long as you're doing the CloudBees Deploy to that same app. In your Jenkins job, add the "Deploy to CloudBees" Post-build action to your configuration. Click "Add Web Application" (strange, I know, since it's not a web-app! CloudBees says they will work to change that...), select First Match (even if it's a Maven project, use First Match), enter your application ID that you deployed your app to in step 2, and then enter the full name of your jar file and try your build again. It should upload your jar file and activate the instance in your CloudBees PaaS. Note that this still hard-codes the version in the jar file - I am working to see how to setup a variable for the version of the jar file so that it corresponds to the Maven build version.
Once you have it setup correctly and deployed initially with the bees sdk, it should just deploy from the deployer plugin on Jenkins as a war normally would.
Once set up, the settings that define where your main class is persist between deploys.

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().