struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "julio" <ju...@softsite.com.br>
Subject SwitchAction Parameters
Date Mon, 23 Sep 2002 18:25:34 GMT
Hi all,

I´m using the SwithAction, but I did´t want to put the parameters prefix
and page in the url.(for example
http://foo/bar.do?prefix""&page="foobar.jsp"). I would like to specify
the parameters in the struts-config.xml:

<action path="/switch" 
        type="org.apache.struts.action.SwitchAction"
        page="foobar.jsp"
        prefix="">
</action>

Is this possible or just an heresy? :)


Julio Cesar

-----Mensagem original-----
De: Darren Hill [mailto:dhill@724.com] 
Enviada em: segunda-feira, 23 de setembro de 2002 15:06
Para: 'Struts Users Mailing List'
Assunto: RE: Extending Action and DispatchAction

Yeah .. guess that's my only option.

-----Original Message-----
From: Sri Sankaran [mailto:Sri.Sankaran@sas.com]
Sent: September 23, 2002 2:05 PM
To: Struts Users Mailing List
Subject: RE: Extending Action and DispatchAction


I think what he means is:

public class Foo extends Action {
  private void doCommonStuff() {
  }
}

public class Bar extends DispatchAction {
  private void doCommonStuff() {
  }
}

I think this calls for delegation to a class that just does the common
stuff.

public class Foo extends Action {
  private void doCommonStuff() {
    Baz.doCommonStuff();
  }
}

public class Bar extends DispatchAction {
  private void doCommonStuff() {
    Baz.doCommonStuff();
  }
}

Maybe not necessarily static, but that would be predicated by your
needs.
Sri 

-----Original Message-----
From: Galbreath, Mark [mailto:Galbreath@tessco.com] 
Sent: Monday, September 23, 2002 1:58 PM
To: 'Struts Users Mailing List'
Subject: RE: Extending Action and DispatchAction


How are you extending 2 classes at the same time in the same Action
class?
Can you describe your class hierarchy a little more clearly?

Mark

-----Original Message-----
From: Darren Hill [mailto:dhill@724.com]
Sent: Monday, September 23, 2002 1:52 PM

If I've got common code that happens in ALL actions and I extend BOTH
Action
and DispatchAction .. how can I include the common methods for both
actions,
rather the copying that code in each?

Darren

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


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

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




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


Mime
View raw message