WebDav server on Tomcat 8 in Red Hat 7

Hi TEam,
Need to Have WebDav server on Tomcat 8 in Red Hat 7. Was going through the link below.
Web Distributed Authoring and Versioning Setup
Not sure what should I put in these variables like: </param-name> , /param-value>, Servlet Name ?

<servlet>
  <servlet-name>webdav</servlet-name>
  <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
  <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
  </init-param>
  <init-param>
    <param-name>listings</param-name>
    <param-value>true</param-value>
  </init-param>

  <!-- The following for read-write access -->

  <init-param>
    <param-name>readonly</param-name>
    <param-value>false</param-value>
  </init-param>
</servlet>

<servlet-mapping>
  <servlet-name>webdav</servlet-name>
  <url-pattern>/*</url-pattern>
</servlet-mapping>

Open in new window


We have the Tomcat 8 installed on server: madmachine@de.com

Please let me know.

Thanks,
Flex
Flex TronDeveloperAsked:
Who is Participating?
 
nociSoftware EngineerCommented:
AFAICT from the website, the WEBdav has been built in into tomcat... I may be wrong of course...

I read this
https://wiki.apache.org/tomcat/Tomcat/WebDav

as add to nonexisting file... would mean to create a file...

here the same
http://www.tomcatexpert.com/knowledge-base/how-configure-tomcat-webdav

I only use tomcat because some application we use are delivered as .war files for tomcat.
I have no hobby system available for testing.
0
 
nociSoftware EngineerCommented:
param name / value are pairs for configurations , those tell here debug=0 & listings=true
so you may increase the debug level wit steeing the paramvalue of r the paramname debug to 1.

the servlet name allows that you can have webdav as well as webdav1, webdav2 etc. etc.
or change it to mydav.,   and it influences the URI to access them in tomcat.
1
 
Flex TronDeveloperAuthor Commented:
@noci Thanks For this. Now once this is done and I have edited the web.xml, how to test it out that webdav is working  .!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
nociSoftware EngineerCommented:
access it with an webdav client?
0
 
Flex TronDeveloperAuthor Commented:
Hi Noci,
I was going through the notes as mentioned here
https://www.mulesoft.com/tcat/tomcat-webdav#using-webdav
 
Under Step 1 it says:
To define and map the WebDAV servlet to a specific context and URL, add the following to $CATALINA_HOME/webapps/[myApp]/WEB_INF/web.xml:

I don't have any folder like this in my server.  Though Tomcat is running on Red Hat.
Do I need to have Maven also installed here.
Please guide me a bit on these steps...would really appreciate it.

Thanks,
0
 
nociSoftware EngineerCommented:
You mean there is no $CATALINA_HOME/webapps/ folder...
(the variable CATALINA_HOME should be set in startup script or one of the includes thereof).

The exact location varies with distributions, i have no RHEL accesible atm.)
/var/lib/tomcat
is the most probable ...

[myapp] should not exist, you need to insert your app name there.
0
 
Flex TronDeveloperAuthor Commented:
Hi Noci,
I have $CATALINA_HOME/webapps(Already Exists)/ <WebDav..will create this >  But where to get this folder./WEB_INF/web.xml  ?

Thanks
0
 
nociSoftware EngineerCommented:
If you name your webapp XXXX then  with $CATALINA_HOME = /var/lib/tomcat
then the complete path will become:

/var/lib/tomcat/webapps/XXXX/WEB_INF/web.xml:

so WEB_INF folder will be in XXXXX and the web.xml file inside the WEB_INF folder.
0
 
Flex TronDeveloperAuthor Commented:
Hi Noci.
The Problem is that
and the web.xml file inside the WEB_INF folder.
 doesn't exist. DO I need to have a Maven installed first ?
0
 
nociSoftware EngineerCommented:
maven is a project management tool, if you want to run maven then yes...
I had the impression you had the need for webdav...
it should be sufficient to create the file inside the WEB_INF  folder.

use the nano or vi editor (or any tekst-editor  you like, if needed notepad, and then copy the file to the tomcat system in the right place).
Another way can be:
cat  >web.xml
and then paste the content to the window.
and then press ^D (control together with D).
0
 
Flex TronDeveloperAuthor Commented:
Thanks Noci.
SO If I understand it correctly, I can manually crate a New Web.xml file under WEB-INF folder. Just wondering, if that will work since it was manually created and not through any particular WAR file .
0
 
Flex TronDeveloperAuthor Commented:
@noci
You are perfectly right. The WebDAV  servlet is already present in Tomcat 8...but is not enabled.
The Code  to enable it is given here:  https://www.mulesoft.com/tcat/tomcat-webdav#using-webdav

Used curl command to do a file transfer.
The only point left now is ....is it necessary to have tomcat and WebDav running on Same port. The reason I am saying is because there is another application running on 8080....so would like WebDAV to run on 8081. Are there any iptables command which we can use for this ?

Thanks
Flex
0
 
Flex TronDeveloperAuthor Commented:
FOr me the case was to add the following tags around the code ....<web-app>  and it started to function. Thanks for your help Noci.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.