Assigning java script array to java array..

hi,
can anyone tell me how to assign java script array to a java array which is bean.

var input = document.createElement("input");
input.setAttribute("type", "hidden");
input.setAttribute("name", "bla..bla");
input.setAttribute("value", "bla..bla");And in addition to that.. Google is still alive

Similar Messages

  • Problem- Accessing java script code in java

    i want to access java script variable in java code.
    Is it possible through any method or function?
    help me.

    Stick to your old thread.
    http://forum.java.sun.com/thread.jspa?threadID=777985

  • Using java script value in java code

    hi,
    i have function which i call onload of the jsp.
    <%
    HashMap data = new HashMap();
    data.put("empno",12);
    %>
    <script>
    function disp()
    var val = 'empno';
    alert("<%=(String)data.get("+val+")%>");
    </script>
    <body onload="disp()">
    <%
    %>
    if i pass java script value to the map is it correct way..
    Regards,

    Iteration 61442771662555522888383:
    JavaScript is CLIENT side
    Jsp is SERVER side
    Only way they can communicate is through requests

  • Calling a Java Script form a Java class

    Hi All,
    I am having a project requirement of calling a Javascript from a java program. Here it goes...
    I have an external web page which I can access using a hyperlink this page is "Export to PDF" page. In this page we have an "EXPORT" button which on click calls a "do_export" javascript function. On clicking the EXPORT button a PDF is generated.
    Now my problem is I do not have the access to the code, so what I can do is to some how open that webpage and then execute that javascript function form a Java program or a JSP file or even a shell script file.
    It will be a great help if anyone can assist me to do it, I have been working on this from last 7 day, but still no sucess :('.
    Thanks in advance,
    Utkarsh

    ukkus wrote:
    Yes I had view the source code from browser, and its calling Export function, but my question is how to call that javascript function after getting the page loaded by a JSP or java program.
    I had to automate this export process and the only thing I had is this external URL or web page.If it is just a plain javascript function that does not interact with the browser environment (window and such objects)
    you can just run it using [javax.script ^API^|http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html]

  • I want to set bean's set method from java script block is it possible

    the actual issue is iam not able to assign a script variable to java variable...
    is it possible

    Javascript:
    <script language="JavaScript">
    function setValue(value){
    document.form.hiddenField.value = value;
    document.form.submit();
    <script>
    html:
    <form name="hiddenForm">
    <input type="hidden" name="hiddenField"></input>
    </form>
    Java:
    Map parameterMap = context.getExternalContext.getRequestParameterMap();
    String value = parameterMap.get("hiddenField");
    Try something like this.

  • How to print a Pdf from Java script

    Hi,
    I need to print a pdf from java script. In java script i have url of pdf. Is there any way to print pdf from java script?
    I am able to print word doc by ActiveX. is there any activeX or something else which do the same thing for pdf?
    Any help heartily esteemed to me.
    Thanks
    Kamlesh Sharma

    you are cross postin .. your thread has been answered in the jsp jstl forums

  • Trying to access the java script files via jar file in WEB SERVER

    hi all,
    I am trying to access the java script files via jar file ,which is present in Apache webserver in order to minimise the number of hits to app server.some thing like cache ...
    in jsp the code goes like this...
         <script type="text/javascript"  archive="http://localhost:14000/dojo.jar!" src="dojo.jar/parser.js" " ></script>{code}
    But i am not able to access the js file which is put in jar file present in the  webserver.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    You can use DWR (Direct Web remoting) for that. It is easy AJAX for java. ou can directly call the java script function from java class and also java class from javaScripts..
    Regards,
    Hardik

  • How to populate a java script array from a bean.

    Hi all,
    I have a list "mdfProductNames" which is further comprising of two fields "subGroup" and "mdfProductName"
    The list is coming is a part of the form bean.(struts framework)
    Now i want to have the values of these two fields in two different java script arrays.
    i.e. Array x -> mdfProductName
    and Array y -> subGroup
    can someone give me any idea as to how to do this ?
    Thanks
    Edited by: Ramit on 17 Jul, 2008 9:53 AM

    hi,
    assuming u use jstl, u need to create javascript variable during html generation out of the values got from struts form bean. it could look like this:
    ------ .jsp file ----
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <script type="text/javascript">
    var X = [];
    var Y = [];
    <c:forEach items="${formBeanName.mdfProductNames}" var="grpProdName">
    X.push( '${grpProdName.mdfProductName}' );
    Y.push( '${grpProdName.subGroup}' );
    </c:forEach>
    // here u already have the two arrays filled up with data
    </script>
    ------- end of .jsp file
    "formBeanName" is a name of a formbean u use to store the list of your beans
    rafal baton zaczynski
    http://baton.pop.e-wro.pl - tips and codes
    http://www.belysio.com - free mobile localization soft

  • Passing array to java script

    How can i pass an array to a java script function??

    <html>
    <head>
    <script>
    <%
    String[] myArray = new String[2];
    myArray[0] = "hello";
    myArray[1] = "hello again";
    %>
    function showArray(){
    <%
    for(int i = 0; i < myArray.length; i++){
    %>
    alert("<%= myArray[i] %>");
    <%
    }//end for
    %>
    }//end showArray
    </script>
    <body onLoad="showArray()">
    </body>
    </html>

  • Error in a array populated using jsp in client-side in java-script

    hii ,
    I have this problem.
    I have populated an array with records in jsp.The array is being populated correctly ..i hav check it .
    Now I need to get back this array in client side in a java-script function.
    I need this bcoz i need to check whether the value entered in a particular field in the form is there in the table before the form is submitted...hence the need of array.
    Surprisingly in my java-script function i can get back the length of array,but as soon as i am writing something like arr[0] where arr is the name of array populated in server side using jsp,i am get scripting error.
    i.e a code like
    funtion partynamecheck()
    var n=<%arr[0]%>
    alert (n) ;
    is giving scripting error.i.e showing error in page at the bottom left -side of browser.
    but code like
    funtion partynamecheck()
    var n=<%arr.length%>
    alert (n) ;
    } is working fine.
    Please help ..all wrk stuck.
    Arnab

    Hi,
    i cann't help you with javascript, but the jsp-expression must have this syntax
    var n=<%=arr[0]%>
    Hope this help!
    Roland

  • Assigning a jstl variable to java Script variable

    Hai All,
    I created one jsp page with java script with JSTL.
    I retrive arrayList from simple java bean in jsp page with help of JSTL .
    Now i want assign the ArrayList value through JSTL to Java Script Array.
    How to convert JSTL to Java Script.
    Please give me details asp.
    thanks ,
    Bala

    You can do this:
    <% request.setAttribute("x", "hello"); %>
    <c:out value="${x}"/>or if you want to go from JSTL to scriplet you can:
    <c:set var="testvar" value="hello" scope="request"/>
    <%= request.getAttribute("testvar") %>Both of these will output "hello"
    <c:set> defaults to the page scope, so you could substitute pageContext for request and get the same results (remove scope="request" first though).
    Karl

  • Struts 2: Doesn't populate an array of java beans in action classes

    Hello,
    Currently i am working on Struts 2 based application, in which i need to populate an array of Java beans from the form.
    The problem, I am facing is:
    Struts 2 is not instantiating an array of beans
    I have gone through the Data transfer and Type Conversion of struts of 1.2, but every where I can see only following:
    1 An array of primitive data types
    2 List of primitive / Java bean
    3 Map of primitive / Java bean
    but i can't see the docs on An array of Java Beans.
    What I can't do in my application is:
    1 Can not convert an array of beans into java.util.List<beans>
    2 Can not instantiate the bean array (As the number of elements will be decided by the front end - form)
    Please have a look at my configuration file:
    struts.xml:+
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
    <constant name="struts.devMode" value="true" />
    <include file="test/test.xml"/>
    </struts>
    test.xml:+
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
    <package name="test" namespace="/test" extends="struts-default">
    <action name="TestInput">
    <result>/test/input.jsp</result>
    </action>     
    <action name="TestOutput" class="test.Controller">
    <result name="SUCCESS">/test/output.jsp</result>
    </action>
    </package>
    </struts> Controller.java+
    package test;
    public class Controller {
    private String id = null;
    private Contact[] contacts = null;
    public String execute()  {
    System.out.println("***********************************");
    System.out.println("id::: " + getId());
    System.out.println("contacts::: " + getContacts());
    System.out.println("***********************************");
    return "SUCCESS";
    public Contact[] getContacts() {
    return contacts;
    public void setContacts(Contact[] contacts) {
    this.contacts = contacts;
    public String getId() {
    return id;
    public void setId(String id) {
    this.id = id;
    } Contact.java:+
    package test;
    public class Contact {
    private String name = null;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    }+ input.jsp:+
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%@ taglib prefix="s" uri="/struts-tags" %>
    <html>
    <head>
    <title>Test Form</title>
    </head>
    <SCRIPT type="text/javascript">
    // Total number of contacts in the mail request form
    var totalContacts = 0;
    function addContact() {
    var tbody = document.getElementById('testTable').getElementsByTagName('tbody')[0];
    var row = document.createElement('TR');
    var td1 = document.createElement('TD');
    var td2 = document.createElement('TD');
    var inputBox = document.createElement('INPUT');
    td1.innerHTML = new String('Contact ' + (totalContacts + 1) + ' :');
    inputBox.type = 'text';
    inputBox.name = 'contacts['+totalContacts+'].name';
    //inputBox.name = 'contacts.name';
    td2.appendChild(inputBox);
    row.appendChild(td1);
    row.appendChild(td2);
    tbody.appendChild(row);
    // Add to the total number of contacts
    totalContacts += 1;
    </SCRIPT>
    <body>
    <h4>Mail Request Form</h4>      
    <s:form action="TestOutput">
    <table border="1" id="testTable">
    <tr>
    <td colspan="2">
    <s:textfield name="id" label="Request Id"/>
    </td>
    </tr>
    <tr>
    <td align="left">
    <input type="button" value="Add Contact" onklick="javascript:addContact();"/>
    </td>                              
    <td align="right">
    <s:submit/>                         
    </td>     
    </tr>     
    </table>
    </s:form>
    </body>
    </html>
    + output.jsp:+ Not concerned right now
    Exception got in the logs after submitting the form:+
    java.lang.InstantiationException: [Ltest.Contact;
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:123)
    at com.opensymphony.xwork2.util.InstantiatingNullHandler.createObject(InstantiatingNullHandler.java:123)
    at com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyValue(InstantiatingNullHandler.java:104)
    at ognl.ASTProperty.getValueBody(ASTProperty.java:94)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
    at ognl.SimpleNode.getValue(SimpleNode.java:210)
    at ognl.ASTChain.setValueBody(ASTChain.java:168)
    at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
    at ognl.SimpleNode.setValue(SimpleNode.java:246)
    at ognl.Ognl.setValue(Ognl.java:476)
    at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
    at com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:158)
    at com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:146)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:193)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:159)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)
    Please give me suggestions to move forward
    Thanks in advance
    Vikas Parikh

    I am having the same issue. It appears that the RequestProcessor.processValidate adds the errors (ActionMessages) to the request the does a forward. As such the errors are not available to the jsp page. Does any one know a way to get round this?

  • Import PHP-Array into Java-Application

    Hi!
    I want to call a PHP-Script from inside my Java-Application. The PHP-Script can return an array.
    How do I use a PHP-Array in Java and how do I import it????
    Thanks! =)

    thanks! =D
    one last question:
    -how would i have to change my example to make a
    https-connection?
    Did you try
    URL theURL = new URL("https://www.mysite.com/myscript.php");It works that simply. The only complication is if your server is set up for https or not. This is an Apache (or whatever webserver you are using)problem not a PHP problem.
    I think it gets upset if you try and use certificates with problems (self-signed etc) but not having tried this (I have only used it with certificates that are otherwise trustable) I don't know that for sure.
    Once upon a time I asked a question about using https as a client in Java and I got a variety of answers including doing mystic stuff with my keystore but I tried the simple and obvious and it works like a charm. At least from an Applet but I see no reason an application won't work the same way.
    Anyway try the simple and easy and see if that works for you. You might find that it does.

  • Passing an array from Java to Pl/SQL Procdures

    I am relatively new to the Java world and I am unable to pass back an array from Java back to the calling PL/SQL procedure. I have read many of the posts that deal with this issue and in specificly have viewed Ask Tom. My main issue is trying to get the data types matched up. I am able to return varchar2, numbers, and the like, but an array of filenames is not happening. I have tried a variety of "types" but unable to accomplish the task. Please help.
    I have my Java class basically defined as:
    public static oracle.sql.ARRAY[] getCollection(String directory)
                   throws SQLException
    { // provide a directory and get a listing of files
    File path = new File( directory );
    String[] list = path.list();
    return list;
    SQL Type and PL/SQL Procedure is:
    CREATE OR REPLACE TYPE PTO_FILE IS TABLE OF VARCHAR2(100);
    create or replace function get_dir_collection( p_directory in varchar2 ) RETURN PTO_FILE
         as language java
    name 'DirCollection.getCollection( java.lang.String ) return oracle.sql.ARRAY[]';
    /

    I know that it is not an ARRAY. It is however an "array" and I am attempting to map Java's String[][ to some "object" on the oracle side.  I have looked at the link you sited and was not able to find the data mapping.  I have found that mapping data types between different "languages" is some of the most difficult aspects of working with multiple languages.
    Any suggestions? Thanks

  • Passisng array from Java into PL/SQL procedure

    Hi everybody!
    I have type created with :
    CREATE OR REPLACE TYPE my_type IS TABLE OF number;
    Next I have procedure withinin a package which has parameters:
    PROCEDURE my_proc
    (p_Result OUT NUMBER,
    p_Id table.column%TYPE,
    p_MyType my_type
    I call this procedure from Java :
    import javax.sql.*;
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.sql.ARRAY;
    import oracle.sql.ArrayDescriptor;
    public class MyClass extends QueryClient {
    private int Id;
    private int type;
    private Integer[] List;
    private int result;
    public MyClass(int Id, eType type,
    Integer[] List) throws SQLException {
    this.Id = Id;
    this.type = (type.equals(eType.TYPE_EXPORT) ? 1 : 0);
    this.List = List;
    this.execute("{call my_package.my_proc(?,?,?,?)}");
    public void body(CallableStatement stmt) throws SQLException {
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("MY_USER.MY_TYPE", getCon());
    ARRAY array_to_pass = new ARRAY(descriptor, getCon(), this.List);
    // register the type.
    stmt.registerOutParameter(1, OracleTypes.NUMBER); // result of procedure calling
    stmt.setInt(2, this.Id );
    stmt.setInt(3, this.type);
    stmt.setArray(4, array_to_pass);
    // execute and retrieve the result set
    stmt.execute();
    this.result = stmt.getInt(1);
    public int getResult() {
    return result;
    EVERYTHING WORKS FINE, BUT when I move type "my_type" into package header
    TYPE my_type IS TABLE OF number;
    I receive error after calling procedure
    java.sql.SQLException: invalid name pattern: MY_USER.MY_TYPE
    I dropped type my_type after moving it into package. So there is only one my_type, in the package.
    User who call procedure is owner of the package.
    So questions are:
    1. Is it possible to have my_type within package without error?
    2. Is it possible to describe my_type without having a connection to database? My aim is eliminate number of connections to database.
    Thanks all.
    Matus.

    You can't use the packaged type for this. You need to use the original collection type (i.e. via the CREATE TYPE syntax) as you have discovered yourself.
    Regards

Maybe you are looking for

  • Remove EDM Profile from Interval Meter of an installation-Device Management

    My dear friends, I need sincere help from you . I have an installation with an interval device installed to it. We need to do full removal of this installed device by eg32. The interval meter is having EDM Profile attached to it. Before doing full re

  • Windows don't see the aplications disk

    Hello, I've installed windows 7 ultimate on my macbook pro, but I want to install the applications disk, so windows have al the drivers and i can use macosx again. Now will the apple only boot to windows. I put the applications disk in the apple's di

  • From where can i download airplay?

    i searched in app store bt there is no airplay app on results is there anybody who can help me thanks a lot

  • Can't see TM's back up after formating iMac...

    I've just formated and reinstalled my iMac. I'd a permissions problem and I couldn't fix it, so I just reinstalled being confident because I had everything backed up thanks to TM. Now I had a problem because I can't see the whole back up since I got

  • Viewing photos on a 30gb iPod

    I have loaded 35 full res photos onto my 5G 30gb iPod . It shows that there are 50.6mb of photos on the Summary tab, but when I disconnect my iPod, I can't actually view them on the iPod - all I get in the Photos menu are the options for slideshow, e