How to deploy a simple war file on JBOSS 7?

I deployed a simple war file (vivek.war) that contains a simple index.jsp file successfully in Jboss-5.XX and Jboss-6.XX I just put the war file in server\default\deploy

And then went to localhost:8080/vivek/index.jsp , and everything was fine.

But similarly, for Jboss-as-7.1.1, I deployed the war file in standalone standalone\deployments and ran \bin\standalone.sh and then went to localhost:8080/Hello/index.jsp , did not display the file. it shows HTTP Status 404-/vivek/ (description The requested resource (/axis2/) is not available.) in the browser.

What is the procedure for deploying a simple war file on Jboss-as-7.1.1 and how can I get it in a browser.

If I have an idea, please help me?

Thanx

+4
source share
4 answers

In the deployment directory, you must specify an empty warname .dodeploy flag file (for example, vivek.war.dodeploy).

Additional information on flag files is available in README.TXT in the deployment directory.

+9
source

Hmm, my JBoss 7.1.1 does not need a .dodeploy file in the deployment directory. It is simple enough to copy .war or .ear or ejb.jar to deploy dir to the server to start the deployment process. Please provide server.log to see the details. Are you setting the context-root tag to META-INF / web.xml or application.xml?

+1
source

When deploying a military project in Jboss AS7, either copy the so-called exploded web application, that is, uncompressed, or the compressed .WAR web application resource file to this location $ {jboss.server.base.dir} / standalone / deployments /

  • When you decide to deploy a project in an uncompressed or unassembled form, you must specify a .dodeploy marker file, for example. vivek.war.dodeploy if the folder name is vivek.war
  • When you choose to deploy a project in the form of a compressed web application resource, a flag file is not required.

You can link to the following resources for more information.
1. A useful link for this is the Deployment Link in JBoss AS 7
2. For more information, you can see the file $ {jboss.server.base.dir} /standalone/deployments/README.txt located at the location

uncompressed means that the simple directory structure you get from the jar file after unzipping The example directory structure below is

  vivek.war |-index.jsp |- WEB-INF |- web.xml 
+1
source

It is very simple, copy your war and paste it into your standalone\deployments and run standalone.bat from your bin directory on Windows. If you are running Linux, run standalone.sh from your bin directory.

-1
source

Source: https://habr.com/ru/post/1438621/


All Articles