• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Related to useBean

 
Bindu Lakhanpal
Ranch Hand
Posts: 171
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator





The output is : I like null

But i could not undersand why?
I guess using click here
does not send attributed set in request scope.

This is not displaying properly here.
Check question number 46 here
niko's mock
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't see how you are going from input.jsp to output.jsp. The request is probably different, that's why the book you set in input.jsp does not exist in output.jsp.
 
Bindu Lakhanpal
Ranch Hand
Posts: 171
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it was not displaying properly.
Please check the above link.( i edited my first message)
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If input and output are two different requests, which I suppose they are, you could use the session scope to keep track of the data.
 
Bindu Lakhanpal
Ranch Hand
Posts: 171
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, they must be different requests.
It means we have different requests if we use simple html code
a href="output.jsp" from input.jsp.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, they must be different requests.

Yes they are. When you access input.jsp, the request ends there. No more book. Accessing output.jsp by clicking the link generates a new request, thus a new book is created in output.jsp. That's why you'll see "I like null".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic