Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

To display the version number of Mysql on JSP  RSS feed

 
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!
 
Marshal
Posts: 67165
169
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?
 
Rancher
Posts: 42974
76
  • 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
Boost this thread!