  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Subject: Location of struts.xml (Struts 2) | Subject: Location of struts.xml (Struts 2) 2007-10-02 - By Fredy Provoste
Back 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 (See http://UTF-8.ora-code.com)" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2 (See http://uts-2.ora-code.com).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 (See http://ISO-8859.ora-code.com)-1" pageEncoding="ISO-8859 (See http://ISO-8859.ora-code.com)-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 (See http://ISO-8859.ora-code.com)-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@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |