Here is one way to accomplish this. First remove the current default app at server/xxx/deploy/jbossweb-tomcat55.sar/ROOT.war (remove the whole directory). Second, add a jboss-web.xml file to your web app's WEB-INF directory and put the following it it:
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/</context-root> </jboss-web>
After doing the configuration changes I get this error afterorg.jboss.deployers.spi.DeploymentException: Failed to create web module.......
any idea abt this ?
It would help if you posted the full stack trace...
Also, do you get this error when you restart the app server or when you attempt to access your application via a browser?
This exception occurs during the restart of the app server. The application is not accesible there after....
Below is the exact stack trace........
22:07:23,380 ERROR [TomcatDeployer] Error during deployment: file:/C:/JBoss/jboss-5.0.0.Beta1/server/default/deploy/ITMS.war/
org.jboss.deployers.spi.DeploymentException: Failed to create web module
Caused by: org.jboss.deployers.spi.DeploymentException: Error creating rar deployment file:/C:/JBoss/jboss-5.0.0.Beta1/server/default/deploy/ITMS.war/
... 14 more
Caused by: javax.management.MalformedObjectNameException: Unterminated key property part
... 15 more
Double check the jboss-web.xml file, you might have mistyped something. Also, if you remove the jboss-web.xml file (or remove the < context-root > entry from that file), does the war deploy properly?
yes .... if i remove the file the app is deployed properly....
I did a small change ..... added the value "/ITMS" to the <context-root> node....and restarted .....there were no errors this time....however when i accessed http://localhost:8080/ .... it brought up the index page ..... but i have removed the ROOT.war dir completely......so no idea as to where this page is fetched from.......
Did you remove ROOT.war from the correct server configuration? If that index page is still showing up it is still in the server configuration you are running.
Also, what version of JBoss AS are you using? Since you never said, I have been assuming 4.0.5.
If I may guess from the above stacktrace, it is an 5.0.0 BETA JBoss.
I would hint at a misspelled entry and / or the usage of a wrong JBoss runtime installation, when the index page is still coming up, although the ROOT.war has been removed. Did you delete the tmp and work directories? Perhaps the index page is being served from there.
I have deployed my application in the default configuration... So removed the root.war directory from default/deploy folder......also tried deleting the tmp and work folder ...but the index page still comes back......
There are root.war directories in other configuration...shud i try removing them as well.....? or is something to do with Jboss 5.0 beta....?
Looks like there is an issue regarding this in the 5.0 beta. I am getting the error:
14:48:21,759 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of
incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error
loy/jmx-console.war/ -> javax.management.MalformedObjectNameException: Unterminated key property part
So yes, this does appear to be a 5.0 beta issue.
If you have to use 5.0, you could always remove the ROOT.war and rename your war file to ROOT.war.
Finally, I think the home page showing up probably has to do with it being cached by the browser.
Deleting the ROOT.war directory and renaming the custom app to ROOT.war didnt help either. Not able to understand where things are going wrong. There is no exception in the server startup. But a page not found appears when http://localhost:8080/ is accessed. No redirection occurring as such .The jboss-web.xml file has this
where ITMS is the name of the application. Any clue?
This seems to be the problem with jboss-5.0.0.Beta1 because when i tried using jboss-4.0.5.GA it is working fine. Below is jboss-web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 2.4//EN"
When I hit the URL "http://localhost:8080" I could see my application index page.