How to Call a JSP from Java Script

Hi,
I want to call a jsp from Java Script.
I am having IntelliJ IDEA 4.5 (IDE) and weblogic server.
should i do anything on web.xml,weblogic.xml
I have written one jsp, Java script.
I want to call a jsp from Java script

function submitf(){
document.xyz.action ='ReportSave.jsp';
document.xyz.method='POST';
document.xyz.submit();
<form name='xyz'>
<input type='text' name='text1'>
<input type='text' name='text2'>
<input type='button' name='xx' value='submit' onclick= submitf()>
</form>
Is this what u want???
Regards,
RAHUL

Similar Messages

  • How to call gnuplot command from java

    Hi there,
    In our course, we are required to develop an GUI for gnuplot. In case you don't know about gnuplot, it's a plotting program and has lots of command. We want to use java and swing, but now we don't know how to call gnuplot command from java, or how to execute a shell command(script) from java.
    By the way, since we need read in files with several columns of data and allow user to select a column, we want to use JTable. Is that reasonable?
    Thanks a lot for any suggestions!
    Jack

    Hi, there:
    Will using JTable add much overhead? I may have to use several JTables and switch among them. I can add scroll bar to or edit JTables, right?
    BTW, do you have experience about gnuplot? Can I find the command tree of gnuplot somewhere? Or do you know a better place to post question about gnuplot? unix/linux group, maybe.
    Thanks,
    Jack
    P.S. Would you guys answer my question after I use up my duke dollars? :- )

  • How to call a subroutine from sap script

    hi friends,
    Can anybody tell me How to call a subroutine from sap script .
    thanks n regards .
    Mahesh

    hi..
    Calling ABAP Subroutines: PERFORM 
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (‘First page’, ‘Next page’, ‘Last page’) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    regards,
    veeresh

  • JSP from Java Script???

    Can I call any jsp method from javascript?? I have a jsp page that contains some java script code..and I want to call one method of it from javascript.
    Thanks

    You can call applet methods or the methods that don't throw exception from java script otherwise not.

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • 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

  • How to call external files from java?

    How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
    In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?

    Jayarathina_Madharasan wrote:
    no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
    From JavaRanch :
    And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
    Edited by: Encephalopathic on Apr 14, 2008 10:01 AM

  • How to Call .XDO file From Java Program

    Hi,
    I have developed a report in using BI Publisher version 10.1.3.
    I created the report and it only created XDO files. If I want to call XDO file from Java program how I can do that.
    What are the APIs available to do that.
    Thanks
    -Ashutosh

    Hi,
    the JavaAPI didn't work with the xdo-Files. But you can create a proxy stub for the Web Service API of BI Publisher which uses the xdo's in the repository.
    regards
    Rainer

  • How to Call C++ Method from Java

    I need to call C++ method from Java.
    I have gone through the JNI tuorial , but was not able to pin point things.
    I read that :
    You have to write JNI c functions which then call your C++ member functions.You need to write a JNI function which will call new on your C++ class.
    Now i have java class :
    Java Code JavaClass.java ---->
    class JavaClass{
    public native void nativeMethod();
        static
            System.loadLibrary("NativeCppCode");
         private void callCppMethod()
              //call C++ method
                    JavaClass jvc = new JavaClass();
                    jvc.nativeMethod()
    }Cpp Code:
    NativeCppCode.h---->
    class NativeCppCode
    public:
        getValue();
        setValue();
    private:
       int a;
    JNIEXPORT void JNICALL Java_JavaClass_nativeMethod(JNIEnv *env
                   ,jobject obj);NativeCppCode.C---->
    NativeCppCode::getValue()
       return a;
    NativeCppCode::setValue()
       a = 1;
    JNIEXPORT void JNICALL Java_JavaClass_nativeMethod(JNIEnv *env
                   ,jobject obj)
    NativeCppCode* nativeInstabce = new NativeCppCode();
    NativeCppCode.setValue();
    }Is this the correct way to do it.
    Any suggestion would be a great help to me

    tryit wrote:
    I need to call C++ method from Java.Not possible.
    JNI uses C methods.
    Is this the correct way to do it.Same way you would do it in any C/C++ method (not java)
           MyClass* p = ....
           p->doit();
    Common idiom for the pointer in the above is to pass it back and forth to your java code as a java long. You cast it it and from your class pointer. Provide an explicit java method to free it when done. Besides providing the explicit method also implement a finalizer to free it as well (however that is a fail safe and should not be relied upon.)

  • How to call BPM process from Java

    Hi All,
    Can anybody help how to call a BPMN process from java.Please give any sample exaple on this.
    Thanks,
    Ganesh

    For 11g BPM please look at this post. Re: Getting while running the BPEL process from java
    It references an ATeam example app that can start processes from a web client. But the Java APIs are described too.

  • How to call c++ code from java

    i have a third party dll written in c++. I want to call its methods in java. I searched web and found that I have to use JNI for this. I have seen examples on web writing c++ code and then using it from java through JNI, but can anybody please point to me the example where i have a predefined library or dll in c++ and i have to call it in java. I think that I may have to declare methods in library as native in java and then write a wrapper implementation (dll) in c++ which actually calls the library or dll functions. But, then how will I call methods of dll from my wrapper code.
    Any examples, please point
    Regards,
    Farooq

    There's a JNI forum here that may be a better place for this question; though given the general nature of the question, I suspect that they'll refer you to a tutorial. good luck.

  • How to call a procedure from  Shell Script

    Friends,
    How can i call a procedure from a shell script ? If any one know the answer , let me know immediately .
    Thanks in advance .
    Chakks

    We connect using SQLPlus commands on the Unix server:-
    Our code block is below:- We've got DBMS_OUTPUT in the procedure, hence the spooling. You don't need all this, but you do need the sqlplus directory, etc... in your profile.
    sqlplus -s <<EOF > ${CREATE_LOG_FLE}
    $UserName/$Password@$SID
    SET SERVEROUTPUT ON SIZE 1000000;
    spool ${CREATE_LOG_FLE}
    EXECUTE $STORED_PROC(${Months}, ${DeleteRecords});
    EOF
    Hope that helps

  • How to fire an event from Java Script

    Hi,
    Here is my problem: using JSF
    I have a selectOneMenu list box when a value changes a valueChangeListner event is fire that all works great now the problem I'm able to add items to the list from a popup form using Java Script but I need the valueChangeListner to fireup every time I add a item any ideas how to do that
    Thanks

    Just do form.submit().

  • How to Call SQL Loader from Java ( servlet )?

    We need to call SQL Loader command from Java Servlets? Any suggestions how this can be done?
    Thanks
    Rahul

    Probably not the best way, but you could try using JNI to call a C function which then invokes SQL Loader via system() or exec(). I haven't done this myself though...

  • 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

