At 12:16 01/20/01, Mirko Buholzer wrote:
>Hi all ...
>
>Just for Information, you can redirect a request in a Servlet like this:
>
>public void doGet(HttpServletRequest request, HttpServletResponse
>response) {
>
> response.setContentType("text/html");
> response.setStatus(response.SC_MOVED_TEMPORARILY);
> response.setHeader("Location", "/jetspeed/portal/screen/Home");
>}
Ok, what you're saying is that all forms could post the data to
/screen/<xy>/action/<z> and if the action was executed successfully, it
redirects to /screen/Home (or whatever else you want). In this case the
last request results from a redirect operation and not from a post request
so that a reload doesn't trigger a repost of data.
I'll try this. What about the URL? If I do it like this, will the browser
change its URL or will it still display /screen/<xy>/action/<z> after the
redirect?
ingo.
>Nice Weekend
>Mirko Buholzer
>
>
>-----Original Message-----
>From: Santiago Gala [mailto:[EMAIL PROTECTED]]
>Sent: Freitag, 19. Januar 2001 22:58
>To: JetSpeed
>Subject: Re: [Form Handling] Re: Problem Logging In a User
>
>
>ingo schuster escribió:
>
> > At 21:55 01/18/01, Manjuka Soysa wrote:
> > >Hi,
> > >I have a problem with the logging in procedure of jetspeed.
> > >After logging in, the Home page is shown on the browser, but the URL
>is
> > >still the login page.
> > >So if you do a refresh, it does a re-post. Also if there are forms in
> > >the home page without an action parameter,
> > >the user gets logged out because of the post into the login page.
> >
> > I already changed the forms yesterday and set an action in all of them
>-
> > the URL should change to something like "screen/Home" after you
>submitted
> > the login-form.
> > I don't know how we could avoid the re-post: If the page resulted from
>a
> > post request the browser (at least netscape) will repeat the last
>request
> > when you click on reload - and if this last operation was a HTTP Post,
> > netscape will ask you if you want to re-post the data.
> >
>
>We can avoid the re-post issue by redirecting the user to a different
>URL in
>the JLogin action. I don't know the exact details, but Juan Carlos has
>it
>implemented this way.
>
>I also think I saw some discussion in the Turbine list on the issue, but
>I'm
>not sure.
>
>A separate, but similar issue. If you hit reload after logout, there is
>an
>exception coming from the logout action. We should probably check if the
>user
>is logged in, before performing the logout action.
>
>
> >
> > >What is the general approach in jetspeed to set the URL?
> > >Thanks in advance for any help,
> > >Manjuka
> >
> > I think there is no "general approach", (and there are only a few,
> > unimportant forms in jetspeed). I personally try to avoid JavaScript
> > whenever possible, but it might make sense for more sopisticated form
> > handling? I'm not an JavaScript guru, I have to admit...
> >
> > What are the opinions regarding how forms ought to be handled? Let's
>define
> > what the general aproach should be!
> >
> > ingo.
> >
> > >--
> > >--------------------------------------------------------------
> > >To subscribe: [EMAIL PROTECTED]
> > >To unsubscribe: [EMAIL PROTECTED]
> > >Search: <http://www.mail-archive.com/[email protected]/>
> > >List Help?: [EMAIL PROTECTED]
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/[email protected]/>
> > List Help?: [EMAIL PROTECTED]
>
>
>
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Search: <http://www.mail-archive.com/[email protected]/>
>List Help?: [EMAIL PROTECTED]
>
>
>
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Search: <http://www.mail-archive.com/[email protected]/>
>List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?: [EMAIL PROTECTED]