... as I seem to get stuck on the simplest things.
For example:
I have set up Eclipse with MyEclipse (thanks, Jim Barrows, for this recommendation)
and just trying to get simple page flow working. But I don't seem to understand 'forwards',
as I have a 2-line index.jsp:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<logic:redirect forward="welcome"/>
that seems to work but then a forward from that page, Welcome.jsp:
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html>
<head>
<html:base />
<title>Welcome to eTracICR</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body> <html:link forward="signon">Sign in</html:link> <br> </body> </html:html>
Tomcat gives this error:
javax.servlet.ServletException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForward named signon
Even though I am looking at a global forward and a local forward named 'signon', and an 'actionMapping' to match, it looks to me, all approved by MyEclipse so I am at least not making any dumb XML syntax errors:
?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <data-sources /> <form-beans > <form-bean name="signonForm" type="app.SignonForm" />
</form-beans>
<global-exceptions />
<global-forwards >
<forward name="welcome" path="/Welcome.do" />
<forward name="signon" path="/SignOn.do" />
</global-forwards>
<action-mappings > <action parameter="/Welcome.jsp" path="/Welcome" type="org.apache.struts.actions.ForwardAction" > <forward name="signon" path="/SignOn.do" /> </action>
<action attribute="signonForm" input="/SignOn.jsp" name="signonForm" path="/SignonSubmit" scope="request" type="app.SignonAction" /> <action parameter="/SignOn.jsp" path="/SignOn" type="org.apache.struts.actions.ForwardAction"> <forward name="success" path="/Yay.jsp" /> <forward name="failure" path="/Rats.jsp" /> </action>
</action-mappings>
<message-resources parameter="com.yourcompany.struts.ApplicationResources" /> </struts-config>
I have looked at this until I am even more crosseyed than normal :-), so if it's obvious to you at a glance what's going on I would be very grateful for a slap up 'side the head!
Thanks, Mark McWiggins 425-369-8286
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]