struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Anderson" <stuts_anderson...@hotmail.com>
Subject Re: Using one Action class for several forms
Date Mon, 01 Dec 2003 19:05:26 GMT
not sure I fully understand your problem.  This may be the answer you aren't 
looking for, but maybe it can help (it just gives the current path):

<%@ page import="org.apache.struts.Globals" %>
<c_rt:set var="mapping_key" value="<%= Globals.MAPPING_KEY %>"/>
<c:set var="mapping" value="${requestScope[mapping_key]}"/>
<html-el:form action="${mapping.path}">

-Ben

>From: Wendy Smoak <Wendy.Smoak@asu.edu>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: Struts Users Mailing List <struts-user@jakarta.apache.org>
>Subject: Using one Action class for several forms
>Date: Mon, 01 Dec 2003 11:49:40 -0700
>
>
>Unfortunately Google wasn't too helpful because I'm having trouble
>defining the problem.
>
>I have a small webapp with a single DynaValidatorForm that holds all the
>fields.
>
>I have an Action class called "ViewReport" which handles forwarding to
>the 'input' page, receiving the input, then forwarding to the 'display'
>page.
>
>I've mapped this ViewReport action several times in struts-config:
>balanceSheet.do, transactionDetail.do, etc.
>
>All is well until I get to the JSP, which I'd like to be able to reuse
>for several reports.  But this line trips me up since it seems I have to
>hard-code the name of the Action mapping:
>
>   <html-el:form action="/balanceSheet">
>
>Short of stuffing something in request scope and using an expression, is
>there a way to pick up the "current" action mapping in the <html:form>
>tag?
>
>Thanks,
>--
>Wendy Smoak
>Application Systems Analyst, Sr.
>ASU IA Information Resources Management
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>

_________________________________________________________________
Groove on the latest from the hot new rock groups!  Get downloads, videos, 
and more here.  http://special.msn.com/entertainment/wiredformusic.armx


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message