tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vineet Chadha <vineet.cha...@gmail.com>
Subject tomcat webdav
Date Fri, 07 Oct 2005 16:17:09 GMT
Hi,
 I am trying to configure webdav to provide web resource to multiple user.
For example, inside webdav directory I create multiple user directory (
user1, user2 ,user3 ....). I am authenticating users using mysql database (
authentication works fine for single user ( let us say user1) with role name
user1). But it doesn't work for multiple users. Here is snippet of
web.xmlfile in webapps/webdav/WEB-INF/
web.xml ( specifically security constraint I am trying to set). Please note
that as specified in following XML parameters, admin and user1 are able to
authenticate with database. All users/roles are correctly specificed. what i
want is to provide admin access to admin for "/webapps/webdav/" directory
and user1 access of "/webapps/webdav/user1" directory. I have created user1
directory inside webapps.

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
     <role-name>admin</role-name>
  </auth-constraint>
</security-constraint> 	

<security-constraint>
  <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/user1/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
     <role-name>user1</role-name>
  </auth-constraint>
</security-constraint>		

 <login-config>
  <auth-method>BASIC</auth-method>
  <realm-name>Tomcat Manager Application</realm-name>
</login-config>

 <security-role>
  <description>
    The role that is required to log in to the Manager Application
  </description>
  <role-name>admin</role-name>

  <role-name>user1</role-name>

</security-role>if i try webdav access through
http://xxx.xxx.xxx.xxx:8080/webdav/user1 and enter username and password, it
gives following error on web page:
 java.lang.NullPointerException
org.apache.catalina.servlets.DefaultServlet.renderHtml(DefaultServlet.java
:1345)
org.apache.catalina.servlets.DefaultServlet.render(DefaultServlet.java:1102)
org.apache.catalina.servlets.DefaultServlet.serveResource(
DefaultServlet.java:807)
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:335)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
org.apache.catalina.servlets.WebdavServlet.service(WebdavServlet.java:287)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 tomcat log file indicates following:
 java.lang.NullPointerException
at org.apache.catalina.servlets.DefaultServlet.renderHtml(DefaultServle
t.java:1345)
at org.apache.catalina.servlets.DefaultServlet.render(DefaultServlet.ja
va:1102)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultSer
vlet.java:807)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.jav
a:335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.apache.catalina.servlets.WebdavServlet.service(WebdavServlet.jav
a:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
licationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
FilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper
Valve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContext
Valve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentic
atorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
lve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja
va:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.jav
a:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proc
essConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndp
oint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFo
llowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
Pool.java:684)
at java.lang.Thread.run(Thread.java:595)
  Please help. Can we configure webdav application to provide exclusive
access of a subdirectory to multiple user ?
 Regards,
Vineet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message