• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To display the version number of Mysql on JSP

 
Saranya Selva
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application where I am trying to display the MySQL (which is running on the system) version number in the JSP page.
Also, I am trying to display the Tomcat Server version number also,

Can someone please help in how to go about this?

Pretty please!

Thanks
 
Saranya Selva
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that I have changed my display name...

Can I get an answer for my question... from someone out there!

Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What part are you having trouble with? Determining the mySQL version number, or figuring out how to show it on the JSP?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From a java.sql.Connection object you can obtain a reference to a DatabaseMetaData object. That has methods like getDatabaseMajorVersion(), getDatabaseMinorVersion(), getDatabaseProductName() and getDatabaseProductVersion().

On a ServletContext object you can call methods such as getServerInfo(), getMajorVersion() and getMinorVersion().
 
Saranya Selva
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much!!

Got it working...

I have told a million friends of mine about this site I think... you guys rock!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic