Re: T5: external POST link to spring security

2008-07-14 Thread Arve Klev
I have integrated Spring Security 2.0 with Tapestry5 - and it's easy
to do and much less configuration than with formerly acegi.
(I also use T5, Spring's latest version and "Tapestry-Spring" :-) )

I had the same problem as Pavla: override the default login-page (it
works) from spring-security with a standard Tapestry5-page.

In JSP, this is the code snippet:



http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Log In









To log out:

Snippet from my component Layout.java
---
@Inject
private RequestGlobals requestGlobals;

public String getContextPath()
{
 return requestGlobals.getRequest().getContextPath();
}

Snippet from my component Layout.tml
-
LogOut


If anybody has a better solution for a more standard
Tapestry5-login-page - please let us know.


Thanks, Arve

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



T5: external POST link to spring security

2008-06-05 Thread pavla

Hi all,

I'm trying to integrate spring (acegi) security 2.0 with my Tapestry 5
application. I have an tapestry page with login form and want to send data
from login form to spring security filters. 
On login page I use something like this:

public Object onSubmitFromLoginForm() {

getUserName;
getPassword;
create URL ...
/j_spring_security_check?j_username=someUserName&j_password=somePassword 
return URL;

}

This works, but the problem is that I want request to spring security filter
to be sent with POST method. So could you please advise how to tell Tapestry
to use POST instead of GET or any other suggestions how to send data (with
POST method) from my tapestry login page to spring security filters - simply
need a way how to create "external POST link".

Thanks for any help. Pavla




-- 
View this message in context: 
http://www.nabble.com/T5%3A-external-POST-link-to-spring-security-tp17680013p17680013.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: "External" POST

2006-11-28 Thread andyhot
You can simply use
cycle.getParameter("parameterName");

http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/IRequestCycle.html#getParameter(java.lang.String)


Denis Souza wrote:
> Thanks! That's where I was headed. I got as far as noticing that request
> context was deprecated so I was still looking for another solution. Anyway,
> I'll give that a try, so now I'm trying to find out how to inject the
> HttpServletRequest object, but I can't seem to remember exactly what to
> write on the @Inject parameter. Can anyone point me to documentation on
> this. I recall there was a hivemind registry page that showed everything you
> can inject into tapestry but I can't find it. The link I had to it is now a
> page not found error.
>
> Thanks,
> Denis
>
> -Original Message-
> From: Shing Hing Man [mailto:[EMAIL PROTECTED] 
> Sent: terça-feira, 28 de novembro de 2006 19:18
> To: Tapestry users
> Subject: Re: "External" POST
>
> I think you can 'post' to a a Tapestry page that
> implements 
> the inteface  org.apache.tapestry.IExternalPage 
>
> The interface IExternalPage 
>  has a method 
> activateExternalPage(java.lang.Object[] parameters,
> IRequestCycle cycle) 
>
> In Tapestry 3, you can retrieve the submitted
> parameters in method 
> activateExternalPage :
> cycle.getRequestContext().getParameter("parameterName");
>
> In Tap4, cycle.getRequestContext() is deprecated, you
> might have to inject RequestContext (or maybe
> HttpServletRequest) into your page.
>
> Shing
>
>
>
>
> --- Denis Souza <[EMAIL PROTECTED]> wrote:
>
>   
>> Hi,
>>
>>  
>>
>> I'm having a problem integrating with a 3rd party.
>> The thing is they have
>> this system that sends me an http POST with some
>> data in it. I can chose the
>> url to which the post is sent, but I can't chose how
>> they set up the data.
>> It's very standard procedure to them and they won't
>> change it.
>>
>>  
>>
>> If this was a GET, I could just create a page that
>> supports "external"
>> requests, write an encoder for the url so I could
>> read the parameters and
>> everything would be fine, but since it's a POST I
>> don't know how I could do
>> it in Tapestry. Is there a way I can read any post
>> with random data in
>> Tapestry? The last thing I want to do is to manually
>> get the request info
>> and decode the post message.
>>
>>  
>>
>> Thanks in advance,
>>
>> Denis Souza
>>
>>
>> 
>
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com 
>
> -
> 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]
>
>
>
>   


-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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



RE: "External" POST

2006-11-28 Thread Shing Hing Man
Oohs! 
It should be 

http://lombok.demon.co.uk/tapestry4Demo/Inject.html

Shing

--- Shing Hing Man <[EMAIL PROTECTED]> wrote:

> 
> http://gauss/tapestry4Demo/Inject.html
> 
> The above link might help (it works now).
> 
> Shing
> 
> 
> --- Denis Souza <[EMAIL PROTECTED]> wrote:
> 
> > Thanks! That's where I was headed. I got as far as
> > noticing that request
> > context was deprecated so I was still looking for
> > another solution. Anyway,
> > I'll give that a try, so now I'm trying to find
> out
> > how to inject the
> > HttpServletRequest object, but I can't seem to
> > remember exactly what to
> > write on the @Inject parameter. Can anyone point
> me
> > to documentation on
> > this. I recall there was a hivemind registry page
> > that showed everything you
> > can inject into tapestry but I can't find it. The
> > link I had to it is now a
> > page not found error.
> > 
> > Thanks,
> > Denis
> > 
> > -Original Message-
> > From: Shing Hing Man [mailto:[EMAIL PROTECTED] 
> > Sent: terça-feira, 28 de novembro de 2006 19:18
> > To: Tapestry users
> > Subject: Re: "External" POST
> > 
> > I think you can 'post' to a a Tapestry page that
> > implements 
> > the inteface  org.apache.tapestry.IExternalPage 
> > 
> > The interface IExternalPage 
> >  has a method 
> > activateExternalPage(java.lang.Object[]
> parameters,
> > IRequestCycle cycle) 
> > 
> > In Tapestry 3, you can retrieve the submitted
> > parameters in method 
> > activateExternalPage :
> >
>
cycle.getRequestContext().getParameter("parameterName");
> > 
> > In Tap4, cycle.getRequestContext() is deprecated,
> > you
> > might have to inject RequestContext (or maybe
> > HttpServletRequest) into your page.
> > 
> > Shing
> > 
> > 
> > 
> > 
> > --- Denis Souza <[EMAIL PROTECTED]> wrote:
> > 
> > > Hi,
> > > 
> > >  
> > > 
> > > I'm having a problem integrating with a 3rd
> party.
> > > The thing is they have
> > > this system that sends me an http POST with some
> > > data in it. I can chose the
> > > url to which the post is sent, but I can't chose
> > how
> > > they set up the data.
> > > It's very standard procedure to them and they
> > won't
> > > change it.
> > > 
> > >  
> > > 
> > > If this was a GET, I could just create a page
> that
> > > supports "external"
> > > requests, write an encoder for the url so I
> could
> > > read the parameters and
> > > everything would be fine, but since it's a POST
> I
> > > don't know how I could do
> > > it in Tapestry. Is there a way I can read any
> post
> > > with random data in
> > > Tapestry? The last thing I want to do is to
> > manually
> > > get the request info
> > > and decode the post message.
> > > 
> > >  
> > > 
> > > Thanks in advance,
> > > 
> > > Denis Souza
> > > 
> > > 
> > 
> > 
> > Home page :
> >   http://uk.geocities.com/matmsh/index.html
> > 
> > Send instant messages to your online friends
> > http://uk.messenger.yahoo.com 
> > 
> >
>
-
> > 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]
> > 
> > 
> 
> 
> Home page :
>   http://uk.geocities.com/matmsh/index.html
> 
> Send instant messages to your online friends
> http://uk.messenger.yahoo.com 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



RE: "External" POST

2006-11-28 Thread Shing Hing Man

http://gauss/tapestry4Demo/Inject.html

The above link might help (it works now).

Shing


--- Denis Souza <[EMAIL PROTECTED]> wrote:

> Thanks! That's where I was headed. I got as far as
> noticing that request
> context was deprecated so I was still looking for
> another solution. Anyway,
> I'll give that a try, so now I'm trying to find out
> how to inject the
> HttpServletRequest object, but I can't seem to
> remember exactly what to
> write on the @Inject parameter. Can anyone point me
> to documentation on
> this. I recall there was a hivemind registry page
> that showed everything you
> can inject into tapestry but I can't find it. The
> link I had to it is now a
> page not found error.
> 
> Thanks,
> Denis
> 
> -Original Message-
> From: Shing Hing Man [mailto:[EMAIL PROTECTED] 
> Sent: terça-feira, 28 de novembro de 2006 19:18
> To: Tapestry users
> Subject: Re: "External" POST
> 
> I think you can 'post' to a a Tapestry page that
> implements 
> the inteface  org.apache.tapestry.IExternalPage 
> 
> The interface IExternalPage 
>  has a method 
> activateExternalPage(java.lang.Object[] parameters,
> IRequestCycle cycle) 
> 
> In Tapestry 3, you can retrieve the submitted
> parameters in method 
> activateExternalPage :
>
cycle.getRequestContext().getParameter("parameterName");
> 
> In Tap4, cycle.getRequestContext() is deprecated,
> you
> might have to inject RequestContext (or maybe
> HttpServletRequest) into your page.
> 
> Shing
> 
> 
> 
> 
> --- Denis Souza <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> > 
> >  
> > 
> > I'm having a problem integrating with a 3rd party.
> > The thing is they have
> > this system that sends me an http POST with some
> > data in it. I can chose the
> > url to which the post is sent, but I can't chose
> how
> > they set up the data.
> > It's very standard procedure to them and they
> won't
> > change it.
> > 
> >  
> > 
> > If this was a GET, I could just create a page that
> > supports "external"
> > requests, write an encoder for the url so I could
> > read the parameters and
> > everything would be fine, but since it's a POST I
> > don't know how I could do
> > it in Tapestry. Is there a way I can read any post
> > with random data in
> > Tapestry? The last thing I want to do is to
> manually
> > get the request info
> > and decode the post message.
> > 
> >  
> > 
> > Thanks in advance,
> > 
> > Denis Souza
> > 
> > 
> 
> 
> Home page :
>   http://uk.geocities.com/matmsh/index.html
> 
> Send instant messages to your online friends
> http://uk.messenger.yahoo.com 
> 
>
-
> 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]
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



RE: "External" POST

2006-11-28 Thread Denis Souza
Thanks! That's where I was headed. I got as far as noticing that request
context was deprecated so I was still looking for another solution. Anyway,
I'll give that a try, so now I'm trying to find out how to inject the
HttpServletRequest object, but I can't seem to remember exactly what to
write on the @Inject parameter. Can anyone point me to documentation on
this. I recall there was a hivemind registry page that showed everything you
can inject into tapestry but I can't find it. The link I had to it is now a
page not found error.

Thanks,
Denis

-Original Message-
From: Shing Hing Man [mailto:[EMAIL PROTECTED] 
Sent: terça-feira, 28 de novembro de 2006 19:18
To: Tapestry users
Subject: Re: "External" POST

I think you can 'post' to a a Tapestry page that
implements 
the inteface  org.apache.tapestry.IExternalPage 

The interface IExternalPage 
 has a method 
activateExternalPage(java.lang.Object[] parameters,
IRequestCycle cycle) 

In Tapestry 3, you can retrieve the submitted
parameters in method 
activateExternalPage :
cycle.getRequestContext().getParameter("parameterName");

In Tap4, cycle.getRequestContext() is deprecated, you
might have to inject RequestContext (or maybe
HttpServletRequest) into your page.

Shing




--- Denis Souza <[EMAIL PROTECTED]> wrote:

> Hi,
> 
>  
> 
> I'm having a problem integrating with a 3rd party.
> The thing is they have
> this system that sends me an http POST with some
> data in it. I can chose the
> url to which the post is sent, but I can't chose how
> they set up the data.
> It's very standard procedure to them and they won't
> change it.
> 
>  
> 
> If this was a GET, I could just create a page that
> supports "external"
> requests, write an encoder for the url so I could
> read the parameters and
> everything would be fine, but since it's a POST I
> don't know how I could do
> it in Tapestry. Is there a way I can read any post
> with random data in
> Tapestry? The last thing I want to do is to manually
> get the request info
> and decode the post message.
> 
>  
> 
> Thanks in advance,
> 
> Denis Souza
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-
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]



Re: "External" POST

2006-11-28 Thread Shing Hing Man
I think you can 'post' to a a Tapestry page that
implements 
the inteface  org.apache.tapestry.IExternalPage 

The interface IExternalPage 
 has a method 
activateExternalPage(java.lang.Object[] parameters,
IRequestCycle cycle) 

In Tapestry 3, you can retrieve the submitted
parameters in method 
activateExternalPage :
cycle.getRequestContext().getParameter("parameterName");

In Tap4, cycle.getRequestContext() is deprecated, you
might have to inject RequestContext (or maybe
HttpServletRequest) into your page.

Shing




--- Denis Souza <[EMAIL PROTECTED]> wrote:

> Hi,
> 
>  
> 
> I'm having a problem integrating with a 3rd party.
> The thing is they have
> this system that sends me an http POST with some
> data in it. I can chose the
> url to which the post is sent, but I can't chose how
> they set up the data.
> It's very standard procedure to them and they won't
> change it.
> 
>  
> 
> If this was a GET, I could just create a page that
> supports "external"
> requests, write an encoder for the url so I could
> read the parameters and
> everything would be fine, but since it's a POST I
> don't know how I could do
> it in Tapestry. Is there a way I can read any post
> with random data in
> Tapestry? The last thing I want to do is to manually
> get the request info
> and decode the post message.
> 
>  
> 
> Thanks in advance,
> 
> Denis Souza
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



"External" POST

2006-11-28 Thread Denis Souza
Hi,

 

I'm having a problem integrating with a 3rd party. The thing is they have
this system that sends me an http POST with some data in it. I can chose the
url to which the post is sent, but I can't chose how they set up the data.
It's very standard procedure to them and they won't change it.

 

If this was a GET, I could just create a page that supports "external"
requests, write an encoder for the url so I could read the parameters and
everything would be fine, but since it's a POST I don't know how I could do
it in Tapestry. Is there a way I can read any post with random data in
Tapestry? The last thing I want to do is to manually get the request info
and decode the post message.

 

Thanks in advance,

Denis Souza