aspose file tools*
The moose likes Struts and the fly likes The Struts dispatcher cannot be found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "The Struts dispatcher cannot be found" Watch "The Struts dispatcher cannot be found" New topic
Author

The Struts dispatcher cannot be found

Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Hi all,

I'm working with a new app in struts2 and hibernate. But when I do running the app to appear the error: "The Struts dispatcher cannot be found".

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<display-name>Struts 2</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

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

</web-app>

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources" value="ApplicationResource"/>

<package name="login" extends="struts-default" namespace="/">
<action name="validateUser" class="test.actions.LoginAction" method="validateUser">
<result name="success">index.jsp</result>
<result name="error">/jsp/error.jsp</result>
</action>
</package>

</struts>

For the moment I have only the index.jsp, with the following code:


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/estilos.css" type="text/css" media="screen" />
<title>test</title>
</head>
<body>
<s:text name="general.title"/>
</body>
</html>



Note, That if I remove this line "<s:text name="general.title"/>" , the error disappear.


Thanks in advance!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The Struts dispatcher cannot be found