How to use JNI in JSP???

I have jsp on tomcat. I'd like to get some method from JNI in JSP. I'm already test JNI with java application, it's work well. But I don't know how to adapt in JSP. Could anyone help?
Thanks and Best Regards,

Hello,
Thanks for your reply.
I 've already write a seperate class that includes the JNI call but I've got jspwrapper error.
Could you please suggest me?

Similar Messages

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use EJB in JSP...urgent!!!

    hello,
    i am novice programmer in EJB.
    i am using weblogic 6.1 ...
    my problem is how to use EJB in jsp page.
    my code is as follow..but its not displaying any result.
    <%@ page import="javax.naming.InitialContext,
    javax.naming.Context,
    java.util.Properties,
    firstEJB.First,
    firstEJB.FirstHome"%>
    <%
         long t1 = System.currentTimeMillis();
         System.out.println(t1);
         Properties props = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
         props.put(Context.PROVIDER_URL, "localhost:7001");
         Context ctx = new InitialContext(props);
         FirstHome home = (FirstHome)ctx.lookup("FirstEJB");
         First bean = home.create();
         String time = bean.getTime();
         bean.remove();
         ctx.close();
         long t2 = System.currentTimeMillis();
    %>
    <html>
         <head>
              <style>p { font-family:Verdana;font-size:12px; }</style>
         </head>
         <body>
              <p>Message received from bean = "<%= time %>".<br>Time taken :
              <%= (t2 - t1) %> ms.</p>
         </body>
    </html>
    please tell me the solution.

    Hi, I don't know if it may be the cuase of your problems, but you should narrow the Object obtained doing the lookup, like this:
    FirstHome home = (FirstHome) PortableRemoteObject.narrow(ctx.lookup("FirstEJB"), FirstHome.class);

  • How to use taglibs in JSP for Database access

    Hi
    Could any one please tell me how to use taglibs in JSP for Database access
    with regrds
    Jojo

    This is a sample how to connect to a MySQL database with JSTL 1.0:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>JSTL MySQL</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <c:catch var="e">
    <sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
                           user="Your_Username_Here" password="Your_Password_Here"
                           driver="com.mysql.jdbc.Driver"/>
    <c:out value="datasource= ${datasource},  Class = ${driver.class}"/>
    <br />
    <br />
    <sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
    <table>
    <%-- Get the column names for the header of the table --%>
    <c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
    <tbody>
    <%-- Get the value of each column while iterating over rows --%>
    <c:forEach var="row" items="${deejays.rows}">
      <tr><c:forEach var="column" items="${row}">
            <td><c:out value="${column.value}"/></td>
          </c:forEach>
      </tr>
    </c:forEach>
    </tbody>
    </table>
    </c:catch>
    <br />
    <br />
    <c:if test="${e!=null}"><span class="error">Error</span>�
      <c:out value="${e}" />
    </c:if>
    </body>
    </html>And this thread might help you:
    http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44

  • How to use JOptionPane in jsp, instead of javascript message alert box?

    HI,
    How to use JOptionPane in jsp,
    instead of javascript "message alert box"?
    I hate javascript,
    I'd like to only use java in jsp. don't use javascript.
    javascript is client side,
    jsp is server side. i know that.
    how to... instead of javascript box?
    how to use ... message box in webpage?
    don't use applet,,,, don't use javascript,,,
    hm...zzzZzz
    I hate javascript..T.T
    <SCRIPT language=JavaScript>
    alert("hate javascript");
    </SCRIPT>
    ===>>>>
    In this way,,
    JOptionPane.showOptionDialog(null,"I love java")
    I'd like to only use jsp and java and html...in webpage.
    don't use javascript....
    Why? don't sun provide message box in jsp, instead of javascrip box?
    Why?
    Edited by: seong-ki on Nov 4, 2007 8:38 PM

    Drugs are bad, m'kay?

  • How to use cookies in jsp

    Hi all,
    I'm new to jsp, please let me know how to use cookies with jsp.
    I have three web applications, in run time I have to switch from one application to another application based on single login page. I have taught cookies are one of the solution. But while I'm googling I unable to get such a good material.
    please give some examples,
    Thanks in advance.
    achchayya

    Read a cookie in jsp
    HttpSession session = request.getSession();
    Cookie cookie_session = getCookie(request, "COOKIENAME");
              if (cookie_session == null) {
                   sesID = session.getId();
              } else {
                   sesID = cookie_session.getValue();
              }or
    get all cookie in the browser
    This gets all the cookies and according to the cookie name given u can get the cookie value
    Cookie[] cookies = request.getCookies();
              if (cookies != null) {
                   for (int i = 0; i < cookies.length; i++) {
                        if (cookies.getName().equals(cookieName))
                             return cookies[i];
                   }but i am not sure if this works for ur requirement try and see                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to use threads in JSP???

    hello
    i want to use threads with JSP.
    i want to write a jsp page which will
    start 2 different threads. the 1st thread should just display a message and the second page should redirect this page to another jsp page.
    till the redirection is goin on, the message should be displayed in the browser from the 1st thread.
    i dont know actually how to use threads in JSP by implementing the Runnable insterface, if not m then how do i do it ??
    thanx
    Kamal Jai

    Why do you want to use threads to do this ??
    If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
    I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows.

  • How to use datagrid in jsp ?

    Hi All ,
    Can any body let me know , how to use datagrid in jsp pages .I have downloaded the taglibs-datagrid.jar file and taglibs-datagrid.tld. I have saved the .jar File in the WEB-INF/lib and .tld to the WEB-INF directories.
    I wrote a program that is getting a collection from the request and i just want to display the objects in the datagrid.Please help me out of this problem.It's better to explain with example. Waiting for a response.
    Regards,
    Rakesh

    Why do you want to use threads to do this ??
    If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
    I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows.

  • Using JNI in JSP

    Hi
    i am going to develop a DI COM viewer in web.
    so that it uses lot of shared libraries (.dll).
    i tried JNI with servlet it works fine.
    but when i try to load a same DLL for another page it gives an error saying
    ".dll loaded in another class loader"
    So that i tried to write JNI wrapper as a component using java beans.
    and i can use as multiple instances.
    package BeanDir;
    import java.util.*;
    //This file must be compiled Manually using javac
    //cd D:\tomcat\webapps\examples\WEB-INF\classes\BeanDir\mysimplebean.java
    public class mysimplebean
         static
              System.loadLibrary("HelloWorld");
         public String getceoname()
              String ceonameval = "Tom Hanks CEO of Tom Hanks INC";          
              return ceonameval;
         public String ceoemail()
              String ceoemailval = "[email protected]";          
              return ceoemailval;
         public double findtakehome(int salary,String designation)
              double takehomeamt;
              if(designation=="Developer")
                   takehomeamt = salary+salary*0.15; //15 % Raise in Salary
              else
                   takehomeamt = salary+salary*0.10; //10 % Raise in Salary
              return takehomeamt;
         public native String sayHello();      
    }Then i added the Java bean in JSP:
    <%@ page import = "BeanDir.mysimplebean" %>
    <jsp:useBean
         id="mybeanid"
         class="BeanDir.mysimplebean"
         scope="session"/>
    <jsp:setProperty
         name="mybeanid"
         property="*"/>
    <html>
    <head><title>JSP - Java Bean Demo </title></head>
    <body bgcolor="white">
    <font size=2 face=verdana>
    <center><strong>Simple JSP with JAVA Beans Demo Application Form</strong> <br>
    <%
    //Auto Compiled by JSP Engine dont use Javac
    //No Parameters Passed into Bean
    //cd E:/tomcat/webapps/examples/jsp/testdir/testme2.jsp
    String ceoname_ret;
    ceoname_ret=mybeanid.getceoname();          
    out.println("<br>CEO Name : "+ceoname_ret);
    //No Parameters Passed into Bean
    String ceoemail_ret;
    String s;
    ceoemail_ret=mybeanid.ceoemail();
    out.println("<br>CEO Email : "+ceoemail_ret);
    out.println("<br><br>");
    out.println("<table border=1 bordercolor='maroon' cellspacing=4 cellpadding=4 align=center>");
    out.println("<tr align=center valign=middle>");
    out.println("<td bgcolor=maroon><font face='verdana' size=2 color=white> Calling From JSP </font></td>");
    out.println("<td bgcolor=maroon><font face='verdana' size=2 color=white> BEAN BEANING CALLED </font></td></tr>");
    double takehomeamt_ret;     
    double totalcost=0;
    takehomeamt_ret = mybeanid.findtakehome(5000,"Developer") ;     
    totalcost=totalcost+takehomeamt_ret;
    out.println("<tr align=center valign=middle><td><font face='verdana' size=2>Take Home : James Smith  </font></td>");
    out.println("<td><font face='verdana' size=2>"+takehomeamt_ret+"</font></td></tr>");
    takehomeamt_ret = mybeanid.findtakehome(5000,"Designer") ;     
    totalcost=totalcost+takehomeamt_ret;
    out.println("<tr align=center valign=middle><td><font face='verdana' size=2>Take Home :  Andrew  </font></td>");
    out.println("<td> <font face='verdana' size=2>"+takehomeamt_ret+"</font></td></tr>");
    takehomeamt_ret = mybeanid.findtakehome(7000,"Developer") ;     
    totalcost=totalcost+takehomeamt_ret;
    out.println("<tr align=center valign=middle><td><font face='verdana' size=2>Take Home : Peter O Neal  </font></td>");
    out.println("<td> <font face='verdana' size=2>"+takehomeamt_ret+"</font></td></tr>");
    out.println("<tr align=center valign=middle><td><font face='verdana' size=2><strong>TOTAL COST FOR COMPANY </strong>  </font></td>");
    out.println("<td> <font face='verdana' size=2>"+totalcost+"</font></td></tr>");
    out.println("</table>");
    out.print("My dll should be somewhere here: "+System.getProperty("java.library.path"));
    s = mybeanid.sayHello();
    out.println("<br>Output from JNI"+s);
    %>  </center>
    </font>
    </body>
    </html>Error which i am getting is :
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.UnsatisfiedLinkError: BeanDir.mysimplebean.sayHello()Ljava/lang/String;
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    javax.servlet.ServletException: java.lang.UnsatisfiedLinkError: BeanDir.mysimplebean.sayHello()Ljava/lang/String;
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.jsp.callbean_jsp._jspService(callbean_jsp.java:121)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.UnsatisfiedLinkError: BeanDir.mysimplebean.sayHello()Ljava/lang/String;
         BeanDir.mysimplebean.sayHello(Native Method)
         org.apache.jsp.jsp.callbean_jsp._jspService(callbean_jsp.java:109)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
    Apache Tomcat/6.0.20

    Hi friends,
    i got the solution for using JNI in JSP.
    But not with Javabean
    I created a class that loads the library and define the native method.
    import the above said class package in your JSP program
    create the object for the class
    access the native method with that object.
    copy your .dll file in system32 folder
    if you have declared package in java program change the method according to that
    other wise you will get unsatisfied link error
    for ex
    package sam.jni;
    import java.io.*;
    public class Helloworld
    static
    static.loadlibrary("HelloWorld");
    public native String sayHello();
    }Method name in your c++ program looks like
    JNIEXPORT jstring JNICALL Java_sam_jni_HelloWorld_sayHello
      (JNIEnv *env, jobject obj) {
        return  env->NewStringUTF("krishnakumar");

  • How to Use JNI for linux based C programs

    Hi all,
    I am doing my project in JAVA for my Institute. There is a Central server. All the API's have written in C. The C APIs are Linux based.
    The problem is getting records from the database through API.
    I tried the Java Native Methods. I am able to do that in console with out problem. Since my project is web based I want to fetch the records through the C APIs in JSP. Is it possible? How to do that?
    Please Help me.
    -Prathap

    Why can't you use JDBC?
    I tried the Java Native Methods. I am able to do that in console with out problem. Since my project is web based I want to fetch the records through the C APIs in JSP. Is it possible? How to do that?JSP runs in a server. Which is just a big console application. Same as any other.
    Basic process.
    1. Write the JNI
    2. Insure the JNI is in the servers shared library path. This can depend on the user that the server runs under (unlikely to be you.)
    3. Add the java code into the server.

  • How to use chart in jsp by using  MS Acess Db

    hii
    My application is to generate the report using the chart with the help of MS Acess
    i heard abt the JFreeChart . I downloaded it but i dont know how to link and use it in my application
    plz help me.....
    Thank u in advance

    I downloaded it but i dont know how to link and use it in my application I'm sure they provide some examples how to use it.
    Look at them and try to understand how a JFreeChart is used.
    When you have a concrete question about JSPs an JSTL you may come back and ask again.
    If you have questions about JFreeChart ask them in the JFreeChart Forum.
    andi

  • How to use DLL in JSP?

              Hello, all,
              I wrote a program to check the user authentication by call Windows's cryptography
              functions. I have generated a DLL file,
              and have put it in the C:\bea\jdk131_03\jre\bin. But my jsp
              page seems ignoring the java code to call the function in the
              DLL. I am not sure what should be imported at the head of the
              jsp file. Would somebody kindly help me out? Thanks a lot!!!
              My jsp code is here:
              <%@ page import="java.sql.Connection"%>
              <html>
              <head>
              <title>
              Jsp1
              </title>
              </head>
              <body>
              <h1>
              JBuilder Generated JSP
              </h1>
              <%
              try{
              if(Ntauth.authenticate("gecorg", "almond", "1025"))
              out.println("Valid user credenticals");
              else
              out.println("Invalid user credenticals");
              }catch(Exception e)
              out.println(e);
              %>
              </body>
              </html>
              

              One of my friend helped me to generate a new dll,
              just changed the package name. Then it works. I don't
              know why. But anyway, it works. Thanks everybody for
              your attention.
              "Sylvie" <[email protected]> wrote:
              >
              >Sorry, I found the function names are not match in my previou
              >post. The name is too long. I missed to type "authenticateNTUser" as
              >"authenticateUser"
              >in the SimpleNTAuthentication.java. I have fixed it. I repost them in
              >the following.
              >So the function name in the .h also corrected. But I still get the same
              >error.
              >
              >Do you know what's wrong?
              >
              >
              >"Sylvie" <[email protected]> wrote:
              >>
              >>Hi, Ann,
              >>
              >>Thanks for replying! But I have checked the function names.
              >>They looks the same. I post the code here, would please have
              >>a look.
              >>
              >>Thanks a lot,
              >>Sylvie
              >>---------------------------------------------------------
              >>SimpleNTAuthentication.java
              >>
              >>package Infolenz.Authentication;
              >>
              >>public class SimpleNTAuthentication {
              >>
              >> static {
              >> System.loadLibrary("ntauth");
              >> }
              >>
              >>
              >> private static native boolean authenticateNTUser(
              >> String domainName, // string that specifies the domain
              >> String userId, // string that specifies the user name
              >> String password // string that specifies the password
              >> );
              >> public static boolean authenticate(String domainName, String userId,
              >>String
              >>password)
              >> {
              >>
              >> if (domainName == null || userId == null || password == null)
              >> return false;
              >> else
              >> return authenticateNTUser(domainName, userId, password);
              >>
              >> }
              >>
              >>
              >>}
              >>---------------------------------------------------------
              >>javah generated Infolenz_Authentication_SimpleNTAuthentication.h
              >
              >/* DO NOT EDIT THIS FILE - it is machine generated */
              >#include <jni.h>
              >/* Header for class Infolenz_Authentication_SimpleNTAuthentication */
              >
              >#ifndef IncludedInfolenz_Authentication_SimpleNTAuthentication
              >#define IncludedInfolenz_Authentication_SimpleNTAuthentication
              >#ifdef __cplusplus
              >extern "C" {
              >#endif
              >/*
              > * Class: Infolenz_Authentication_SimpleNTAuthentication
              > * Method: authenticateNTUser
              > * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
              > */
              >JNIEXPORT jboolean JNICALL Java_Infolenz_Authentication_SimpleNTAuthentication_authenticateNTUser
              > (JNIEnv *, jclass, jstring, jstring, jstring);
              >
              >#ifdef __cplusplus
              >}
              >#endif
              >#endif
              >
              >>----------------------------------------------------------------
              >>ntauth.cpp
              >>
              >>#include "Infolenz_Authentication_SimpleNTAuthentication.h" // native
              >>library
              >>included
              >>#include "stdio.h" // standard input and output
              >>#include "afxwin.h" // MFC core and standard components
              >>#include "jni.h"
              >>
              >>JNIEXPORT jboolean JNICALL
              >> Java_Infolenz_Authentication_SimpleNTAuthentication_authenticateNTUser
              >> (JNIEnv *env,
              >> jclass javaClass,
              >> jstring jDomainName,
              >> jstring jUserId,
              >> jstring jPassword )
              >>{
              >> jboolean authenticated;
              >> HANDLE hToken;
              >>
              >>
              >> // get the provided domain name, user id and password
              >> const char *cDomainName = env->GetStringUTFChars(jDomainName, 0);
              >> const char *cUserId = env->GetStringUTFChars(jUserId, 0);
              >> const char *cPassword = env->GetStringUTFChars(jPassword, 0);
              >>
              >>
              >> // Copy the char array to temporary variables to be
              >> // passed to LogonUser. This copy is done to guarantee the
              >> // const nature of the jstring char array.
              >> // Inappropriate access to this data can crash the VM!
              >> char *domainName = new char[env->GetStringUTFLength(jDomainName)
              >+
              >>1];
              >> char *userId = new char[env->GetStringUTFLength(jUserId) + 1];
              >> char *password = new char[env->GetStringUTFLength(jPassword) + 1];
              >>
              >> strcpy(domainName, cDomainName);
              >> strcpy(userId, cUserId);
              >> strcpy(password, cPassword);
              >>
              >> // release the chars back to the VM
              >> env->ReleaseStringUTFChars(jDomainName, cDomainName);
              >> env->ReleaseStringUTFChars(jUserId, cUserId);
              >> env->ReleaseStringUTFChars(jPassword, cPassword);
              >>
              >> // try to authenticate
              >> if (LogonUser( userId,
              >> domainName,
              >> password,
              >> LOGON32_LOGON_NETWORK,
              >> LOGON32_PROVIDER_DEFAULT,
              >> &hToken))
              >>
              >> authenticated = JNI_TRUE;
              >> else
              >> authenticated = JNI_FALSE;
              >>
              >> // delete the memory that was allocated
              >> delete domainName;
              >> delete userId;
              >> delete password;
              >>
              >> // close the handle created by LogonUser
              >> CloseHandle(hToken);
              >>
              >> return authenticated;
              >>}
              >>
              >>-------------------------------------------------------------
              >>
              >>Ann Cao <[email protected]> wrote:
              >>>Are you using JNI? There are two problems that could cause Unsatisfied
              >>>link errors. One is the DLL not found, and the other is that the DLL
              >>>is
              >>>found but is unreadable or the specific function cannot be found in
              >>it.
              >>>Since you have set your path correctly, I guess the reason you got
              >the
              >>>error is the second cause.
              >>>
              >>>Sylvie wrote:
              >>>
              >>>> I wrote a test java program to call the authenticate function.
              >>>> but get a Unsatisfied Link Error. It seems that my program
              >>>> has problem to load the DLL. But I have set the path to include
              >>>> the directory containing the DLL. Dose somebody know what is going
              >>>on?
              >>>>
              >>>> Thanks,
              >>>> Sylvie
              >>>>
              >>>> "Sylvie" <[email protected]> wrote:
              >>>> >
              >>>> >Hello, all,
              >>>> >
              >>>> >I wrote a program to check the user authentication by call Windows's
              >>>> >cryptography
              >>>> >functions. I have generated a DLL file,
              >>>> >and have put it in the C:\bea\jdk131_03\jre\bin. But my jsp
              >>>> >page seems ignoring the java code to call the function in the
              >>>> >DLL. I am not sure what should be imported at the head of the
              >>>> >jsp file. Would somebody kindly help me out? Thanks a lot!!!
              >>>> >My jsp code is here:
              >>>> >
              >>>> ><%@ page import="java.sql.Connection"%>
              >>>> >
              >>>> ><html>
              >>>> ><head>
              >>>> ><title>
              >>>> >Jsp1
              >>>> ></title>
              >>>> ></head>
              >>>> >
              >>>> ><body>
              >>>> ><h1>
              >>>> >JBuilder Generated JSP
              >>>> ></h1>
              >>>> ><%
              >>>> > try{
              >>>> > if(Ntauth.authenticate("gecorg", "almond", "1025"))
              >>>> > out.println("Valid user credenticals");
              >>>> > else
              >>>> > out.println("Invalid user credenticals");
              >>>> > }catch(Exception e)
              >>>> > {
              >>>> > out.println(e);
              >>>> > }
              >>>> > %>
              >>>> >
              >>>> >
              >>>> ></body>
              >>>> ></html>
              >>>> >
              >>>
              >>>--
              >>>Regards,
              >>>Ann
              >>>Developer Relations Engineer
              >>>BEA Support
              >>>
              >>>
              >>
              >
              

  • How to use jni with ervlets

    Hi
    i was trying to do some example with JNI. I can use JNI with standalone Java application but I just cannot figure out how I can use JNI with Servlet.
    Can some one show me a sample code using JNI with Servlets.
    thanks very much

    JNI is done in servlets that same way as other java.
    I suspect your problem is in the environment and perhaps how servlets work. It doesn't have anything to do with JNI itself.

  • How to use JNI with Servlets

    Hi
    i was trying to do some example with JNI. I can use JNI with standalone Java application but I just cannot figure out how I can use JNI with Servlet.
    Can some one show me a sample code using JNI with Servlets.
    thanks very much

    hi,
    I am also facing the same problem,
    when I am using JNI with stand alone application it works fine but when i tried to use it with a servlet It gives unsatisfied linker error
    stack: java.lang.UnsatisfiedLinkError: createSocket
         at RelayConnector.createSocket(Native Method)
         at RelayServlet.doGet(RelayServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
         at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
    It seems i have to do some path settings in my iplenet web server.
    If some one have faced the problem i would be glad to know the solution for this, i am literally bugged up,....

  • How to use JNI in an Applet?

    Can a native method can be invoken in an Applet?If it can,which knowledge of Java should be used and how to use it?

    You could I suppose if yo sign the applet (which, if the user accepts it, will allow it to use features otherwise not available to an applet because of the secure sandbox). However, I am not sure how you would deploy the necessary native library since it must be available to the native OS loader (ie, a file on the client machine). If you are deploying the applets (see WebStart perhaps) you could do it.
    But generally it is a poor idea to try to use JNI in an Applet, and this is probably something that you would not want to use outside of an intranet environment.
    Chuck

Maybe you are looking for

  • Creating a caption of a button on a toolbar

    Dear all, I was wondering if it is possible to create like a small caption on a button (which has an image icon) on a toolbar. Basically when the user places the mouse on the button, a small message appears explaining briefly what the button does. Ha

  • What kind of technology does the internal microphone use?

    Does the internal mic use USB, Bluetooth, or analog technology. (Rosetta Stone voice recorder/analyzer is crashing app)

  • Error in Formular with AND

    Hello All I have s simple Formula, which should split up values according to percenatges. This should only be done, if both fields are not zero. It seems to me, there is a problem with AND, as the routine works fine, if for example the percentages ar

  • Solman to compare profile params

    hi all.. can any one help me in guiding to use solman to compare the profiles in satellite systems? I found a presentation in the ASUG website mentioning that solman can be used to compare instance profiles/parameters in the satellite systems. Have a

  • An unwanted JPG image of handwashing came into my address bar?

    I had not been looking for anything to do with health or handwashing. It was as if I had asked a question about preventing the flu??. I had just finished reapplying for California lifeline service on my telephone and had done it online. I then went b