Re: Action forwards to a URL outside application

2005-03-01 Thread Christian Bollmeyer
On Monday 28 February 2005 18:47, Shey Rab Pawo wrote:
 I don't know what a bd is but just make your action forward whatever
 you want to forward to.

Now, this may not be too helpful, regardless of whether 'BD'
means Business Delegate or is a typo for 'DB'. In fact, I
would prefer the first alternative, as that would indicate
Patterns usage and proper architecture. Anyhow: one
crucial thing that should come instantly to mind is that
- with Struts or without - forwards (Servlet API) are limited
to the same JVM, often, the same Application context, as
they are handled internally by the server. In any other
case, one has to use a redirect (issuing a HTTP code
that points the browser to the actual target). Then,
there's none of the three scopes available for passing
parameters, so you have to transmit them by ordinary
HTTP means, in this case, as GET parameters appended
to the URL; properly encoded (response.encodeRedirectURL(),
was it?). There is no real problem if you *just* redirect (static),
as there is a redirect attribute to forward in  struts-config.xml.
But this is a 'static' mapping. If you want to transfer dynamic 
parameters to your external application, AFAIK you have to
build the target URL (parameter string appended) yourself,
and I still wonder what may be the best approach in this
case. Options are: 1.) coding the redirect manually
2.) overriding the Struts mapping with the parameter-
enriched target URL at runtime or 3.) taking the basic
URL from the mapping, appending the parameter
thing and then proceed as in 2.) To be honest,
I'm not sure what is best practice in this case, and
in real life, I often just fall back to 1.). Things would
be a lot easier if there were kind of an addParameter()
method somewhere (preferably in the Servlet API,
not in Struts), but there just isn't.

HTH,
-- Chris.

 On Mon, 28 Feb 2005 19:37:06 +0200, Jim Theodoridis [EMAIL PROTECTED] 
wrote:
  Hello
 
  I have an action that takes informations from a BD
  How can I sent that information as parameters to a URL diferent
  than my application?
  etc:
 
  http://www.tera.gr?user=assaasdpassword=21321
 
  ---
 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For
  additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Action forwards to a URL outside application

2005-02-28 Thread Jim Theodoridis
Hello
I have an action that takes informations from a BD
How can I sent that information as parameters to a URL diferent than my 
application?
etc:

http://www.tera.gr?user=assaasdpassword=21321

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Action forwards to a URL outside application

2005-02-28 Thread Shey Rab Pawo
I don't know what a bd is but just make your action forward whatever
you want to forward to.


On Mon, 28 Feb 2005 19:37:06 +0200, Jim Theodoridis [EMAIL PROTECTED] wrote:
 Hello
 
 I have an action that takes informations from a BD
 How can I sent that information as parameters to a URL diferent than my
 application?
 etc:
 
 http://www.tera.gr?user=assaasdpassword=21321
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
No one ever went blind looking at the bright side of life.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action forwards to a URL outside application

2005-02-28 Thread Shey Rab Pawo
Nope!  LOL  He already cleared that up.  BD stands for DB which
stands for database.  ;-)


On Mon, 28 Feb 2005 13:01:48 -0500, Robert Taylor
[EMAIL PROTECTED]
 BTW, my guess it that BD stands for BusinessDelegate :)
 /robert
 


Great guess though!

-- 
No one ever went blind looking at the bright side of life.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]