Re: [JPublish-developer] how to redirect from one page to another
Brought to you by:
aeden
From: Anthony E. <me...@an...> - 2003-07-01 15:01:13
|
In JPublish 1.x and 2.x there are several ways to do it depending on how you want it to appear to the end user. In your action you can either do an HTTP direct using: context.put("redirect", "url") In this case the URL will be updated in the browser and request processing will stop after the current action completes. Alternatively you can use the RequestDispatcher forward: dispatcher = request.getRequestDispatcher("url") dispatcher.forward(request, response) In this case request processing will not stop although the result of further processing will never return to the browser (since you have already moved to another page). In JPublish 3 I've changed the first method to context.setRedirect("url") but otherwise it is the same. Sincerely, Anthony Eden Andreas Kapp wrote: >Hello, > >We are trying to implement a workflow in JPublish. For example, if we have >a html form with two checkboxes a user submits. The form's target /test.html. Now, on >the server side, we want to decide according to the values of the checkboxes whether >to display (redirect or forward) /test.html or /test2.html. > >How would you solf this problem? > >Thanks for your advice. > >Andreas > >-- >N¬HS^µéšŠ[)¢{(ç[ÈZÞzšÞn襴4DìŠ×¬Šw%¹Ø§€6i©¢»lÊ&™êÜxú+µ©ljwE¢»¦±ªÞjö¢•¦åzz0Œ'–†¶‡ZÉ©Ýz{^®Ú0Šv§\—¢µb²æ¥JÛŠƒDNm§ÿÚ²™ÞµÉbrK«•Ê&þ >?¦Æ´Ó]4ÓNš½ïÝŠ·œµ«Z²:×m7Ó_ôÔšnnX¬…ׯzZ)z¹šŠX§‚X¬´šnnX¬…ׯzZ)z¹b²Û,¢êÜyú+éÞ¶m¦Ïÿ–+-²Ê.ÇŸ¢¸ë?–+-³ùb²Ø§~ã¦æåŠÈ]z÷¥¢—« > |