Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

HTTP Status 404 in jboss-as-7.1.1.Final (Brontes)

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like deploy a simple servlet injboss-as-7.1.1.Final (Brontes), my war file was deployed successfully but when i run my localhost getting HTTP Status 404 error. unable to trace the error in the configuration.
please find the below deployment structure.

Hello.war--->WEB-INF{(classes--->HelloWorld.class),(web.xml)}



I deployed Hello.war in D:\jboss-as-7.1.1.Final (Brontes)\jboss-as-7.1.1.Final\standalone\deployments\Hello.war, it was successfully deployed after that in the browser
http://localhost:8080/Hello/ it shows the error like this.

HTTP Status 404 - /Hello/

type Status report

message /Hello/

description The requested resource (/Hello/) is not available.

JBoss Web/7.0.13.Final




and my java class ,

Helloworld.java



web.xml



please any one tell me how to deploy servlet in jboss 7.1.1 final


Thanks in advance.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<url-pattern>/HelloWorld</url-pattern>

Since you have given HelloWorld as url-pattern so you have to access this like.

http://localhost:8080/HelloWorld

Hope this helps.
 
Bartender
Posts: 2265
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your deployment descriptor the servlet class name is specified as com.HelloWorld. But your source (HelloWorld.java) does not seem to show any package name.
 
Slaxmi Raj
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you saahil gupta for your reply. i tried
http://localhost:8080/HelloWorld

but the same error

HTTP Status 404 - /HelloWorld

type Status report

message /HelloWorld

description The requested resource (/HelloWorld) is not available.

JBoss Web/7.0.13.Final



Thank you Swastik Dey for your reply. i created a package called com added package statement in java class and this time also getting the same error.


would you people suggest me any other options ?

Thank you.




 
Swastik Dey
Bartender
Posts: 2265
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should check server log.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on what you have posted, the access URL should be http://localhost:8080/Hello/HelloWorld
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic