Jul
18
2009
There are many reasons you may want some of your content outside of the application server root. Perhaps you wish to share the content between applications or even webservers, or maybe you temporarily write data from a database to be served. Regardless, serving static content in glassfish is extremely easy. There are two ways to accomplish this; at the server level and at the application level.
Server level
First we will look at the server level, this will make your information available server wide, outside of any application context. Lets say you have images you wish to serve in the directory C:\media. In the glassfish admin console expand configuration > http service > virtual servers. Select ‘server’ then scroll to the bottom and select ‘add property’.
For name use: alternatedocroot_1, for value use: from=/media/* dir=C:/
Keep in mind that glassfish expects the directory in the URL pattern to exist, so the from= is not just the URL pattern, but it is also the path relative to the dir=.
Continue reading
5 comments | tags: Glassfish, JAVA, Server, virtual directory | posted in Software
Jul
12
2009
The third race of the season was today. The event started with Mike calling me as he was leaving for the race to say my oil disposal container with nearly 7 quarts of oil in it from the last oil change of the vette was leaking all over the garage. The actual race however was fun… I am getting rather good at maintaining control of the car through slides, guess I just need to learn to drive better so I slide less and get better times. New tires probably wouldn’t hurt either. What wasn’t fun is that I put my phone in my glove box so it wouldn’t fly around in the car. Well, at some point when I was breaking hard it managed to fly through a little gap in the back of the glove box. So it is now somewhere buried in the car; I don’t know where, I can only hear it. If you try to call me my car will ring and I will not answer (obviously), but maybe the car will? Have a couple pictures from the event, but they are on my phone, which is in the car… literally.
no comments | posted in Uncategorized
Jul
4
2009
It’s been some time since I’ve made any level of effort to maintain a website. I figured it was time. Welcome.
-Marc
1 comment