Home > GlassFish > Enabling WebDav in GlassFish

Enabling WebDav in GlassFish

It is very easy to enable WebDav in GlassFish, but you can’t enable it the way you usualy do it using Tomcat. The reason is when you define, in defaul-web.xml, the WebDav servlet, you can’t protect it because GlassFish lack of support for a default-sun-web.xml, where you usualy define your security constraints mapping. You certainly don’t want to enable WebDav without protecting the functionality with a security constraint, because if not protected, then everybody will be able to make modification to your content.

First, enable the WebDav Servlet in your web-xml:

<servlet-name>webdav</servlet-name> <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>

Then define the servlet mapping associated with your WebDav servlet:


You are now ready to use any WebDav client by doing connecting to:


As an example, I did using Office 2003:

File > Open >

and changed the index.html page. Next step is to protect the WebDav support because everybody can now make modifications to your content:

<web-resource-name>Login Resources</web-resource-name>

and then define, in your sun-web.xml:


Next, create you user and password.

asadmin create-file-user --user admin --host localhost --port 4848 --terse=true --groups Admin --authrealmname default admin

You are now ready to use WebDav with GlassFish

_uacct = “UA-3111670-1”;

Categories: GlassFish
  1. October 15, 2012 at 9:35 am

    I think the admin of this web page is in fact working hard for his web site, because
    here every stuff is quality based information.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: