Re: Remove cookie problem
You cannot redirect with POST. Redirects are always GET. You can use HttpClient/UrlConnection to send a POST request to the other url and then parse the response to see whether the authentication was OK. The problem with this approach is that it will need two http worker threads for a single request. With high load you can deadlock the server. On Thu, Nov 15, 2012 at 5:23 PM, cosmindumy wrote: > The page at /j_acegi_security_check handles the authentication. > It waits the authentication details as parameters. > (/j_acegy_security_check?j_username=usename&j_password=...) > > There are two reasons I want wicket form. For validation and also the > submit > button know to render his layout. > On submit I want to redirect on that page as post. > Maybe there is another wicket solution to redirect or to handle acegi > authentication. > Thanks. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612p4653907.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
Re: Remove cookie problem
Hi, It is not clear what exactly you need and do but I think you just need a plain in the markup, no need of Wicket Form component. On Thu, Nov 15, 2012 at 5:05 PM, cosmindumy wrote: > Hi, > I couldn't find yet a solution. > When pressing login button, after validation, it should be redirected to > /j_acegi_security_check?j_usernameand so on. > Using getRequestCycle().setRequestTarget(..) makes parameters visible in > browser. > Which is the best solution? > Thanks. > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612p4653905.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
Re: Remove cookie problem
Hi, I couldn't find yet a solution. When pressing login button, after validation, it should be redirected to /j_acegi_security_check?j_usernameand so on. Using getRequestCycle().setRequestTarget(..) makes parameters visible in browser. Which is the best solution? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612p4653905.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Remove cookie problem
Hi, Seems that action attribute cannot be modified. I want to handle the authentication with acegi. This means a redirct to "j_acegi_security_check" with post method. Can I find an example? I use wicket 1.4.19. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612p4653881.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Remove cookie problem
Hi, Add AttributeModifier to the Form component or override its onComponentTag(ComponentTag) method and use 'tag.put(name, value). On Wed, Nov 14, 2012 at 11:57 AM, cosmindumy wrote: > Hi again, > The problem is that login is handled with acegi. How can I set the action > of a form and use the POST method?. > Then I have to add the needed parameters. > Is something like this. > > > > Thanks. > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612p4653868.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
Re: Remove cookie problem
Hi again, The problem is that login is handled with acegi. How can I set the action of a form and use the POST method?. Then I have to add the needed parameters. Is something like this. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612p4653868.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Remove cookie problem
Hi, I added a cookie at login using CookieValuePersister. At logout I want to remove the cookie. The logout is not handled in wicket. I remove it using javax.servlet.http.HttpServletResponse. Also, when I access again a page after logout I receive an IllegalStateException: Unable to redirect to: , HTTP Response has already been committed. java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:433) at org.apache.wicket.protocol.http.WebResponse.sendRedirect(WebResponse.java:299) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Remove-cookie-problem-tp4653612.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org