Maybe you are looking for

  • Error while running OA Framework (Suppliers Page) in Jdeveloper 10g

    Hi All, Currently working on R12 and OA Framwork Version is 12.0.3. As per metalink note 416708.1 ....installed jdeveloper verison p6509325_R12_GENERIC. Error Message....Can you please let me there is any workaround for this? OA Framework Version Inf

  • Help for Installing ECC 6.0

    Hi, I am trying to install ECC 6.0 since last week and so far I am not successful. But all these time i made few observations which I have listed below. I had gone through installation guides and enough materials. Anyone who is having installation ex

  • Number ranges in CRM  -- HR integration ??

    Hello All I am working on CRM u2013 HR integration, After replicating the organizational model and employees I found that not all of the employees have been replicated so I did changes in the number ranges that have been assigned to the employees at

  • Strange Message window behavior in Yosemite

    This is difficult to describe, but in Yosemite, I have a problem with the Messages window moving about. Once I've changed focus to the Messages window, the next place I click will result in the Messages window moving to that location. It's almost as

  • Can we dedidate only 3 physical procs to db on a 4 quad-core procs machine?

    Hi, I have couple of question and will appreciate if anyone has any comments on them. 1) Is there any way I can dedicate only 3 processors to Oracle database on a 4-quad core processor machine. In other words, all four should be available to OS but o