I want to execute JSP scriplet in onClick function of the button HTML page

in my JSP page, the code is like this...
<input type="button" value="xyz" onClick="<% my jsp code%>">
the jsp code is executing wen the page is loading..
i want the jsp code is executed wen v click the button..
can i write like this...if not how should i write.
plz suggest me...
Thanking you
Sorry if i post this in a wrong forum....
Edited by: Murthy_Srinivas on Jun 5, 2008 10:49 PM

the jsp code is executing wen the page is loading..
i want the jsp code is executed wen v click the button..Not possible(in the way you are trying to achieve). JSP codes are processed in the server and only processed data/results are sent to browser which you see in your screen. Browser cannot/willnot execute the jsp code.
...if not how should i write.The only way is to make a server call(eg: either submit a form, make a http request using Ajax etc)

Similar Messages

  • Hello I formatted my iMac today and wanted to download iphoto again but after i press the button to install it in the app store nothing happens! same with the yosemite upgrade..

    Hello I formatted my iMac today and wanted to download iphoto again but after i press the button to install it in the app store nothing happens! same with the yosemite upgrade.. In the iPhoto ratings there are alot of other people facing this problem I hope somebody can help me. thank you in advance

    If you have OS X 10.6.8 as you state you can not get iphoto form the App store - you must have Yosemite OS X 10.10. installed to download iphoto 9.6 from the App store
    If Nothing happens then you need to contact App store support - link is on the right of the App store window
    LN

  • I want to create a cd on my mac that autolaunches an .html-page after inserting into a pc or a mac. Is that possible?l

    I want to create a cd on my mac that autolaunches an .html-page after inserting into a pc or a mac. Is that possible?

    Solving this requirement on a modern Windows system is going to be problematic too, as the autorun mechanisms are increasingly being locked down over there, if not by the end-user or the system installer, then by the usual anti-malware tools that are installed.
    Given this is one of the most vulnerable populations here in terms of operational security, you'll probably want to target online distribution, or to distribute a signed application that can be installed on the target (akin to a managed system) and that then accesses your data on external storage.  All that app might do is access the disk, verify that the contents of the device are trusted and valid, and launch the browser.
    I'd likely target online distribution or pre-loaded distributions and iOS, as that's where all of the older folks I'm dealing with are headed, too.  If not a native app, then maybe a web-app here, and download the contents into the HTML5 local storage.

  • I want Google as my primary browser when I open the firefox start page

    When I open the firefox start page and type a question, the answer is provided by Ask.com. I don't want ask.com to be my primary browser on this home page. I want Google. How do I make Google my primary browser on the firefox start page?

    I did manage to paste that code in the location bar and for that brief episode I had a google search engine for the fire start page. However, when I closed id down and re-booted the page, it reverted to ask.com as the primary search engine so that really did not solve my problem. By the way, the start page that I have does not show google to the left of the large central bar of the start page. I wonder if I should uninstall google 7 and reinstall it? I probably would lose my favorites and I don't want to lose them by doing this. Somewhere in this computer ask.com is flourishing just like a virus. I removed it's toolbar permanently both in extensions and in the programs section to no avail.

  • Execute JSP from F4J 3.0 Web-Modul

    Executing simple MyJsp.jsp from F4J 3.0 (Win NT)
    Web-Modul ..\myjsp01
         Document Base
              MyJsp
         WEB-INF
    starts netscape, then error:
    org.netbeans.modules.extbrowser.NbBrowserException: DdeConnect errno >400A<
    Annotation: Could not access the URL through the external browser.
    Check the configuration in Tools | Options | Web Browsers.
    Tools | Options | Web Browsers | External Browser(Windows) shows
    Browser Name          Platform dependent HTML browser
    DDE Server          <Default System Browser>
    Executable browser     null
    How to execute *.jsp ?

    Hello,
    I've got the same error with Sun ONE Studio 4 on Windows 2000!
    I am wondering, if you've ever received a response?!
    Thanks for your help,
    Claudio
    Here is the error message I've received:
    Thu Feb 13 11:57:17 CET 2003: org.netbeans.modules.extbrowser.NbBrowserException: DdeConnect errno >400A< when connecting to server NETSCAPE, topic WWW_Activate.
    Annotation: Could not access the URL through the external browser. Check the configuration. In the Options window, expand IDE Configuration. Then expand Server and External Tool Settings and select Web Browsers.
    org.netbeans.modules.extbrowser.NbBrowserException: DdeConnect errno >400A< when connecting to server NETSCAPE, topic WWW_Activate.
    at org.netbeans.modules.extbrowser.NbDdeBrowserImpl.reqDdeMessage(Native Method)
    at org.netbeans.modules.extbrowser.NbDdeBrowserImpl.access$600(NbDdeBrowserImpl.java:54)
    at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.dispatchURL(NbDdeBrowserImpl.java:341)
    at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.run(NbDdeBrowserImpl.java:294)
    [catch] at java.lang.Thread.run(Thread.java:536)

  • How to call HTML page through JSP ?

    i want to know Hw to call Automaticly a HTML page through JSP.
    example :-
    have u seen yahoo login wen u put your ID & pass & Clock on login button it will chack ID & pass in the database & if it is correct then It will call A Mail Home Page.
    that's same i want to do.
    i have a jsp page which chacks the userID & Pass & call the first.html page
    but i dont know how to call html page automaticly.
    Any one can help me
    what i think is this
    tell me is it right or not
    suppose i have made a variable
    String add = "first.html"
    after chacking userID & pass
    if(idpass == true)
    add;
    if(idpass == false)
    erre;
    it will work or not pl tell me

    If you do the redirect with javascript, the user cannot resubmit his login when he presses the refresh button. When he does press refresh, he only refreshes the redirect, not the form post that was before it. When he presses back the redirect will also kick him back in stead of going back to the login page. A simple javascript redirect page would look like this:
    <html>
    <body onload="document.location.href='myhtmlpage.htm';">
    </body>
    </html>But that is only if you care about resubmits of course.

  • JSP, downloading files and show html page

    I like to download files and show a html page on JSP.
    With the source following, downloading works well.
    But, it is just remained on the previous page, not showing the next html page.
    Someone tell me why is it?
    <%@ page import="java.io.*, java.net.URL"%><%
    String file_name = request.getParameter("file_name");
    File fileDir = new File(config.getServletContext().getRealPath("upload/"));
    File theFile = new File(fileDir, file_name);
    FileInputStream fin = new FileInputStream(theFile);
    response.setHeader("Content-Disposition","attachment; filename=\"" + theFile.getName()+"\"");
    response.setContentLength((int) theFile.length());
    BufferedInputStream bf = new BufferedInputStream(new FileInputStream(theFile), 8096);
    int i;
    while ((i=bf.read()) != -1)
    out.write(i);
    bf.close();
    out.close();
    %>
    <html>
    <head>
    <title>file download</title>
    </head>
    <body>
    <p align="center"> </p>
    <p align="center"><b><font face="Tahoma" color="#000000" size="2">You have
    successfully downloaded your file(<%=file_name%>)!</font></b></p>
    </body>
    </html>

    You's already close the JSP output stream befor you try and write your html confirmation, and I don't think browsers can provide the kind of functionality you're trying to demonstrate here. A browser will download the file and open it directly itself or using another application based on user input (e.g. save as, open file, etc.). Once the file is opened or downloaded, it's done!
    I think your best bet is to show a dialogue that the user's download should begin, then set the pages href w/ JS to the location of the file, same way other sites that allow you to download files do it. Go take a look at download.com or something like that.
    Hope that helps.

  • OnChange:execute JSP

    try to be more clear, i'm in lack of ideas in this problem.
    <logic:present name="StateList" scope="session">
    <td align="left"><font color="red"><b><b>*</b></b></font> <b>Select State</td>
    <td>
    <html:select  property="selectedState" onChange="execute(this.form)">
    <html:option value="-1">Select</html:option>
    <html:options collection="StateList" property="label" labelProperty="value" />
    </html:select>
    </td>
    </tr>
    <tr></tr>
    </logic:present>     on calling onChange i want to reload this JSP without refreshing parameter.Because On the basis of selected value i have to perform some other features.I am able to do using struts,but i dont want to use struts.
    using struts i can do like this:
    function execute(frm)
        frm.action="Inedex.do?method=process";
        frm.submit();
    }process method is written in Indexaction.java.which is returning my same JSP(return mapping.findforward("this")).where "this" is mapped to Index.jsp and i am attaining my goal.But i dont want to use struts.
    I have spend hours trying to play around with this but have got nowhere.
    Your help is much appreciated.

    Thankyou thankyou very much for reply...
    <logicresent name="StateList" scope="session">
    <td align="left"><font color="red"><b><b>*</b></b></font> <b>Select State</td>
    <td>
    <html:select property="selectedState" onChange="execute(this.form)">
    <htmlption value="-1">Select</htmlption>
    <htmlptions collection="StateList" property="label" labelProperty="value" />
    </html:select>
    </td>
    </tr>
    <tr></tr>
    </logicresent>After this there is button name "show".
    <html:submit property="method" value="Show" onClick="return(checks(this.form))"/>on clicking show button some text message is displayed on this same jsp below show button.(For this i am using hidden variable with value "False" then in "checks method" i am seting its value to "True".on basis of hidden parameter value message is displayed.if this value is false then no message is displayed and if this value is true appropriate message is displayed.)
    Problem:
    But Now take the case when user change the statelist option then that message should be disappeared while changing the list,without clicking show button
    if still i am not clear,let me know.
    Waiting for reply..

  • I want to execute UNIX COMMAND in ABAP

    Hi All,
    I want to execute a UNIX XOMMAND sh <scriptname> <filename> to replace divsion codes.in ABAP.
    But, I came to know that we can't (2) or try the following program but unfortunately the command CALL SYSTEM is not supported by SAP. If you are on R/3 2.1 - 2.2x you can get some idea's from the program SAPMSOS0.
    REPORT ZUNIXCOM .
    DATA: U_COMMAND(200).
    Table for system messages
    DATA: BEGIN OF RT OCCURS 100 ,
    LINE(100) ,
    END OF RT .
    START-OF-SELECTION .
    MOVE 'unix command' to U_COMMAND .
    REFRESH RT.
    CALL 'SYSTEM' ID 'COMMAND' FIELD U_COMMAND
    ID 'TAB' FIELD RT-SYS .
    LOOP AT RT.
    WRITE : / RT-LINE .
    ENDLOOP. 
    So please can u help me how to call a unix command from ABAP. it is very urgent. I want complete details and all possible solutions
    <removed_by_moderator>
    Thanks,
    gyanaraj
    Edited by: Julius Bussche on Aug 26, 2008 11:29 AM

    Selvaraj Gyanaraj wrote:>
    > So please can u help me how to call a unix command from ABAP.
    I was about to help you.
    >it is very urgent.
    I changed my mind.
    >I want complete details and all possible solutions
    I'm glad I changed my mind.
    >Points are surely rewarded.
    Too late.

  • I want to execute my application in any computer

    Hi!I have a javafx application. I want to execute aplication from any computer.I suppose that I need have executable. How can I do that?thanks

    Just package it (with NetBeans or using javafxpackager) to generate a jar and a JNLP file. Then you distribute these two files. Any computer with Java 1.5+ should run the JNLP, get the JavaFX runtime if not in cache and run the application.

  • Error in executing JSP files

    hi there,
    I have a problem when a I execute JSP files. This is the message that I encounter everytime I executing JSP files:
    " Java System Application Server Execution Note: make sure that the j2ee module or application has been deployed before using execution."
    It seems that Application Server can not be started and I don't khow what I must do.
    Best Regards.
    Zolfaghar

    hi friend
    u just restart the application or deploy again on server.
    i hope u won't get any error.
    [email protected]

  • Hi..assign a core tag value to a variable in jsp scriplet

    Hi
    I have a <core:set var="membershipType" value="${somevar}" />I want to set the membershipType value of the above tag to a variable in scriplet <% String member =""%> How can I do that,
    Any ideas
    Thanks
    jag

    EL variables are assigned to one of the 4 scopes -> Page, Request, Session, or Application. By default they go to the page scope, which corresponds to the pageContext object in scriptlets.
    The result is that you need to retrieve the value out of the scope it is in using the proper getAtribute(name) method, such as:
    <% String member = pageContext.getAttribute("membershipType") %>The best course of action, though, is re-designing your application so there is no need for scriptlets.

  • Through Java code I want to execute a exe file which is in aJar file

    I am having some classes and an exe file in a directory. I have made them in to a Jar file. In a class file which is in that jar file i want to execute a Exe file which is also resides in that jar file. Is it possible to exexute that EXE file?
    For Example....
    1. Im having a directory named CLIENT.
    2. In that directory I have 10 clss files and an EXE file.
    3. These class files and EXE files are ziped in to a Jar file.
    4. I have to give the Jar file to my client.
    5. He can put that Jar file where ever he installed my product may be C driver or D drive like that
    Now the problem is...
    I want to execute the Exe File from one of the class where both the exe file and class file resides in the Jar file
    This is my requirment
    Can anyone Help to me to solve this problem?
    Thanks in Advancd
    Ibram Shah.A.M
    ([email protected])

    The answer is to extract the EXE into a temp directory, execute it, and delete it when you're done. For example:
    //This is the path *inside* the JAR file!
    InputStream in = getClass().getResourceAsStream("/resources/myprog.exe");
    OutputStream out = new FileOutputStream("myprog.exe");
    File file = new File("myprog.exe");
    int data;
    while((data = in.read()) >= 0) out.write(data);
    in.close();
    out.close();
    //Execute the EXE here using java.lang.Runtime.exec()
    if(file.exists()) file.delete();
    ...

  • I am in report 1 i want to execute report2 in background .

    Hi,
    I am in report program 1 i want to execute the report program2 in backgound and iam passing some selection screen parameters .
    user should not know about the running of this program2.
    i tried using submiit but iam seeing the result of report 2 in report 1.I dont want any output from report2.
    thanks in advance.
    regards,
    Karthik.

    Hi Karthik
    Implement this code in Report1. To create a background Job to execute Report2.
    This is the Pseudocode:
    <b>call function 'JOB_OPEN' ...
    Submit Report2 Via background Job .........
    Call Function 'JOB_CLOSE' .
    </b>
    Sample code here:
    DATA: number           TYPE tbtcjob-jobcount,
          name             TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.
    <b>Reward if Helpful</b>

  • Hi i want to execute bapi two times with different paramters....Possible

    Hi,
    i want to execute bapi twice times.Possible please explain where i put which code.Means i put bind code at doinit() method of conpopnent controller and execute bapi code in doinit() iof view. But for second time where i put bind and execute code. 
    Regards,
    Gurprit
    Edited by: GURPRIT BHATIA on Dec 17, 2007 1:24 PM

    Hi Gurprit,
    For executing the bapi second time, you can put the execute bapi code in the action of the button which is on your form. You need not write the bind code again.
    Bye
    Ankur

Maybe you are looking for

  • Update to NW04 SP27: J2EERT file only 17KB?

    Hello, we want to test SP27 for NW04 (now we have sp21) and we download all files down from SAP MP, but J2EERT file is only 17KB. Is that right? Normally file is about 350MB to 400MB. and when we use sapcar for extraction, error is shown (Package dam

  • Export Question/Interlacing Plain English

    Hello, 2 things: 1) did a project for girls basketball team. Had 20 hours of of dvd to import. So took the short route and changed the .vob files to .mpg. Imported into Premiere cs3 (I know not best way). What happened was when I exported the finishe

  • Printer and bridge at same time???

    I have my printer connected to the AX. That works fine. BUT, I have to switch from my linksys connection to my AX connection in the airport icon each time I want to print thereby dropping off the internet. Is there a way to Bridge my linksys through

  • Left margin off screen

    I'm new to Mac. Pls help. When I turn it on initially, the screen looks fine, but whenever I go to any application, the left margin shifts and is off screen. It doesn't matter what resolution I select or what application I go to. It's almost like it

  • Is Smartview add-ins support Office 2007 on Windows7?

    Dear all, Oracle said that Essbase add-in and Smarview Version 9.3.1 support Office 2007. However, they do not support Windows 7 as of yet. Is there any plan of having a patch for supporting Office 2007 running on Windows 7? Regards, nww