Hello Chad,
many thanks for this example. things start to get clearer.
I deployed the servlet in the server/webapps directory and slide
automatically created an "application" entry in the TC manager. whether or
not I create a new namespace in the server/conf/slide.xml file, accessing
the namespace returns me an empty directory listing. so how can I access
the servlet? the entries in the deployed web.xml file should be correct
because I had forte for java do it.
additionally, trying to access the test1 (or any other) namespace via
webDAV returns the message "server does not support WebDAV at resource
...". I only managed to access and use a webdav client if I deploy the
slide.war file with tomcat. is this usual?
regards,
claus goettfert
At 13:03 14.03.2002 -0600, you wrote:
>I have also been trying to understand slide and I have created a simple
>servlet that gets a document out of the database (mySQL) and displays the
>revision and content. If you do not use webDAV to store/retrieve the
>documents you will need to create a application to do this. This servlet
>will give you a start on how this is accomplished. This servlet is
>assuming you are using the slide namespace which is how the server is
>configured that is included with the binary. Let me know if this helps.
>
>Chad
>
>Here is the doGet method from the Servlet
>
> public void doGet( HttpServletRequest request, HttpServletResponse
> response )
> throws ServletException, IOException {
>
> try{
> NamespaceAccessToken token = Domain.accessNamespace(new
> SecurityToken(""), "slide");
>
> Structure structure = token.getStructureHelper();
> Security security = token.getSecurityHelper();
> Lock lock = token.getLockHelper();
> Content content = token.getContentHelper();
>
> CredentialsToken credToken =
> new CredentialsToken(new String("root"));
> SlideToken slideToken = new SlideTokenImpl(credToken);
>
> NodeRevisionDescriptors revisionDescriptors =
> content.retrieve(slideToken, "/files/Articles/article.xml");
>
> System.out.println ("revisionDescriptors = " +
> revisionDescriptors.getUri ());
>
> NodeRevisionDescriptor revisionDescriptor =
> content.retrieve(slideToken, revisionDescriptors);
>
> System.out.println ("revisionDescriptor = " +
> revisionDescriptor);
>
> System.out.println("Latest revision in the main branch :
> Number:" + revisionDescriptor.getRevisionNumber());
>
>
> NodeRevisionContent theContent = content.retrieve(slideToken,
> revisionDescriptors, revisionDescriptor);
> char[] cnt = theContent.getContent();
>
> for (int x=0; x<cnt.length;x++){
> System.out.print(cnt[x]);
> }
> } catch (Exception ex) {
> ex.printStackTrace();
> }
> }
>
>
>At 12:56 PM 3/14/2002 +0100, you wrote:
>>hi all,
>>
>>I've tried to get aquainted with slide over the past 2 weeks, but utterly
>>failed as it seems.
>>
>>I've read all the documentation (I only found the one at
>>http://jakarta.apache.org/slide/), the global faqs and the slide guide.
>>and as far as this is concerned I think I understood most of this, so how
>>slide authenticates users, manages namespaces and so on.
>>
>>it is difficult to explain, but it seems that I have quite missed the
>>point of slide.
>>
>>so I'm going to ask questions, and hoping for answers which would clarify
>>the use of slide for me.
>>
>>1) I don't have to implement anything further to use slide except eg if I
>>want to use some other storage systems (eg not db or filesystem) where
>>drivers for are not implemented yet
>>
>>I also don't have to implement any jsp pages or java servlets for the
>>interface because there is no interface, because the webdav client is the
>>interface.
>>but if so, how I'm going to use a database when I eg want to have some
>>atricles (date, teaser, header, text of article) stored without an (eg
>>html) interface?
>>I know that I can configure how data of certain nodes is stored (so file
>>system or db etc), but those two usages are quite different. using a db
>>would need an interface. where is this interface or where do I have to
>>put it (are there examples?)
>>
>>or
>>2) the only use of slide is to authenticate users, manage namespaces,
>>have an acl to provide rights for different users. probably use
>>versioning or logging.
>>
>>3) the only thing a end-user really needs is a webdav client. with that,
>>he can look up eg versioning, write and read files.
>>
>>4) can someone point me to a real example, where slide is used? where I
>>can go through the files and hopefully understand how this all works
>>together and make sense out of it.
>>
>>if there is some explanation about this on the net, I would be grateful
>>if someone can point me there.
>>
>>I also had troubles using the documentation for configuring slide because
>>at some points the documenation simply misses important information (eg
>>where to change things and how the syntax looks like). so probably there
>>is some other documentation somewhere?
>>
>>a big thank you to you all,
>>
>>claus goettfert
>>
>>
>>--
>>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
Claus Goettfert
Rustengasse 3 / 1
1153 Wien / AUSTRIA
Tel.: +43/(0)650/503 301 0
web: http://www.goettfert.at
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>