Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deployement problem

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put TickectSystem.war file into D:\Alternate_C_Drive\jboss-5.1.0.GA\server\default\deploy folder.
Then start the Jboss using run.bat file located at D:\Alternate_C_Drive\jboss-5.1.0.GA\bin.
it starts fine.But i can't find any any folder name TickectSystem.
If it was doplyed correctly there should be a folder name TickectSystem in D:\Alternate_C_Drive\jboss-5.1.0.GA\server\default\deploy.
where is the error?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:I
Then start the Jboss using run.bat file located at D:\Alternate_C_Drive\jboss-5.1.0.GA\bin.
it starts fine.But i can't find any any folder name TickectSystem.
If it was doplyed correctly there should be a folder name TickectSystem in D:\Alternate_C_Drive\jboss-5.1.0.GA\server\default\deploy.


The .war (archive) will be extracted to a tmp folder within the AS. To see whether the application is deployed successfully, you can check the logs on the server console which will show something like:



or you can even try to access the application through the browser http://localhost:8080/TicketSystem

P.S: I'm assuming that you haven't overridden the context through jboss-web.xml.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please tell me how to overide context through jboss-web.xml ?
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Location: WEB-INF/jboss-web.xml

http://community.jboss.org/wiki/HowdoIoverridethewebcontextroot
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are many jboss-web.xml files in my jboss folder.
can you tell me which one?

here is path for my deployee folder
D:\Alternate_C_Drive\jboss-5.1.0.GA\server\default\deploy
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:there are many jboss-web.xml files in my jboss folder.
can you tell me which one?

here is path for my deployee folder
D:\Alternate_C_Drive\jboss-5.1.0.GA\server\default\deploy

As written in my post "WEB-INF/jboss-Web.xml" - which means in your Web application (war file)
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my web.xml


but it gives errors in line <jboss-web>
here is error

 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not in web.xml you put the <jboss-web> tag - but in a file called jboss-web.xml
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.
here is my jboss-web.xml file



it in WebContent folder of my web application.
is it ok now.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be ok now - but the best verification is to test it ;)

Try rename your war file to somthing meaningless, and then see what happens.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is working fine.
anyway i put a war file without a jboss-web.xml file.
it is also working fine.
1)i don't know why?
2)can you tell me where is the place to jboss extract the war files?
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:it is working fine.
anyway i put a war file without a jboss-web.xml file.
it is also working fine.
1)i don't know why?
2)can you tell me where is the place to jboss extract the war files?


1) did you change the name of the war file to something different then what the context is??
2) the file will be extracted to JBOSS/server/default/tmp/deploy - where the name will be like 'tmp<SOME_ID><WAR_NAME>-exp.war'
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I change the name of war file to Abc.war.
now i type http://localhost:8080/Abc/ in Explore.
it is working fine.
but still i am unable to fine extracted war file in tem folder.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:I change the name of war file to Abc.war.
now i type http://localhost:8080/Abc/ in Explore.
it is working fine.


But did you define a different name in jboss-web.xml ??

The test should be like e.g.:

WAR=Abc.war
<context-root>TicketSystem</context-root>

this should give you:

http://localhost:8080/Abc/ = wont work
http://localhost:8080/TicketSystem/ = works

Samanthi perera wrote:but still i am unable to fine extracted war file in tem folder.

The extracted file should be in JBOSS/server/default/tmp - but maybe it is direct in the default/tmp root inside a folder with the name of some generated ID
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the problem is that i created a war file without a jboss-web.xml fle.
But it is also working.
my problem is how it is working without a jboss-web.xml.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
project attached as a zip file
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't use jboss-web.xml then the name of the war file will be used as the context root
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put a jboss-web.xml file inside the project and make a war file.
here is jboss-web.xml


but the starting line of this xml file give this message



when i start jboss server and type this in IE
http://localhost:8080/Abc/

it is working.it gives expected results.
but when i type this
http://localhost:8080/TicketSystem
it says


i don't know why?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic