0

I've tried to check one way to discover the version of the glassfish server checking the domain folder but I didn't find it. I didn't find the version in domain.xml or another file. I know we can use "asadmin version" command to check the version, but I need to find it on the domain folder because the structure of my project and some limitations that there is. Do you know some way to check the version? One difference maybe, like one file that not exists in glassfish 3.0 domain folder but there is in glasshfish 4 domain folder...

Thank you so much!

1 Answers1

1

You could check the index.html in the docroot of your domain folder. It contains the Glassfish Version.

The file is located in GLASSFISH_INSTALL/glassfish/domains/domain1/docroot

It should contain a line like

<title>GlassFish Server 3.1.1 - Server Running</title>

For Glassfish 4 it only contains a line like:

<title>GlassFish Server - Server Running</title>

So this is one option to distinguish.

If this is not specific enough, you can just parse the server.log file for the version. In the file GLASSFISH_INSTALL/glassfish/domains/domain1/logs/server.log you should find a string like:

GlassFish Server Open Source Edition 3.1.1 (12) startup time : Felix (6.971ms), startup services(2.353ms), total(9.324ms)|]

or

GlassFish Server Open Source Edition  4.1.1  (1) startup time : Felix (6.175ms), startup services(5.352ms), total(11.527ms)]]
unwichtich
  • 13,712
  • 4
  • 53
  • 66
  • In this case, we have to check at index.html, but in the most of the cases, we change this file removing the content for prevent problems of security. Now, I decided to check the version attribute localizated in the root element of the domain.xml inside of config folder. That version shows the build version. It solved my case. – Vinícius Biavatti Apr 23 '18 at 16:51