File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark ""The requested resource is not available" on running web application" Watch ""The requested resource is not available" on running web application" New topic
Author

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

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

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
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3019
    
  35

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 ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3019
    
  35

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: 518
    
    2

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: 518
    
    2


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
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3019
    
  35

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
 
Similar Threads
whats wrong in my DD ?
I am not able to Run Head First servlet example
Deployement problem
Servlet web.xml url- pattern
Resource not found