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:
<input type="text" name="j_username" id="j_username"/>
<input type="password" name="j_password" id="j_password"/>

<form method="post" id="loginForm" action="<c:url
value='j_spring_security_check'/>"


This works:

LogIn.java
-----------------
public class LogIn
{ }

LogIn.tml
----------------
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

<h1>Log In</h1>
<form method="POST" action="j_spring_security_check">
    <input type="text" name="j_username" />
    <input type="password" name="j_password" />
    <input type="submit" value="LogIn" />
</form>

</html>


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
---------------------------------------------
<a href="${contextPath}/j_spring_security_logout">LogOut</a>


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]

Reply via email to