I'm working on a test project of using struts in a CF environment. I
have it all working where the struts config file routes between cfm
pages correctly, but I'm having problems using some of the struts tag
libraries within CF (specifically retrieving objects set on to the
request scope from struts). The exact same code works in JSP if I
include it within my cfm page (using getPageContext().include(...)).
That's why I'm asking on this list instead of a struts list. I must be
missing something in how CFM and java interact and what objects are
available to CFM...
 
For the struts folks - I have my struts-config file set up to initially
load the startPage.cfm and return to the startPage.cfm if validation
fails within my ActionForm's validate method. The problem I'm having is
when the validation does fail and errors are returned as ActionErrors
(which are placed in the request scope).
 
snippet (startPage.cfm)
<cfimport taglib="/WEB-INF/struts-logic.tld" prefix="logic">

<logic:messagesNotPresent>
No errors from CFM!
</logic:messagesNotPresent>
 
<logic:messagesPresent>
Errors found from CFM!
</logic:messagesPresent>
....
 
When run the above code prints "No errors from CFM!" even after it gets
redirected to the startPage.cfm when validation failed. I would have
expected "Errors found from CFM!" 
 
However, if I add the following after </logic:messagesPresent> in the
startPage.cfm:
<cfset getPageContext().include("errors.jsp")>
 
and have the following in the "errors.jsp":
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
 
<logic:messagesNotPresent >
No errors from JSP!
</logic:messagesNotPresent>
 
<logic:messagesPresent>
Errors found from JSP!
</logic:messagesPresent>
 
When this is run from within the startPage.cfm after getting redirected
to (after validation fails) I get 
"No errors from CFM! Errors found from JSP...".
 
I'm confused in why the same code within the same request returns
different results. I thought CFM could use request scope variables set
by java?
 
Any pointers?
 
Thanks,
Bob


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203556
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to