Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing Parameters To JSP  RSS feed

 
Josh Batchelor
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that you can pass parameters using the setAttribute and the getAttribute, but I am creating the Attributes on the fly out of the Database so sometime there isn't data.

I have tried checking on the JSP page like this:

Anyone know how to handle this?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try checking on the JSP page like this:

or

this should work
[ January 15, 2002: Message edited by: Benjamin Leonard ]
 
Josh Batchelor
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That second option fixed it. Thanks for your help. Also for future reference there was also a problem in my code.
Here is what it was:

Here is what it should be:

[ January 15, 2002: Message edited by: Josh Batchelor ]
[ January 15, 2002: Message edited by: Josh Batchelor ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!