RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Mark Thomas
This works for me.

Did you restart the app after changing web.xml?
What version of tomcat are you using? 

Mark

 -Original Message-
 From: Alessandro Ronchi [mailto:[EMAIL PROTECTED] 
 Sent: Friday, November 12, 2004 11:40 AM
 To: [EMAIL PROTECTED]
 Subject: Newbie: problem with WebDav Tomcat servlet
 
 I want to use tomcat to develop an application. I've got the tomcat
 server correcly running, and I managed correctly basic users
 permissions.
 
 I have a problem: i want to use webdav to upload my app contents (jsp
 pages), but I get two errors:
 - Webdav runs correctly and ask me the correct password. 
 After that, it
 shows me only the webdav/ contents (index.html  tomcat.gif
 tomcat-power.gif  WEB-INF), and I can't write anything. The
 WEB-INF/web.xml contains the uncommented init-param:
 
 !-- Uncomment this to enable read and write access --
 
 init-param
   param-namereadonly/param-name
   param-valuefalse/param-value
 /init-param
 
 !--load-on-startup1/load-on-startup--
 
 - I want to read and write with webdav (i'm using dreamweaver) my app
 dir:
 
 /usr/share/tomcat/server/webapps/dwers
 
 but I simply can't. 
 
 I need some help, also a correct rtfm, because I've searched a lot but
 with no results.
 
 Thanks in advance.
 
 -- 
 Alessandro Ronchi [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Alessandro Ronchi
Il giorno sab, 13-11-2004 alle 12:18 +, Mark Thomas ha scritto:
 This works for me.
 
 Did you restart the app after changing web.xml?

Yes, I did.

 What version of tomcat are you using? 

Apache Tomcat/4.1.27-13

Another question: is it possible to access to a webapp dir contents with
this webdav url: http://host:8080/webapp/webdav/
?
Must I add any configuration directive to get this working?

-- 
Alessandro Ronchi [EMAIL PROTECTED]
http://www.aronchi.org


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Mark Thomas
 Another question: is it possible to access to a webapp dir 
 contents with
 this webdav url: http://host:8080/webapp/webdav/?

No. The url is http://host[:port]/context/pathtofile/file

 Must I add any configuration directive to get this working?

You shouldn't need to.

You might want to try /* as the servlet mapping rather than /. This sometimes
helps, particularly when the client is IE (but this tends to be more of an issue
with TC5 than TC4)

What webdav client are you using?

 
 -- 
 Alessandro Ronchi [EMAIL PROTECTED]
 http://www.aronchi.org
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Alessandro Ronchi
Il giorno sab, 13-11-2004 alle 13:57 +, Mark Thomas ha scritto:
  Another question: is it possible to access to a webapp dir 
  contents with
  this webdav url: http://host:8080/webapp/webdav/?
 
 No. The url is http://host[:port]/context/pathtofile/file

Here is my example:
I have a context named dwers, and I correctly execute this jsp page:
http://localhost:8080/dwers/index.jsp
located on 
/usr/share/tomcat/webapps/dwers/index.jsp

what's the correct webdav url?


-- 
Alessandro Ronchi [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Newbie: problem with WebDav Tomcat servlet

2004-11-13 Thread Mark Thomas
From: Alessandro Ronchi [mailto:[EMAIL PROTECTED] 
 Here is my example:
 I have a context named dwers, and I correctly execute this jsp page:
 http://localhost:8080/dwers/index.jsp
 located on 
 /usr/share/tomcat/webapps/dwers/index.jsp
 
 what's the correct webdav url?

All tomcat responses are provided by servlets. Each request is handled by one,
and only one servlet. The servlet that is used is controlled by the servlet
mappings. There are some default ones in conf/web.xml and you can specify
applciatio specific ones in WEB-INF/web.xml. The rules that control the mapping
are defined in the servlet spec. The JSP and sevrlet specs are a must read for
any web developer.

How does all of this affect you?

Well, to view a JSP .jsp files must be mapped to the JSP servlet but to edit
them they must be mapped to the webdav servlet. A resource will only ever be
mapped to a single servlet.

Webdav isn't intended to provide inplace editing of web application files. So,
how can you get around this?

- Use an IDE that lets you edit the JSP locally and deploys it automatically. I
use Eclipse and the MyEclipse plugin but there are plenty of other options out
there.
- Edit you JSPs locally and use ant to deploy.
- If you have access to the machine running tomcat (either directly or via putty
etc) just edit the JSPs directly in the tomcat directory
- Create a second context with the web.xml setup for webdav (use a /* mapping)
and a symbolic link to the files in the 'normal' app - I don't know unix very
well so can't really explain how to set something like this up

HTH

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Newbie: problem with WebDav Tomcat servlet

2004-11-12 Thread Alessandro Ronchi
I want to use tomcat to develop an application. I've got the tomcat
server correcly running, and I managed correctly basic users
permissions.

I have a problem: i want to use webdav to upload my app contents (jsp
pages), but I get two errors:
- Webdav runs correctly and ask me the correct password. After that, it
shows me only the webdav/ contents (index.html  tomcat.gif
tomcat-power.gif  WEB-INF), and I can't write anything. The
WEB-INF/web.xml contains the uncommented init-param:

!-- Uncomment this to enable read and write access --

init-param
  param-namereadonly/param-name
  param-valuefalse/param-value
/init-param

!--load-on-startup1/load-on-startup--

- I want to read and write with webdav (i'm using dreamweaver) my app
dir:

/usr/share/tomcat/server/webapps/dwers

but I simply can't. 

I need some help, also a correct rtfm, because I've searched a lot but
with no results.

Thanks in advance.

-- 
Alessandro Ronchi [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]