This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
currently, my input param is: input="/WEB-INF/struts/modules/FOOModule/jsp/foo.jsp"
I want coworkers to be able to have input params like: input="/WEB-INF/struts/modules/BARModule/jsp/bar.jsp"
developing in WSAD 5.1.2 will deploy to WAS 5
The default struts config is empty, and I want to keep it that way. Our existing WAR has numerous non-struts servlets. I have added the needed lines to web.xml to use the struts controller. The idea is future development would be in struts, but we don't want to mess with existing code right now. We would like to see all new development occurr in "WEB-INF/struts/modules/YOU_MODULE_NAME" with two subdirectories: "CONFIG" and "JSP". Your module's struts config goes into CONFIG and your module's JSPs go into JSP. That way, every developer can work independantly of any other developer.
Been trying to get this to work for almost two weeks now. I'm beginning to wonder if it's even possible.
* One of your Action mappings (the <action> tag in struts-config.xml) * The URL that Struts is actually returning when validation fails on that action. [ May 15, 2006: Message edited by: Merrill Higginson ]
using struts 1.2.9 (cause struts.apache.org says it's the production ready version)
I have the following files: /WebContent/MyApp/index.jsp /WEB-INF/struts/modules/MyApp/config/struts-config.xml /WEB-INF/struts/modules/MyApp/jsp/IdentifyCustomer.jsp /WEB-INF/struts/modules/MyApp/jsp/VerifyCustomer.jsp /WEB-INF/struts/modules/MyApp/jsp/VerifyEmployee.jsp /WEB-INF/struts-config.xml (has NO entries) /WEB-INF/web.xml
IdentifyCustomer.jsp has a form tag: <html:form action="/ProcessIdentity" method="post">
Then again in my struts config I have: <action path="/ProcessIdentity" type="MyApp.actions.ProcessIdentity" name="IdentifyCustomerForm" validate="true" input="/WEB-INF/struts/modules/MyApp/jsp/IdentifyCustomer.jsp" > <forward name="verifyEmployee" path="/WEB-INF/struts/modules/MyApp/jsp/VerifyEmployee.jsp"/> <forward name="verifyStaff" path="/WEB-INF/struts/modules/MyApp/jsp/VerifyCustomer.jsp" /> </action>
when I submit an incomplete IdentifyCustomer.jsp page the validator sees the failure it tries to send me back to:
Thanks Merrill. I actually stumbled onto that solution myself after my post. Is it me or is the documentation for struts "a mess". I would still like to know where all these websites came up with the idea of setting the forward/page Pattern to "/WEB-INF/$M$P". I find NOTHING on the struts site that leads me to believe that's ever been possible. It's difficult enough to wrap your head around struts alone....the last thing we need is false documentation.
the struts site docs explicitly state that anything other then $$, $M and $P are "silently swallowed"
I have not used this feature, but I am interpreting the documentation differently that you are. Here is the statement:
$x - (Where "x" is any character not defined above) Silently swallowed, reserved for future use.
This seems to be saying that $M, $P and $$ all have special meanings but that if I enter $A or $X that will be ignored. I do not read this to mean that I cannot put a constant string such as "WEB-INF" on the front. Oh well...it sounds like you got it working for you.
Joined: May 03, 2006
using a DTD validator, if I set either field to something other then $M $P $$ or $X I get the following warning:
Pattern should consist [of] any combination of the following: "$M" "$P" "$$" "$x"
and since $x doesn't do anything and I can't imagine who would use $$, that only leaves $m and $p