Call a function in jsp

in html we can call a user define function at any event and include the function within <script> </script>.
eg:
<script language="javascript">
<!--
function GetData() {
// do something
-->
</script>
<input type="submit" text="submit" onclick="GetData()">
but how are we going to call the function GetData() in jsp ..... are we using this tag <% %> ?? how does the syntax like ??
Please assist... thanks

Hi
<html>
<head>
<script language="JavaScript">
<!--
function isValidDate(frm) {
     if(frm.T1.value.length == 0) {
alert("please enter the date");
frm.T1.focus();
else {
if(isBlank(frm.T1.value)) {
alert("Please enter the date");
frm.T1.focus();
frm.submit();
} // closing the function isValidDate()
function isBlank(txt) {
     if( txt.length == getCountOf(' ', txt) ) {
     return true;
     else {
     return false;
} // closing the function isBlank
//-->
</script>
</head>
<body>
<form name="test">
date <input type="text" name="T1" size="22">
<p>
<input type="button" value="Submit" name="B1" onClick="javascript:isValidDate(this.form);">
<input type="reset" value="Reset" name="B2">
</form>
</body>
</html>
this helps in validating your form
cheers
rambee

Similar Messages

  • Calling Javascript function in JSP

    Please help anybody
    I have a link, when I click on the link it should call
    the javascript function. But it doesn't work.
    I am passing a value to the function openIt(id).
    coding is as :
    <html>
    <script>
    function openIt(id)
    alert("hello");
    </script>
    <body>
    <%
    String mylink="<a href='javascript:openIt('<%=bean.getId()%>')'>
    click here</a>";
    // bean.getId() is the id which I am retrieving
    //from bean through servlet, using Model View Controler (MVC)
    %>
    <%=mylink%>
    </body>
    </html>
    And if I do not pass the link to String mylink and do
    the coding is as: it works fine :
    <html>
    <body>
    <a href="javascript:openIt('<%=bean.getId()%>')">click here</a>
    </body>
    </html>
    amitindia
    Thanks in advance

    I did something like this for that:
    (depending on how you are passing your information through - what type of bean):
    <%
    DynaBean s = (DynaBean)pageContext.getAttribute("event");
    String eidString = "/eventDetails.do?e_id=";
    String vidString = "/venueDetails.do?v_id=";
    try {
    eidString += s.get("e_id").toString();
    vidString += s.get("v_id").toString();
    } catch (Exception e) {;}
    %>
    <a class="eventTitle"
    href="#" onClick="openDescription('<html:rewrite page="<%= eidString %>" />'); return false;">
    <bean:write name="event" property="eventname"/>
    </a>
    Hope this helps some (is this what you are asking?)

  • How to call userdefined function in JSP

    Iam writing my own method in JSP ,how to call that method.
    thanks in advance
    thanks
    -RR-

    <%!
    static void sayHello(ServletOutputStream out){
    out.print("Hello");
    }%>
    <%
    sayHello(response.getOutputStream());%>
    You method can either be static or not, but in both case avoid instance/static variables as you will get concurrency issues
    if you use tomcat, take a look in tomcat/work/catalina/_localhost/org/apache/jsp
    open the .java file generated by the container and you will quickly understand how this works

  • Problem in calling applet function in jsp

    When i am trying to load Java applet through jsp, i get this error :
    Java Plug-in 1.6.0_02
    Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\pankajb
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class CAppletDisplay.class not found.
    java.lang.ClassNotFoundException: CAppletDisplay.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    <jsp:plugin type="applet" code="CAppletDisplay.class" codebase="." width="857" height="687" align="left">
            <jsp:params>
               <jsp:param name="machine" value="server" />
              <jsp:param name="port" value="1433" />
              <jsp:param name="Databasename" value="Timba" />
              <jsp:param name="userid" value="sa" />
              <jsp:param name="password" value="password"/>
               </jsp:params>
               <jsp:fallback>There is a problem with your browser ...</jsp:fallback>
         </jsp:plugin>

    load: class CAppletDisplay.class not found.
    java.lang.ClassNotFoundException: CAppletDisplay.classthat means that client jre didn't find the CAppletDisplay class.
    make sure that you put this class in the right directory.

  • How to call java script function from JSP ?

    how to call java script function from JSP ?

    i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks

  • How to call a function from Java to JSP

    Hello,
    I have a question about using tags.
    I have a java file,which has a function. Now I want to call this function into my JSP page.
    I'm using JSP 1.2 and TOMCAT 4.1 with Java2 SDK.
    I search through the web and find a method to do this.Bu it requires JSP 2.0
    But I try that in my machine(using JSP 1.2).It gives an error:
    Did you know what is the error? Or is there any method to call a function into my JSP page?
    Please, help me to solve this.
    Here are my codes(part of them)
    UserPassword.java file
    package data;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class UserPassword
         public static String verify(String username,String password){
              // some codes
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
            PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
         "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>1.0</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>simple</short-name>
      <uri>http://jakarta.apache.org/tomcat/HRM/WEB-INF/lib</uri>
      <description>
         A  tab library for the login
      </description>
    <function>
            <description>verify username and password</description>
            <name>verify</name>
            <function-class>data.UserPassword</function-class>
            <function-signature>String verify(java.lang.String,java.lang.String)
            </function-signature>
    </function>
    </taglib>I put this file into the webapps/HRM/WEB-INF/lib folder
    Here is my JSP file.
    <%@ page language="java" %>
    <%@ page import="data.UserPassword" %>
    <%@ page session="true" %>
    <%@ taglib prefix="login" uri="/WEB-INF/lib/LoginVerify.tld" %>
    <jsp:useBean id="useraccount" class="data.UserPassword"/>
    <jsp:setProperty name="useraccount" property="*"/>
    <%
    String status = UserPassword.verify(String username,String password);
    String nextPage = "MainForm.jsp";
    if(status.equals("InvalidU")) nextPage ="InvalidUserName.jsp";
    if(status.equals("InvalidP")) nextPage ="InvalidPassword.jsp";
    if(status.equals("main")) nextPage ="MainForm.jsp";
    %>
    <jsp:forward page="<%=nextPage%>"/>
    Here is the error:
    org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/lib/LoginVerify.tld: (line 18, col -1): Element "taglib" does not allow "function" here.
         at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:189)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:247)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:183)
         at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
         at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)Please, help me to solve this trouble.
    Thanks.

    Yes. As serlank showed, you can just call the function easily in scriptlet tags
    However the whole point of a tag library is to avoid the use of scriptlets.
    Seeing as you can't use functions, is just to do it as a standard tag.
    ie in your jsp
    <login:verify name="<%= userName %>" password = "<%= password %>" resultVar = "status"/>
    <c:choose>
      <c:when test="${status == 'InvalidU'}">
        <c:set var="nextPage" value="InvalidUserName.jsp"/>
      </c:when>
      <c:when test="${status == 'InvalidP'}">
        <c:set var="nextPage" value="InvalidPassword.jsp"/>
      </c:when>
    </c:choose>In your case, this tag in the tld would possibly look something like this.
    You would then have to write a tag handler class that would call the function you want.
    <tag>
      <name>verify</name>
      <tagclass>com.tags.login.Verify</tagclass>
      <teiclass>com.tags.login.VerifyTEI</teiclass>  (if required)
      <bodycontent>JSP</bodycontent>
    // name attribute 
    <attribute>
          <name>name</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
        </attribute>
    // password attribute
        <attribute>
          <name>password</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
        </attribute>
    // result variable to return a response from the tag.
      <variable>
        <name-from-attribute >resultVar</name-from-attribute >
        <variable-class>java.lang.String</variable-class>
        <declare>true</declare>
        <scope>AT_END</scope>
      </variable>
    </tag>Hope this helps some, and doesn't confuse too much :-)
    Cheers,
    evnafets

  • Not Able To Call JavaScript Function in my JSP file

    Here is my code of jsp, its a form , now when i click on the submit button having value "check all", it doesnot call the function
    "CheckAll( )" which will just popup the alert box, when i click on the "check all" button but it gives following error
    object expected,line no 66
    can somebody help me
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.util.*"%>
    <%@ page import="dao.dbconnect" %>
    <% response.setHeader("Pragma","no-cache");%>
    <% response.setHeader("Cache-Control","no-store");%>
    <% response.setDateHeader("Expires",-1);%>
    <html>
    <head>
    <script type="text/javascript" src="calendarDateInput.js">
    function CheckAll()
         alert("hi");
    </script>
    </head>
    <body >
    <form name="inserttransaction" action="InsertTransaction" method="get">
    <TABLE border="0" cellpadding="2" cellspacing="2" align="center">
    <thead>
    <tr bgcolor='999999'>
                             <FONT SIZE="10" COLOR="white">
    <th width="20%">    </th>
    <th width="20%">    </th>
    <th width="25%">    </th>
    <th width="35%">    </th>
    </tr>
    </thead></FONT>
    <tbody>
    <TR bgcolor='CCCCCC'>
         <TD>Amount: </TD>
         <TD><input type="text" name="amount" value="" size="5" maxlength="5" ONKEYPRESS="if ((event.keyCode < 48) ||
    (event.keyCode > 57)) event.returnValue = false;"/></TD>
         <TD>Date Of Expenditure</TD>
         <TD><script >DateInput('orderdate', true, 'DD-MON-YYYY')</script></TD>
    </TR>
    <TR bgcolor='ffff'></TR>
    <TR bgcolor='CCCCCC'>
         <TD>Type Of Expenditure:</TD>
         <TD><select name="expendituretype" onBlur=ONKEYPRESS="if ((event.keyCode < 48) ||
    (event.keyCode > 57)) event.returnValue = false;">
    <option value="" selected>Select</option>
    <option>Grossary</option>
    <option>Entertainment</option>
    <option>Travelling</option>
    <option>Electric Bill</option>
    <option>RoomRent</option>
    <option>Hotel</option>
    <option>Picknik</option>
    <option>Other</option>
    </select></TD>
         <TD>Expenditure Detail:</TD>
         <TD><input type="text" name="expendituredetail" value="" size="36" /></TD>
    </TR>
    <TR bgcolor='ffff'></TR>
    <TR bgcolor='CCCCCC'>
         <TD>Paid By:</TD>
         <TD><select name="paidby">
                                  <option value="" selected>Select</option>
                                  <%
                                       session = request.getSession(true);
         this is line 66 ==========>                              Vector units=(Vector)session.getAttribute("vectobj");_
                                       out.print(units);
                                       for(int i = 0, size = units.size(); i < size; i++)
                                            out.print ("<option value=" + (String)units.get(i) + ">");
                                            out.print(units.get(i));
                                            out.print("</option>");
                                  //     out.print ("</select>");
                                  %>
                                  </select></TD>
         <TD>Add Beneficiary:</TD>
              <TD>
              <input name="btn" type="button" onclick="CheckAll()" value="Check All"> 
         <%
                                                 session = request.getSession(false);
                                                 Vector v=(Vector)session.getAttribute("vectobj");
                                                 int k=v.size();
                                                 for (int i=0; i<k; i++)
                                                                out.print("<INPUT TYPE=\"checkbox\" NAME=\"abc\" VALUE="+v.get(i).toString()+">" + v.get(i).toString() + " ");
                                            %>     
                                            </TD>
    </TR>
    </tbody>
    </TABLE><BR><BR><BR>
    <CENTER><INPUT TYPE="submit" value="Submit Transaction Data"></CENTER>
    </form>
    </body>
    </html>

    If I were you, I would post only the problematic code.. in the code tags !!
    Your obvious problem is you arent using your script tags properly. Understand this for yourself.This is your working code :
    <html>
    <head>
    <script>
    function CheckAll(){
    alert("hi");
    </script>
    </head>
    <body >
    <input name="btn" type="button" onclick="CheckAll()" value="Check All">
    </body>
    </html> HTH

  • Jsp calling a function in js -- object expected runtime error

    Hi,
    I have a js file. script.js
    *function popup( url ) {*
    newWin=window.open(url,'popupWindow,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes');
    newWin.focus();
    void(0);
    and a jsp calling the function in js
    *<HTML>*
    *<HEAD>*
    *<SCRIPT>*
    *<jsp:include page="script.js"/>*
    *</SCRIPT>*
    *</HEAD>*
    *<BODY onLoad="javascript:popup('http;//www.google.com');">*
    *</BODY>*
    *</HTML>*
    Now when i execute the jsp, it gives runtime error -> object expected..
    Not able to figure out why this occurs.. am I doing it the right way ?

    Do you think is this the right way to include .js file...
    <SCRIPT>
    <jsp:include page="script.js"/>
    </SCRIPT>I generally do this way...
    <head>
    <script language="javascript" src = "script.js">
    </script>
    </head>

  • Calling a Function in a AbstractPortalComponent Class from a JSP

    Hello,
    i got a class witch extends AbstractPortalComponent. In this class I call in the function doContent this
    response.include(request, request.getResource(IResource.JSP, "pagelet/TestComponent.jsp"));
    now i want to define another function in this class.
    This function should be called from the JSP. For Example when a Button is pressed. I know I can do this with a JSPDynPage but i need it this way.
    How can i realise this?
    Thanks for your replies.
    Greetings
    Christoph

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • How to call stored function in my jsp

    how to call stored function in my jsp?
    please give me a example.

    Hi,
    think we need mor einformation, like JDeveloper release and the how you do access the database (JDBC, BC4J, EJB,ADF...)
    Frank

  • Call a pl/sql function froma jsp

    I need to call an pl/sql function which basically returns true or false depending on the count. based on the return value I have to alert a message. how can i call the pl/sql fucntion in a jsp?
    thanks for ur help.

    You call the function the same way you would from anywhere, although i don't recommend you call database functions directly from a JSP page as it's bad form.

  • How do i call a function within the jsp?

    Hi,
    What i am doing is now allow a user to type in comment and when the user click on "Add" button, it will call my function and write to a txt file.How can i call a custom jsp function within my jsp page or what is the correct way to do this?
    [My current codes]
    <form name="SubmitEvent" method="post" action="addComment()">
    </form>
    function addComment()
    System.out.println("Entered Add Comment function");
    Thanks for your help!

    You can define a Java Bean (I presume you know the rules to write a Java Bean) and send the read value as parameter to the Bean and then call a function in the Bean from the JSP.
    Contact me if you need more help!

  • Call JavaScript function when my Condition is true in JSP

    Hi all,
    in my jsp i wanna call a javascript function (user defined) when a particular condition si met. How to go about it ? Can anyone plz help me out. Help appreciated.

    hi
    yes! we can do it as follows:
    in the JSP code u can include the javascript function
    first u declare the Javascript function before the </head> tag in the HTML
    and in the JSP u can just call the function which is as follow:
    <script>call the JavaScript function()</script>
    for example:
    <html>
    <head>
    <script language="JavaScript">
    function sayhi() {
    alert("hi");
    </script>
    </head>
    <body>
    <%
    zStr = request.getParameter("str");
    if(zStr.equals("true")) {
    %>
    <script>sayhi();</script>
    <%
    else {
    %>
    </body>
    </html>

  • Call the function in postgresql to jsp

    again i'm a newbie of jsp.. i just wanna know how to call the function in postgresql to jsp.. how to code it?... thanks in advance

    <%@ page contentType="text/html;charset=windows-1252" import="java.sql.*"%>
    <%
    try
      Class.forName("org.postgresql.Driver").newInstance();
      Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:5432/TESTDB","postgres","");
      Statement stmt = con.createStatement();
      ResultSet rs = stmt.executeQuery("select catalog('catalog1') from catalog");
    %>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>untitled</title>
      </head>
      <body>
        <%
        while(rs.next()){
          out.println(rs.getString(1)+"<br>");
        %>
      </body>
    </html>
    <%
    }catch (Exception ex)
      ex.printStackTrace();
    %>
    CREATE or Replace FUNCTION catalog(varchar) RETURNS catalog
        AS $$ SELECT title FROM catalog WHERE catalogid = $1 $$
        LANGUAGE SQL;
    CREATE TABLE catalog
      catalogid varchar(25) NOT NULL,
      journal varchar(25),
      publisher varchar(25),
      edition varchar(25),
      title varchar(45),
      author varchar(25),
      CONSTRAINT catalog_pkey PRIMARY KEY (catalogid)
    WITH OIDS;

  • ERROR:When calling  a Function

    Hi all,
    i am trying to call a function from AM.and when i run the page i got this error. anbody please help me guys.
    its very urgent.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: SQL_PLSQL_ERROR. Tokens: ROUTINE = AppsConnectionManager.appsInitialize(int,int,int,int,Connection):-1,-1,-1,0,oracle.jdbc.driver.OracleConnection@f7a4ba; REASON = java.sql.SQLException: No more data to read from socket; ERRNO = 17410; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:988)
         at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:219)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
         at runregion.jspService(runregion.jsp:96)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: No more data to read from socket; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:980)
         at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:219)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
         at runregion.jspService(runregion.jsp:96)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
         at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
         at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:611)
         at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:576)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2809)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
         at oracle.apps.fnd.security.AppsConnectionManager.appsInitialize(AppsConnectionManager.java:472)
         at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:319)
         at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1773)
         at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2460)
         at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2398)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2257)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2072)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1976)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1993)
         at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1541)
         at oracle.apps.fnd.framework.CreateIcxSession.getConnection(CreateIcxSession.java:559)
         at oracle.apps.fnd.framework.CreateIcxSession.getIntValue(CreateIcxSession.java:346)
         at oracle.apps.fnd.framework.CreateIcxSession.getUserID(CreateIcxSession.java:323)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:148)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
         at runregion.jspService(runregion.jsp:96)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: No more data to read from socket; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:980)
         at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:219)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
         at runregion.jspService(runregion.jsp:96)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
         at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
         at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:611)
         at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:576)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2809)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
         at oracle.apps.fnd.security.AppsConnectionManager.appsInitialize(AppsConnectionManager.java:472)
         at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:319)
         at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1773)
         at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2460)
         at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2398)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2257)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2072)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1976)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1993)
         at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1541)
         at oracle.apps.fnd.framework.CreateIcxSession.getConnection(CreateIcxSession.java:559)
         at oracle.apps.fnd.framework.CreateIcxSession.getIntValue(CreateIcxSession.java:346)
         at oracle.apps.fnd.framework.CreateIcxSession.getUserID(CreateIcxSession.java:323)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:148)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
         at runregion.jspService(runregion.jsp:96)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    its very urgent.Oh no! Sorry I couldn't respond sooner - I do hope the patient who was undergoing his critical surgery that obviously was held up because you couldn't call your function has survived!
    Looks like the connection was dropped/terminated. What does your function do? You haven't really given any information whatsoever that would enable someone to help you (such as version, perhaps a code snippet, etc)
    John

Maybe you are looking for