• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retreiving and showing fields from a forwarded session object

 
Yves Somme
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That means that the EL is disabled in your web app. See the JspFaq for information. Most likely your web.xml is declared incorrectly.
 
Palak Mathur
Ranch Hand
Posts: 342
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic