This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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!
 
Author and ninkuma
Marshal
Posts: 66806
168
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: 42975
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!