Results 1 to 3 of 3
  1. #1
    Nick15 is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default Request attribute PageBean = null

    Hello
    I have a doubt
    Can you explain me ?
    I have this jsp:

    Java Code:
    <jsp:useBean id="pageBean" class="ar.com.MyBean" scope="request">
    <jsp:setProperty name="pageBean" property="*"/>
    </jsp:useBean>
    My idea was when I click submit, in the servlet I can do something like this:

    Java Code:
    MyBean myBean = (MyBean)request.getAttribute("pageBean");
    But the Request attribute PageBean are null

    Can you explain me what is happening?
    Aclaration: I am using servlets and jsp, not struts

    thank you

  2. #2
    Freddie is offline Member
    Join Date
    May 2007
    Posts
    41
    Rep Power
    0

    Default

    mmmmmm
    I would put scope="session" and then recolect it like this: request.getSession().getAttribute("pageBean")

    I am not sure, but maybe works.

    bye bye

  3. #3
    sandor is offline Member
    Join Date
    Apr 2007
    Location
    Pennsylvania,USA
    Posts
    45
    Rep Power
    0

    Default

    Not sure, since I only have used struts , but wouldn't you need to set the Attribute in the request first?
    Java Code:
    <&#37;  request.setAttribute("pageBean",pageBean)  %>

Similar Threads

  1. [SOLVED] http request
    By Eranga in forum Advanced Java
    Replies: 30
    Last Post: 11-27-2008, 05:35 AM
  2. respose with out request
    By karthikiniyan in forum Java Servlet
    Replies: 1
    Last Post: 04-09-2008, 04:06 PM
  3. how to add an attribute with sax?
    By cecily in forum New To Java
    Replies: 3
    Last Post: 07-19-2007, 05:09 AM
  4. Help with request.getParameter()
    By Albert in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 07-13-2007, 04:39 PM
  5. Problem with Attribute in JSP
    By Albert in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-13-2007, 04:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •