Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Checking Database connection in JSP  RSS feed

 
Mike Jenkins
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP that shows a JavaBean value that is fetched from my Oracle database. The bean class uses a helper Database connection class (DbConnClass) to connect to the database. Everything is working where the bean fetches the database info and I use the Getter and Setter methods to show the information. My only issue is how do I show the JSP if the database is not available. Currently I have ugly scriplets but was wondering if there is another way?
 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use JSTL core(for logical condition) and sql(database connectivity) library and also the EL expression.

But its is not recommended what you are doing please go through the MVC, DTO, BO and DAO patterns.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!