You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Fredy Provoste <fr...@gmail.com> on 2007/10/03 06:35:26 UTC
Location of struts.xml (Struts 2)
Hi, the location of struts.xml in Struts 2, should be in WEB-INF/classes or
just WEB-INF??
I've a struts.xml in WEB-INF/classes,
<?xml version="1.0" encoding="UTF-8" ?>
<!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" />
<package name="libreria2" namespace="/" extends="struts-default">
<action name="Welcome">
<result>/login.jsp</result>
</action>
<action name="Login" class="prueba.Login">
<result name="input">/login.jsp</result>
<result name="error">/login.jsp</result>
<result>/principal.jsp</result>
</action>
</package>
</struts>
But the action "Welcome" doesn't work from index.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<s:form action="Welcome">
<s:submit></s:submit>
</s:form>
</body>
</html>
Error is
The requested resource (/libreria2/Welcome) is not available.
Thanks for help
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Location of struts.xml (Struts 2)
Posted by Chris Pratt <th...@gmail.com>.
On 10/2/07, Fredy Provoste <fr...@gmail.com> wrote:
> Hi, the location of struts.xml in Struts 2, should be in WEB-INF/classes or
> just WEB-INF??
>
Technically it has to be on the CLASSPATH. The most common place to
put it is WEB-INF/classes.
(*Chris*)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org