[Helma-user] Session.message with res.redirect()

Austin, Tom TAustin at mcclatchyinteractive.com
Fri Jan 25 04:02:28 CET 2008


Hi,

 

I've been running into some problems with session.message.  It does not
seem to survive res.redirect().  I see a similar issue at
http://www.helma.org/bugs/show_bug.cgi?id=245, but that looks like it is
fairly old.

 

Does anyone have any ideas what I'm doing wrong?  If I remove the
redirect, the message will display OK.  I'm using Helma v. 1.6.1.

 

Here are the files I have:

 

 

::::::::::::::
apps/test/Root/enter_message.hac
::::::::::::::
if (req.isPost()) {
  session.message = "***" + req.data.message_text + "<br />";
  res.redirect(root.href());
}
renderSkin('enter_message');

 

::::::::::::::
apps/test/Global/enter_message.skin
::::::::::::::
<html>
<head>
  <title>Enter a message</title>
</head>
<body>
  <% response.message %>
  <form action="enter_message" method="post">
    <input type="text" name="message_text" encoding="form" />
    <br />
    <input type="submit" name="submit" />
  </form>
</body>
</html>



::::::::::::::
apps/test/Root/main.hac
::::::::::::::
renderSkin('main');


::::::::::::::
apps/test/Global/main.skin
::::::::::::::
<html>
<head>
  <title>Test app</title>
</head>
<body>
  <h1>Demo app</h1>
  <% response.message %>
  <a href='enter_message'>Enter a new message</a>
</body>
</html>

 

-----------------

 

Thanks for any help you can give me.

 

--Tom

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://helma.org/pipermail/helma-user/attachments/20080124/5850c66e/attachment.html 


More information about the Helma-user mailing list