Using JDBC Adapter Connection in JSP

I have a separate web application which I want to run inside Integration Server. I need to connect to the database. So how can I use the JDBC Adapter Connection in a JSP or Servlet. Any help is appreciated.

Thanks,
Krishna.

Could you use DB connection services (created from the wm developer), and invoke them from the JSP (i.e. http://server:port/invoke/service). Or better yet, use DSPs to create the pages to make the calls.

Thanks Brian. I can use DB Connection services and invoke them from JSP. The requirement is the user will supply DB information or they can change the DB information in runtime. So Is there anyway that I can directly access JDBC Adapter Connection.

Also is it possible to mix DSP and JSP pages?

thanks,
Krishna

Hi all,

How can I take the values that i get from the output of an JDBC adapter service and then use them in my JSP?

Using <webm:value> will make it to be displayed directly to the HTML generated by JSP.

But, how can the variable be tranffered to a variable in the JSP… something like

JSPVariable = Output_from_webM_Service

So that the variable in the JSP gets the value from output of an adapter service.

Please throw some light in that area

Regards
Anil Prasad

Hello,
When you do something like this:
<%
Object yourVar;
%>
<webm:invoke serviceName=“YourService”>

<webm:onSuccess>

<webm:usePipeline>
<% // embedded java
com.wm.data.IData idc = webmPipe.getPipeline(); // I think webmPipe
if(idc.first(“yourPipeVar”)){
yourVar = (Object) idc.getValue();
}
%>
</webm:usePipeline>

</webm:onSuccess>

</webm:invoke>

<webm:value variable=“yourVar” />

I think that should help you.

Good day.


<?xml version="1.0" encoding="iso-8859-1"?>
<jsp:root
        xmlns:jsp="http://java.sun.com/JSP/Page"
        xmlns:webm="http://webm-taglib.tld"
        xmlns:c="http://java.sun.com/jsp/jstl/core">
    <html>
    
    <c:set var="myval">
        <webm:value variable="val"/>
    </c:set>
    
    <c:out value="${myval}"/>
    ${myval}
    </html>
</jsp:root>

check the configuration of tomcat and of your webapp