users@glassfish.java.net

Virtual Web Directory connected to Windows UNC Path

From: <glassfish_at_javadesktop.org>
Date: Fri, 24 Aug 2007 08:54:05 PDT

Scenario:

OS: Windows Server 2003 SP1
App Server: GlassFish V2 RC4 Build 58

I'm trying to deploy a web application to the root context. The web application is deployed as a directory located on C:\AppDir.

We have a shared media directory located on a different server, and in the past have used a UNC path configured as a virtual web directory on Microsoft IIS 6.

We are trying to use the built-in GlassFish web server, and would also like to be able to do the same thing.

I have taken a look at the blog by Jan Luehe on configuring an alternate docroot, but so far that has not worked, even if I tried setting the alternate to just another local directory.

Is there something that I am doing wrong. Here is what I have in the sun-web.xml file.

[i]<?xml version="1.0" encoding="UTF-8"?>

<!--
 Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
 Use is subject to license terms.
-->

<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app>
  <context-root>/</context-root>
  <property name="alternatedocroot_1" value="from=*media* dir=/media"/>
</sun-web-app>[/i]

I am anticipating that this should produce the following results:

http://<server>:<port>/media/image.gif --> c:\media\image.gif or better yet \\<server2>\media\image.gif (UNC path).

Any help will be appreciated.
[Message sent by forum member 'yangp3' (yangp3)]

http://forums.java.net/jive/thread.jspa?messageID=232510