aspose file tools*
The moose likes JSP and the fly likes retreiving and showing fields from a forwarded session object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "retreiving and showing fields from a forwarded session object" Watch "retreiving and showing fields from a forwarded session object" New topic
Author

retreiving and showing fields from a forwarded session object

Yves Somme
Greenhorn

Joined: Apr 30, 2012
Posts: 6
Hi

I think I have sucessfully stored an object with req.setAttribute("record", record). when I call req.getAttribute() and do a getTitle() it returns the correct result. (where record is an instance of a class with 6 String variables, all populated).

I then use ReqestDispatcher to forward to a .jsp page where I want to display the fields of record using EL notation.

I have tried: The title is ${title} by ${artist} , but all I get is: The title is by
The title is ${record.title} by ${record.artist} but again all I get is The title is by

Do I need to somehow put record into another format or am I trying to do something too simply and need more code, not used EL before.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

That means that the EL is disabled in your web app. See the JspFaq for information. Most likely your web.xml is declared incorrectly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Palak Mathur
Ranch Hand

Joined: Jan 29, 2007
Posts: 313

Yves Somme wrote:Hi

I think I have sucessfully stored an object with req.setAttribute("record", record). when I call req.getAttribute() and do a getTitle() it returns the correct result. (where record is an instance of a class with 6 String variables, all populated).

I then use ReqestDispatcher to forward to a .jsp page where I want to display the fields of record using EL notation.

I have tried: The title is ${title} by ${artist} , but all I get is: The title is by
The title is ${record.title} by ${record.artist} but again all I get is The title is by

Do I need to somehow put record into another format or am I trying to do something too simply and need more code, not used EL before.



Can you post the respective code snippet?


Palak Mathur | My Blog | TechJaunt | What is JavaRanch? | List of All FAQs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retreiving and showing fields from a forwarded session object