2009/6/5 Paweł Wielgus <poulw...@gmail.com> > Hi Stefano, > Action execute method result is a string but that is only a result name, > result can be a redirect to anything You want. > Read more about resut types in struts2.
have u got an example or a tutorial about how to return an url? > > > Also if the requirement is to come back to a page that You were on, > maybe there is no need to leave it at all. > Use ajax to login the user and as a result You can return anything > for only that part of the page (tile with logon form) the ajax login with tiles is a little bit complex, i don't found any simple example online. > > > As for adding information to login form use hidden field or fields, that's > it. > Also You can remebmer in session last request as a whole object, > very tricky for file uploads i think, but You can only save just the > informations You need, > and this would be best done by interceptor. how can i take the current url in a jsp? > > > Hope that helps, > Paweł Wielgus. > > > 2009/6/5 Stefano Tranquillini <stefano.tranquill...@gmail.com>: > > Hi > > there's a problem (i think is a problem). I used the tiles. so the login > is > > in the left part of the page and is always available for the user (in > each > > page there's the login). > > so i need to store each time the url in each page. how can i do that? > > i can do with a Intercepor that simply store in the session the current > > url, but: how can i forward to the right page after the login?is a good > > solution? how can i found the url of the previous page? > > anyway, login is an action so it wants a String as results of the > executed, > > and the result is mapped inside the sturst.xml. How can i pass a url > instead > > the SUCCESS or ERROR etc string? > > > > 2009/6/4 Paweł Wielgus <poulw...@gmail.com> > > > >> Hi Stefano, > >> add some kind of information about the page loging form is on, inside > >> the login form, then in login action resolve where to come back. It > >> can be also achieved by remebering the last request uri and params if > >> any. But there is no standard solution for this problem, as far as i > >> know. You can always face a scenario where user login without any > >> page, just by constructing a valid url. > >> > >> Best greetings, > >> Pawel Wielgus. > >> > >> 2009/6/4, Stefano Tranquillini <stefano.tranquill...@gmail.com>: > >> > Hi all. > >> > i want to do a thing. When a user do the login (i've the login in the > >> left > >> > part of the web site, so in each pages the user can do the login) i > want > >> to > >> > redirect he at the pages that was visit before the login. > >> > how can i do that? (no JS) > >> > > >> > > >> > -- > >> > Stefano > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > -- > > Stefano > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano