aspose file tools*
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
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: 61437
    
  67

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...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problems with EL in jsp and java bean