This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes problems with EL in jsp and java bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problems with EL in jsp and java bean" Watch "problems with EL in jsp and java bean" New topic
Author

problems with EL in jsp and java bean

Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

I have a bean named book(class name bean.Book), and I want to accessed that bean in a servlet(named accessedBean), and viewed them in a jsp with El. But I couldn't get the book bean which I attached to request object. Below the coding...

This is my accessedBean servlet.



This is my viewDetails jsp.


When I run this jsp, I got null book. Could anybody spot the problem? Thanks.


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

You are not using the EL.

Get rid of the useBean and getProperty tags and use the EL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

Bear Bibeault wrote:You are not using the EL.


Yea, This is Actions, sorry...
Bear Bibeault wrote:
Get rid of the useBean and getProperty tags and use the EL.

But could you please spot the problem here. I'm learning, so need to know all, Actions, El, scriptlets, etc... Thanks...
 
jQuery in Action, 2nd edition
 
subject: problems with EL in jsp and java bean