how to get the version of struts during runtime

2006-04-04 Thread Günther Wieser
hi,

i would need to check the version of struts running during runtime, to be
more specific when my derived action servlet runs through its init method
(derived from ActionServlet of course).
reason is, if the minor version has changed, a warning should be written to
the logs; if a major change of the version happened, my action servlet will
refuse to start until somebody checked the code of the servlet and made sure
that it's running with the new version.

any ideas?

kr,
guenther

--
Günther Wieser

creative-it
Guglgasse 6/1/11/1
A-1110 Wien
Austria
http://www.creative-it.com

2 Dinge sind unendlich: Das Universum und die 
Dummheit der Menschheit, aber beim Universum 
bin ich mir nicht so ganz sicher.
Albert Einstein 





Re: how to get the version of struts during runtime

2006-04-04 Thread Leon Rosenberg
On 4/4/06, Günther Wieser [EMAIL PROTECTED] wrote:
 hi,

 i would need to check the version of struts running during runtime, to be
 more specific when my derived action servlet runs through its init method
 (derived from ActionServlet of course).
 reason is, if the minor version has changed, a warning should be written to
 the logs; if a major change of the version happened, my action servlet will
 refuse to start until somebody checked the code of the servlet and made sure
 that it's running with the new version.

Now _this_ is called backward compatibility :-)
Leon



 any ideas?

 kr,
 guenther

 --
 Günther Wieser

 creative-it
 Guglgasse 6/1/11/1
 A-1110 Wien
 Austria
 http://www.creative-it.com

 2 Dinge sind unendlich: Das Universum und die
 Dummheit der Menschheit, aber beim Universum
 bin ich mir nicht so ganz sicher.
 Albert Einstein






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to get the version of struts during runtime

2006-04-04 Thread Ted Husted
For the minor version number (1.1, 1.2, 1.3), you could check the DTD,
but I don't know of a reliable way to check for milestones (1.2.8
versus 1.2.9).

-Ted.

On 4/4/06, Günther Wieser [EMAIL PROTECTED] wrote:
 hi,

 i would need to check the version of struts running during runtime, to be
 more specific when my derived action servlet runs through its init method
 (derived from ActionServlet of course).
 reason is, if the minor version has changed, a warning should be written to
 the logs; if a major change of the version happened, my action servlet will
 refuse to start until somebody checked the code of the servlet and made sure
 that it's running with the new version.

 any ideas?

 kr,
 guenther

 --
 Günther Wieser

 creative-it
 Guglgasse 6/1/11/1
 A-1110 Wien
 Austria
 http://www.creative-it.com

 2 Dinge sind unendlich: Das Universum und die
 Dummheit der Menschheit, aber beim Universum
 bin ich mir nicht so ganz sicher.
 Albert Einstein







--
HTH, Ted.
** http://www.husted.com/ted/blog/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to get the version of struts during runtime

2006-04-04 Thread Ted Husted
On 4/4/06, Ted Husted [EMAIL PROTECTED] wrote:
 For the minor version number (1.1, 1.2, 1.3), you could check the DTD,
 but I don't know of a reliable way to check for milestones (1.2.8
 versus 1.2.9).

 -Ted.

Actually, I take that back. You could check the manifest.mf file in
the JAR and examine the Implementation-Version.

-Ted.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]