JSP Sample??

Hello,

is there a little JSP Sample available with access to tamino??

Regards,
Volker

Hi,

Here’s a small jsp example that reads a Property record from the RealEstate database.
Hope it’s useful.

code:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<%@ page language=“java” contentType=“text/html” %>
<%@ page import=“com.softwareag.tamino.API.dom.*” %>
<%@ page import=“org.w3c.dom.Element” %>


A simple Tamino access example with jsp


<%
TaminoClient myTC = new TaminoClient(“http://natserv2/tamino/RealEstate/Property”);
myTC.setPageSize(5);
TaminoResult myTR = myTC.query( “Property[@ino:id=1]” );
while (myTR.hasMoreElements()) {
Element myElement = myTR.getNextElement();
%>
<%=myElement.toString()%>
<% } %>
Done!



…and you will see a complete JSP TagLib for Tamino coming up somewhere this space… Stay tuned… [just in case you wanted to write your own]

Best regards, Andreas

Thanks for the sample.
I’ll see if I get this to work here.

What about the taglib?
Anything to do with the upcoming X-Application??

BTW: where is the forum gone??

Regards,
Volker

Hi how is this method used when you need to do authentication? becos of server changes now my code throws this error.

Tamino Error Text: HTTP error 401 Authorization Required Tamino Error Code: 8400

Thanks.

Maybe this is what you want!?

The parameters are in the web.xml file.

  <BR><BR>String tamino_server = getServletContext().getInitParameter("tamino_server");<BR> String tamino_db = getServletContext().getInitParameter("tamino_db");<BR> String tamino_collection = getServletContext().getInitParameter("tamino_collection");<BR> String tamino_login = getServletContext().getInitParameter("tamino_login");<BR> String tamino_pass = getServletContext().getInitParameter("tamino_pass");<BR> String collection = "http://"+tamino_login+":"+tamino_pass+"@"+tamino_server+"/tamino/"+tamino_db+"/"+tamino_collection;<BR><BR>TaminoClient myTC = new TaminoClient(collection);<BR>



Regards,
Volker

Volker Bachmann
has program service AG
Germany

The TaminoClient object has a couple of properties to set userid and password.

Hi,
Can anyone tell me where to find a JSP Sample to update tamino??
Geiri

Geiri

Hi Geiri,

have a look at X-Application (start here).

With X-Application you can generate a JSP application specifically for your schema.
Hopefully this would be the ideal example!

There is a lot of good documentation included in the X-Application download, so you should find it a good starting point.

Cheers,
Trevor.

Hi
Thank you for your response Trevor.

I’ve installed XApplication and looked at and executed some examples.
I am wondering where I configure the connection string, that is the server name, data base name and the name of the schema that is beeing used.

Regards Geiri

Geiri

This is done in the web.xml file.
Sorry for the inconvenience.
Regards

Geiri

No worries!