| Author |
"The requested resource is not available" on running web application
|
Kumar Raja
Ranch Hand
Joined: Mar 18, 2010
Posts: 457
|
|
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 ?
|
Regards
KumarRaja
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2701
|
|
Kumar Raja wrote:<j2ee:url-pattern>Authenticate.do</j2ee:url-pattern>
Change it as:
<j2ee:url-pattern>/Authenticate.do</j2ee:url-pattern>
|
Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
|
 |
Kumar Raja
Ranch Hand
Joined: Mar 18, 2010
Posts: 457
|
|
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
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2701
|
|
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
Joined: Mar 18, 2010
Posts: 457
|
|
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
Joined: Mar 18, 2010
Posts: 457
|
|
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
Joined: Jan 28, 2008
Posts: 5575
|
|
Kumar Raja wrote:
where do you find this? I surprised j2ee:web-app
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2701
|
|
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
Joined: Jan 28, 2008
Posts: 5575
|
|
remove your namespace j2ee . It will work . dont know the exact reason
|
 |
 |
|
|
subject: "The requested resource is not available" on running web application
|
|
|