Square brackets around file names

Hi, As a Linux newbie I would be grateful if someone could explain the significance of the square brackets in certain filenames. The directory /usr/share/tomcat has files such as: [servlet].jar and
[jsp].jar. These two files need to go in my classpath but I am confused by the brackets.

Thank you,
Simon

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Looks like some bonehead included square brackets in the names. The
only significance I can think of is that the person who named the files
that way is a bonehead unnecessarily complicating things. They don’t
“mean” anything really unless you are viewing the file names via
something that is putting them in there to give them some significance.

Good luck.

simon allen wrote:
> Hi, As a Linux newbie I would be grateful if someone could explain the
> significance of the square brackets in certain filenames. The directory
> /usr/share/tomcat has files such as: [servlet].jar and
> [jsp].jar. These two files need to go in my classpath but I am
> confused by the brackets.
>
> Thank you,
> Simon
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJCT4h3s42bA80+9kRAtNQAJ0UEnDIKjMb8B7t/OYR/3JD9l/wVACeJppM
saQgEheQ99zqXXBLfk8iJoU=
=MdE1
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I suppose to follow up on this do you know where the files originated?
If they are from a party outside Apache (the foundation which
makes/sponsors Tomcat) perhaps at some point during the build process
this was entered in there and there was a problem during an automatic
build that led to the silly file name. For example the code may
represent the first part of the file name in brackets expecting that to
be replaced with something more-significant like ‘mywidgit’ specific to
that app but, due to a typo or something, ended up putting in the
generic variable representation of ‘[servlet]’ instead. Wild guess for
sure, but it would explain some things. So, what are you viewing the
file name with and from where did the file originate?

rpm -qf /usr/share/tomcat/[servlet].jar

Good luck.

ab@novell.com wrote:
> Looks like some bonehead included square brackets in the names. The
> only significance I can think of is that the person who named the files
> that way is a bonehead unnecessarily complicating things. They don’t
> “mean” anything really unless you are viewing the file names via
> something that is putting them in there to give them some significance.
>
> Good luck.
>
>
>
>
>
> simon allen wrote:
>> Hi, As a Linux newbie I would be grateful if someone could explain the
>> significance of the square brackets in certain filenames. The directory
>> /usr/share/tomcat has files such as: [servlet].jar and
>> [jsp].jar. These two files need to go in my classpath but I am
>> confused by the brackets.
>
>> Thank you,
>> Simon
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJCT7U3s42bA80+9kRArmzAJ9CUYhRRnWwXygnT3kaIG9uzm1wegCfcb2M
olTCBzWaD2FsrxwHpE+8Mus=
=FG2u
-----END PGP SIGNATURE-----

Yeah, I’ve noticed those too. I never really found out why, and a search didn’t find any clues. I think it’s just the way tomcat does things. And it doesn’t happen for all jars, just some. The variants are all symlinks to the same place as the original, e.g.

[jta].jar
jta.jar

both point to the same JAR.

Things are often mysterious and poorly documented in the Java world.

Hi Guys,
Thanks for your replies. I installed Tomcat from a DVD the other day (the same DVD as the openSuSe 10.3 installation). As I need to run some servlets, I needed to include the servlet and jsp api’s in my classpath. Here is what I see when I view them via konsole (complete with square brackets):

simon@suse:/usr/share/tomcat55/common/lib> ls
[ant].jar [commons-pool].jar [jdbc-stdext].jar [mx4j][mx4j].jar
[commons-collections].jar [jaf].jar [jdtcore].jar naming-factory.jar
[commons-dbcp].jar [jasper55-compiler].jar [jndi].jar naming-resources.jar
[commons-el].jar [jasper55-runtime].jar [jsp].jar [servlet].jar
[commons-logging-api].jar [javamail].jar [jta].jar

Regards,
Simon

I think you will find that all the jars in that directory are included by tomcat, not sure exactly how, but I never had to set the classpath explictly when running tomcat servlets.