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> </div> <div>Thanks, natalia.</div> <div> </div> <div>Tak<br><br></div> <div class="gmail_quote">On Fri, Sep 19, 2008 at 9:18 PM, Natalia Shilenkova <span dir="ltr"><<a href="mailto:[email protected]">[email protected]</a>></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 <<a href="http://takpo.li/" target="_blank">takpo.li</a>@<a href="http://gmail.com/" target="_blank">gmail.com</a>> wrote:<br>><br>> Thanks, Natalia, I have a few questions on Addcontact.java:<br> ><br>> // Create the XMLResource and store the document<br>> XMLResource resource = (XMLResource) col.createResource( "",<br>> "XMLResource" );<br>> resource.setContent(ourdoc);<br> > col.storeResource(resource);<br>> I believe ourdoc is the xml string. However, I believe this is for<br>> addressbook data base only. How should I change it to a database name<br>> "cad"?<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. 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't forget to<br> create this collection before trying to access it from the<br>application.<br><br>Regards,<br>Natalia<br><br>> Thanks,<br>><br>> Tak<br></blockquote></div><br></div> ------=_Part_36914_19395536.1222527059612--