aspose file tools*
The moose likes Struts and the fly likes Requested Resource is not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Requested Resource is not available" Watch "Requested Resource is not available" New topic
Author

Requested Resource is not available

Booma Devi
Ranch Hand

Joined: Nov 02, 2011
Posts: 61
Hi,

I am new to struts.. while running a struts application i am getting an error "requested resource is not available"..

1) I have installed the jdk 1.6 and the path is C:\Program Files\Java\jdk1.6.0_25\bin
2) I have installed the tomcat 6 version and the path is C:\Data\apache-tomcat-6.0.20\webapps
3) I have created the package called website.web and placed the servlet program as below

package website.web;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class WelcomeServlet extends HttpServlet {


protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
PrintWriter p=resp.getWriter();
p.println("<h1> HELLO SERVLET </h1>");


}


}

4) Then i have given the path of servlet in web.xml file as below

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>website.web.WelcomeServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/WelcomeServlet</url-pattern>
</servlet-mapping>

</web-app>

5) Then started the tomcat server ( tomcat server home page is displayed) and typed the URL in the browser as below

http://localhost:8080/Final(Project Name)/WelcomeServlet


I am getting the error message as below
type Status report

message /Final/WelcomeServlet

description The requested resource (/Final/WelcomeServlet) is not available.

Can anyone please help me how to solve this error?





 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Requested Resource is not available