*
The moose likes Struts and the fly likes Http 404 resource() not found error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Http 404 resource() not found error?" Watch "Http 404 resource() not found error?" New topic
Author

Http 404 resource() not found error?

Shafeequddin Mohammed
Greenhorn

Joined: Feb 04, 2012
Posts: 2
I am just trying to write a simple struts application for the first time....it is giving a HTTP 404 resource() not found error.
web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Example1</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>hello</title>
</head>
<body>

<s:form action="welcome-user">
<s:textfield name="userName" label="User Name" />
<s:submit />
</s:form>

</body>
</html>

Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

please post the exception you are getting in console.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Shafeequddin Mohammed
Greenhorn

Joined: Feb 04, 2012
Posts: 2
Thanks Mohan...I just got it solved....I don't know the issue but I retried it and it is working...Thanks
Yuta Lolap
Ranch Hand

Joined: Jun 03, 2012
Posts: 80

how did you get it solved? i am getting the same error!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Http 404 resource() not found error?
 
Similar Threads
problem in Struts2 while running an application
ClassCastException when starting Tomcat with Struts2 Filter
Struts2: No configuration found for the specified action
The requested resource () is not available.
Jsp is not displaying in Struts2