• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTTP Status 404

 
Greenhorn
Posts: 4
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, i want test my application with JBoss and i get error: HTTP Status 404.

my web.xml

<?xml version="1.0"encoding="UTF-8"?>
<web-appversion= "2.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>TestWeb</display-name>
<servlet>
<description>TestClient</description>
<display-name>TestClient</display-name>
<servlet-name>TestClient</servlet-name>
<servlet-class>servlets.TestClient</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestClient</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>


my URL: http://localhost:8080/TestWeb/

how to solve this problem ?
 
Ranch Hand
Posts: 781
Netbeans IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you have mapped your servlet to URL /test I would have expected you to use

http://localhost:8080/test
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or perhaps http://localhost:8080/TestWeb/test?
 
James Sabre
Ranch Hand
Posts: 781
Netbeans IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Or perhaps http://localhost:8080/TestWeb/test?



Yep. Assuming that the war file is TestWeb.war (or the web directory is TestWeb) then you are right. My mistake.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, Alex has a welcome page configured (index.jsp) so he shouldn't really have to use the /test url-pattern to get past that 404. My guess is that Alex is using an incorrect context for the web application.

Alex, what's the name of the war file that you are deploying? Does it have a jboss-web.xml? If not, then the context should be the name of the war file (without the .war suffix). So if you are deploying blah.war, then you should be using http://localhost:8080/blah. Note that the display-name that you use in the web.xml has no role to play, when it comes to accessing the application.
 
Alex Webs
Greenhorn
Posts: 4
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WAR file: "TestWeb.war", but i don't understand why this file is created in this directory "E:\jboss-6.0.0\server\default\tmp\vfs\"
i'm not using file "jboss-web.xml", but i have this file.
in directory: "E:\jboss-6.0.0\server\default\deploy" i have file "Test.ear"

Jaikiran Pai wrote:Actually, Alex has a welcome page configured (index.jsp) so he shouldn't really have to use the /test url-pattern to get past that 404. My guess is that Alex is using an incorrect context for the web application.

Alex, what's the name of the war file that you are deploying? Does it have a jboss-web.xml? If not, then the context should be the name of the war file (without the .war suffix). So if you are deploying blah.war, then you should be using http://localhost:8080/blah. Note that the display-name that you use in the web.xml has no role to play, when it comes to accessing the application.

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the logs that you see on the server console when you deploy your application.

P.S: While posting those logs remember to wrap it in a code block by using the "Code" button in the message editor window.
 
Alex Webs
Greenhorn
Posts: 4
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JBoss server log

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The deployment has failed and hence you aren't able to access the application. Are you packaging EJBs in your .war file? Please provide more details on what the app contains and how it's packaged.
 
Alex Webs
Greenhorn
Posts: 4
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Project: Test
2 modules: EJB and Web
TestEJB -> New -> Interface -> HelloWorldLocal.java



TestEJB -> New -> Class -> HelloWorldBean.java



WebContent -> New -> JSP -> index.jsp



TestWeb -> New -> Servlet - > TestClient.java



TestWeb -> Properties -> Deployment Assembly, and check TestEJB.jar


Jaikiran Pai wrote:The deployment has failed and hence you aren't able to access the application. Are you packaging EJBs in your .war file? Please provide more details on what the app contains and how it's packaged.

 
reply
    Bookmark Topic Watch Topic
  • New Topic