Re: Why "Net use ..." does not work with WebDAV servlet
Hi Mark, I also monitored the request/response between WebDAV servlet in Tomcate and MS Mini Redirector and compared it with Apache (mod_dav) and MS Mini Redirector. I can say no difference. But I don't know what it works with Apache but not for Tomcat one . Do you have any idea? can it be consequence of Authentication or Authorization policy of Tomcat? I have spent all last week working on this problem but no success! any idea or comment will be appreciated. regards, /shahab Mark Thomas <[EMAIL PROTECTED]> wrote: Shahab1355 wrote: > sorry for late answering and I hop it is not too late. I ma using Tomcat 5.5 > and the WebDAV servlet developed by Apache. but the servlet does not > respond to the net use command. I have taken a look at the request/response cycle with tcpmon (from Axis) and I can't see anything obviously wrong. The request/response are shown below. If anyone can see what the problem is with the response, let me know. Mark Request === PROPFIND /webdav HTTP/1.1 Depth: 0 translate: f User-Agent: Microsoft-WebDAV-MiniRedir/5.1.2600 Host: localhost Content-Length: 0 Connection: Keep-Alive Response HTTP/1.1 207 Multi-Status Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=UTF-8 Content-Length: 548 Date: Tue, 02 Oct 2007 04:14:42 GMT - /webdav/ 2007-10-02T04:08:34Z HTTP/1.1 200 OK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
Help - "javax.servlet.UnavailableException: No resources"
Hi, I am trying to use webDAV servlet in my application So I downloaded the webDAV Servlet and included it in my application. I put it in "mypackage" package. But when a request is directed to this servlet, I get the following error. INFO: Marking servlet webdav as unavailable Oct 3, 2007 4:47:15 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Allocate exception for servlet webdav javax.servlet.UnavailableException: No resources at org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:320) at mypackage.WebdavServlet.init(WebdavServlet.java:221) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) Just to test whether I can deploy this webDAV servlet, I have removed everything from my web application and Here is my web.xml content: http://java.sun.com/dtd/web-app_2_3.dtd'> webdav mypackage.WebdavServlet debug 1 listings true mypackage.WebdavServlet webdav /* I am new to Tomcat and webDAV, but I think the problem is in deployment, but I don't know where? I am using Tomcat plugins for Eclipse to deploy the web application. regards, /shahab - Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.
RE: Why "Net use ..." does not work with WebDAV servlet
Thank you for your hints to Slide.Actually slide is to heavy and complex for my purpose and I am still trying to use windows mini redirector with WebDAV servlet but no success. Peter Crowther <[EMAIL PROTECTED]> wrote: > From: shahab [mailto:[EMAIL PROTECTED] > I am trying to develop a simple distributed file system using > WebDAV servlet on Tomact application server. while I can > successfully browse the WebDAV enabled directory via IE or > FireFox, issuing "net use p: http://lp:port/Dav"; results in > "The network name can not be found" error message so drive > P: can not be created. whereas this net use command can be > executed successfully in Apache web server. The WebDAV redirector built into Windows uses a different codebase from the one built into Internet Explorer. It also doesn't match the WebDAV spec in a number of unpleasant ways. I assume the httpd developers (assuming this is what you mean by "Apache web server") have managed to find a workaround which is not in Tomcat's WebDAV servlet. Have you looked at Jakarta Slide? It contains a more complete WebDAV implementation than Tomcat's own servlet, and may get round the problem. It also includes pluggable storage modules; you may find that much of your distributed file system work has been done for you. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
Why "Net use ..." does not work with WebDAV servlet
Hi, I am trying to develop a simple distributed file system using WebDAV servlet on Tomact application server. while I can successfully browse the WebDAV enabled directory via IE or FireFox, issuing "net use p: http://lp:port/Dav"; results in "The network name can not be found" error message so drive P: can not be created. whereas this net use command can be executed successfully in Apache web server. I do appreciate your comments and tips. regards /shahab - Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
Re: how to populate userPrincipal in request object
Hi: I am trying to find out how to poulate the userPrincipal from HttpServletRequest. I have the following code to retrieve the principal - HttpServletRequest request = ServletActionContext.getRequest(); Principalprincipal = request.getUserPrincipal(); // get a Principal object My qn is to how to set the userPrincipal. thanx shahab wrote: > > Hi: > > Would you please let me know how can I set the userPrincipal in request > Object. > I am setting the Principal and roles in Subject (2 Principal object > according to JAAS implementation). > > When i run the code in debugger, I see the Subject in "reuqest" null, also > userPrincipal is null. Also, instead of role map in "request", its > updating security map. > > Thanx > -- View this message in context: http://www.nabble.com/how-to-populate-userPrincipal-in-request-object-tf3914736.html#a11105770 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to populate userPrincipal in request object
Hi: Would you please let me know how can I set the userPrincipal in request Object. I am setting the Principal and roles in Subject (2 Principal object according to JAAS implementation). When i run the code in debugger, I see the Subject in "reuqest" null, also userPrincipal is null. Also, instead of role map in "request", its updating security map. Thanx -- View this message in context: http://www.nabble.com/how-to-populate-userPrincipal-in-request-object-tf3914736.html#a11099625 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: My first JAAS implementation. A few questions.
Hi: I have similar issue. Would you know if we need to save trhe Subject in HttpSession? Otherwise, how would the context get the Subject as follows - Subject = <%= Subject.getSubject(AccessController.getContext()) %> thanx Shahab Mark Benussi wrote: > > I am implementing my first JAAS implementation and have some > problems/questions. > > Firstly my commit method of my LoginModule does the following (User and > Role > both implement Principal) > > // Create a new User Principal with the user name retrieved from the > NameCallback > User user = new User(username); > // Add the principal to the subject > subject.getPrincipals().add(user); > > for (int i = 0; i < roles.length; i++) { > // Iterate the role names retrieved from the database lookup >String roleName = roles[i]; >// Create a new Role Principal with the role name > Role role = new Role(roleName); > // Add it to the public credentials to see if it works > subject.getPublicCredentials().add(role); > // Add it to the private credentials to see if it works > subject.getPrivateCredentials().add(role); > } > return true; > > In the JSP that the application returns to after doing form based > authentication the following occurs > > Subject = <%= Subject.getSubject(AccessController.getContext()) %> > Remote User = <%= request.getRemoteUser() %> > User Prinicipal = <%= request.getUserPrincipal() %> > > But this produces > > Subject = null > Remote User = administrator > User Prinicipal = GenericPrincipal[administrator()] > Why is the subject null please? > > The request.isUserInRole() methods for the role names I added to the > subject > also return false... has anyone got some helpful ideas please? > > If more source is needed I can gladly provide it if will help > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/My-first-JAAS-implementation.-A-few-questions.-tf207803.html#a10183578 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to set JAAS Subject in HTTPSession
Hi: I would need help with the following - I am trying to implement JAAS authentication using struts2. I have implemented the following flow - user request -> struts action -> login() -> loginModule (implements LoginModule) this login module validates userid, password and in the commit(), it creates a Principal and adds the principal in the Subject. My qn is how do I set this Subject in the HttpSession so that I can retrieve it later, like below - HttpServletRequest request = ServletActionContext.getRequest(); Principal principal = request.getUserPrincipal(); Please help. thanx Shahahb -- View this message in context: http://www.nabble.com/how-to-set-JAAS-Subject-in-HTTPSession-tf3642977.html#a10173947 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to set role for JAASRealm
Hi: I am trying to implement authentication and authorization using JAASRealm. (I am following the instruction provided at - http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html). However, looks like the role that I set (in the RolePrincipal) is not taking effect. I have created a class extending Principal for the role. I am setting the right name of the role (which I fetch from DB) and add the class to Subject as follows - LoginContext lc = null; try { lc = new LoginContext("TMSLogin", new AuthCallBackHandler(username, password)); } catch (LoginException le) { .. } try { lc.login(); } catch (LoginException le) { } // now I am trying to set the rolePrincipal Subject mySubject = lc.getSubject(); TMSRoles tmsRoles = new TMSRoles(role); mySubject.getPrincipals().add(tmsRoles); I have also made entries in server.xml as follows (i set debug to 0 hoping for more debug info, TMSLogin is defined in jaas.config in tomcat's conf directory) - my entry in web.xml is the following - AdminConstraint TMSAdmin Only for administrators /admin/* GET POST ADMIN ADMIN ADMIN the getName() of the TMSRoles instance returns "ADMIN", which should allow url /admin/*. However, I am still getting HTTP 403. Please help. thanx Shahab -- View this message in context: http://www.nabble.com/how-to-set-role-for-JAASRealm-tf3359888.html#a9346104 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]