<snip> Now there appears to be something setting the request to null between actions, I just have no idea what. </snip>
Well of course the request attributes are null (i presume its the request attribute thats null and not the request reference itself!) in the second action. Unless you do a server-side redirect direct to it from the first action (which Im assuming your not - unless your doing action chaining (which is bad)) then you will be hitting it as a result of a *new* request from the browser. <snip> This sort of thing really should be happening </snip> Ahh... glad you recognise that ;-) but it should not be happening for the session. Im not sure why you are having problems getting it out of the session. It could be that your session tracking isnt working properly. Check that you either have cookies enabled in your browser, or if not that you are rewriting any urls that need it. (In the case of a forms action url this will be done automaticlly by the struts html:form tag) (- its considered best practice for your application to be able to work without cookies btw - which makes url rewriting in your pages essential.) -----Original Message----- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Wednesday, 23 July 2003 16:44 To: Struts List Subject: NullPointer exception Before I wash anymore time out on stuff that really shouldn't happen, may I ask if anyone else has had problems with anything being stored in the request and/or session returning null.. for example imagine i've 2 actions // in action 1 HttpSession session = request.getSession() session.setAttribute("test","mellow"); mapping.findForward("success"); //action 2 HttpSession session = request.getSession(); //Next line returns null String str = session.getAttribute("test").toString(); mapping.findForward("success"); I've tried the same with request rather than session, but I keep getting null.. Now there appears to be something setting the request to null between actions, I just have no idea what. This sort of thing really should be happening, has anyone else got this problem? Request nor session will even let be get a string from it!!! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]