Re: install xindice into tomcat6.0

"Tak-po Li" <[email protected]> Sat, 27 Sep 2008 10:50:59 -0400
Newsgroups gmane.text.xml.xindice.user
Message-ID <[email protected]>
------=_Part_36914_19395536.1222527059612
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks, natalia.

Tak

On Fri, Sep 19, 2008 at 9:18 PM, Natalia Shilenkova
<[email protected]>wrote:

> On Fri, Sep 19, 2008 at 3:08 PM, Tak-po Li <[email protected]> wrote:
> >
> > Thanks, Natalia, I have a few questions on Addcontact.java:
> >
> >          // Create the XMLResource and store the document
> >          XMLResource resource = (XMLResource) col.createResource( "",
> > "XMLResource" );
> >          resource.setContent(ourdoc);
> >          col.storeResource(resource);
> > I believe ourdoc is the xml string.  However, I believe this is for
> > addressbook data base only.  How should I change it to a database name
> > "cad"?
>
> You are correct, ourdoc variable contains an xml string. To store a
> document in a different collection, you just need to get a different
> collection instance from a database, the code above does not need to
> change. The collection instance used by addressbook is initialized in
> DBConnection.java.  In that class, application accesses a collection
> xmldb:xindice://localhost:8080/db/addressbook, so it needs to be
> changed to xmldb:xindice://localhost:8080/db/cad. Don't forget to
> create this collection before trying to access it from the
> application.
>
> Regards,
> Natalia
>
> > Thanks,
> >
> > Tak
>

------=_Part_36914_19395536.1222527059612
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr"><div>&nbsp;</div>
<div>Thanks, natalia.</div>
<div>&nbsp;</div>
<div>Tak<br><br></div>
<div class="gmail_quote">On Fri, Sep 19, 2008 at 9:18 PM, Natalia Shilenkova <span dir="ltr">&lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">On Fri, Sep 19, 2008 at 3:08 PM, Tak-po Li &lt;<a href="http://takpo.li/" target="_blank">takpo.li</a>@<a href="http://gmail.com/" target="_blank">gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; Thanks, Natalia, I have a few questions on Addcontact.java:<br>
&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Create the XMLResource and store the document<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XMLResource resource = (XMLResource) col.createResource( &quot;&quot;,<br>&gt; &quot;XMLResource&quot; );<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;resource.setContent(ourdoc);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;col.storeResource(resource);<br>&gt; I believe ourdoc is the xml string. &nbsp;However, I believe this is for<br>&gt; addressbook data base only. &nbsp;How should I change it to a database name<br>&gt; &quot;cad&quot;?<br>
<br></div>You are correct, ourdoc variable contains an xml string. To store a<br>document in a different collection, you just need to get a different<br>collection instance from a database, the code above does not need to<br>
change. The collection instance used by addressbook is initialized in<br>DBConnection.java. &nbsp;In that class, application accesses a collection<br>xmldb:xindice://localhost:8080/db/addressbook, so it needs to be<br>changed to xmldb:xindice://localhost:8080/db/cad. Don&#39;t forget to<br>
create this collection before trying to access it from the<br>application.<br><br>Regards,<br>Natalia<br><br>&gt; Thanks,<br>&gt;<br>&gt; Tak<br></blockquote></div><br></div>

------=_Part_36914_19395536.1222527059612--