struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sivacool <siva.chaitanya...@gmail.com>
Subject There is no Action mapped for namespace / and action name getTutorial. - [unknown location]
Date Wed, 19 Dec 2012 11:57:00 GMT


<http://struts.1045723.n5.nabble.com/file/n5711456/yzcu3ngv577fbopcv1l_ProjectStruture.png>


*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_3_0.xsd"   
id="WebApp_ID" version="3.0">  
  
  <display-name>Struts2Starter</display-name>  
      
  <filter>  
    <filter-name>struts2</filter-name>  
   
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</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 &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
&quot;http://www.w3.org/TR/html4/loose.dtd&quot;>  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">  
<title>Insert title here</title>  
</head>  
<body>  
<form action="./getTutorial.action">  
    Username: <input type="text" />  
    <input type="submit" value="Submit" />  
</form>  
</body>  
</html>  

*struts.xml
*
<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE struts PUBLIC &quot;-//Apache Software Foundation//DTD Struts
Configuration 2.0//EN&quot;   
&quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;>  
  
<struts>  
    <package name="default" extends="struts-default">  
        <action name="getTutorial" class="com.test.TutorialAction">  
            <result name="success">/success.jsp</result>  
            <result name="failure">/failure.jsp</result>  
        </action>  
    </package>  
</struts>  

*TutorialAction.java
*
package com.test;  
  
public class TutorialAction {  
    public String execute()  
    {  
        System.out.println("Hello from execute");  
        return "success";  
    }  
}  



--
View this message in context: http://struts.1045723.n5.nabble.com/There-is-no-Action-mapped-for-namespace-and-action-name-getTutorial-unknown-location-tp5711456.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message