• 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

Requested Resource is not available

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?





reply
    Bookmark Topic Watch Topic
  • New Topic