• Post Reply Bookmark Topic Watch Topic
  • New Topic

usebean doubt

 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello joe here
my jsp file has a code


my usebean class is


The output is null. what is the error


[BSouther: Added UBB CODE tags]
[ June 12, 2008: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks OK to me.

Did you compile the bean class?
Where did you put the class file?
 
Murthy Tanniru
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct the spelling mistake setProperty

[ June 12, 2008: Message edited by: Murthy Tanniru ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Tariq Woo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:useBean id="obj" class="pack.empl" scope="request" > <jsp:setPropterty name="obj" property="name" value="joe" /> <jsp:getProperty name="obj" property="name" />
</jsp:useBean>

you shouldn't close <jsp:useBean> before <jsp:setPropterty />
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"w pf", please check your private messages for an important administrative matter.
 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Murthy Tanniru,
You said correct the spelling mistake...

but, if problem is with spelling mistake then the jsp file wont compile. But he is getting null. How come this is possible.
 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi w pf,

You said close the tag, it is syntax error, the page wont compile.

But he is getting null, As i mentioned to Murthy. The problem should be something else...

if you are not getting the errors in explorer then delete the work folder and try the thing again. You will get the syntax error or press the F5 for 10 seconds you will see the page displaying errors.

everything seems correct for me, i didnt find any fault with the code,

i also dont know the answer for that question.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!