Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"The requested resource is not available" on running web application

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I'm trying to run a small web application deployed in JBoss 4.0.4 version but receiving the following error message
"The requested resource (/EnterpriseWeb/Authenticate.do) is not available". I'm not able to figure out the issue. Could you please guide me here ?

My HTML



web.xml


After starting JBoss, If i hit http://localhost:8080/EnterpriseWeb/Authenticate.do, I receive the message
The requested resource (/EnterpriseWeb/Authenticate.do) is not available.

I see this message even when I click on submit button on the html page.

The issue seems to be very trivial but could not figure out the exact reason. Can any body point the mistake, I'm doing here ?

 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4437
256
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar Raja wrote:<j2ee:url-pattern>Authenticate.do</j2ee:url-pattern>

Change it as:
<j2ee:url-pattern>/Authenticate.do</j2ee:url-pattern>
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Devaka,

It did not fix the problem. Also, since we have another mapping /*.do, should not this map to any "do" urls.

Thanks
Kumar
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4437
256
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing your Servlet code, I feel everything is correct in your XML.

Just one suggestion...

Kumar Raja wrote:xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"

Change it as:
xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, I changed the XMLNS as suggested, but it did not work out.

Below is the code of the servlet


Is there any way I can actually find the reason why it is failing, like in some logs or run time errors. Does Tomcat 5.5.17 that is shipped with JBoss give me some run time error, I mean real error stack.
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ok, I got this fixed. But not sure what was the reason earlier.

I changed my web.xml based on "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>Commander</servlet-name>
<servlet-class>com.enterprise.web.Commander</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Commander</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>



My earlier web.xml is based on web-app 2.4 schema. Is JBoss 4.0.4 not supportive for Servet 2.4 ? Is this the conclusion? Or was that something I did terribly wrong ?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar Raja wrote:




where do you find this? I surprised j2ee:web-app
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4437
256
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:where do you find this? I surprised j2ee:web-app

That's the XML namespace he used. The namespace for 'j2ee' is defined in the root element.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
remove your namespace j2ee . It will work . dont know the exact reason
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic