How should i send parameter to servlet

i want to sent parameter to the servlet
i am using servlet applet cumunication
and when i am coling the servlet i want
send one or more parameter to the servelt
depend on that servlet perform action
how should i sent the parameter please
tell me,
Rahul

how should i sent the parameter pleaseHow should we know that ? It's your decision
Your applet may open a (Http)URLConnection to the Servlet
there you write your parameters in URLEncoded form to the output stream
of the URLConnection setting the RequestMethod to POST.
After that you read the response from the input stream.
andi

Similar Messages

  • How can i send parameter to the servlet

    i want send one or more parameter to the servlet
    acturally i am using applet servlet cmmunication
    useing XML and I want to send one parameter to
    the server and depending on tha perform some
    action but i dont know how to send the parmer to
    servlet plz give the answere
    Rahul

    Hi Rahul,
    You will have to use java.net package for tht.. Through applet you will have to make URL connection to your servlet.whc u will make by using java.net.URl
    Just explore this pakage. You will find alots of utility thr.
    HTH?
    ~Gaurav

  • HT201269 how should I send my contacts from my iphone 5s to my ipad mini the easy way, not very computer savy

    easiest way to transfer my contacts from iphone 5s to my ipad mini

    Just sync everything with iCloud using the same Apple ID to log in.

  • Send parameter from one script logic to another. SAP BPC 7.5 NW.

    Hello!
    Before i start, want to apologize for my English.
    We work on SAP BPC 7.5 for NetWeaver.
    In general,  we want to send parameter from one Script logic file to another script logic file.
    I will explain why :
    1. We have parametr like %C_CATEGORY_SET% (and another four parameter, like groups, currency and etc.) that work on one script(next, i will named it A_Script). 
           We will send this parametr from BPC EXCEL (we will create button, then use command MNU_eData_SelectPackage(we also set parameters) and run package that we need, also before we set script for this package by the SAP Guide. We send some data, and this A_Script work good. Everything that we want from this script work correctly. )
    2. Next we create another script(B_Script) , and we want use %C_CATEGORY_SET%, but we don't know how use this parametr, if we will just write this parametr on Script Logic,  apears error ("C_CATEGORYDATAVALUE" is not assigned to the Data Administrator). We try to solve this problem by using System_Constants.lgf, but we get error.
    Code:
    *DIM C_CATEGORY          WHAT=%C_CATEGORY_SET%;             WHERE=<<<;                   USING=<<<;    TOTAL=<<<
    *DIM C_ENTITY                 WHAT=%ENTITYSET%;                         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM GROUPS                   WHAT=%GROUPS_SET%;                    WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    *DIM RPTCURRENCY         WHAT=%RPTCURRENCY_SET%;         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM TIME                          WHAT=%TIME_SET%;                          WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    If we will change %C_CATEGORY_SET% for  ACTUAL, and also change another parameters, script will work, package will run correctly. But we need using parameters, because we didn't exactly what will choose our client.
    Our question have BPC Script Logic some kind of Globar Parameter(Variable), that we will set in A_Script, and then use them on B_Script?
    How can we define parameter from another script logic, maybe we should send it?
    Should we use System_Constants for solving this problem, if yes, how?
    Any help will be appreciated
    Best Regards,
    Erlan Kadraliev
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:50 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:58 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:59 PM

    Hi Ethan Jewett 
    1. About %ENTITYSET% it is normal. Before this line  i write :
    *SELECT(%ENTITYSET%, "ENTITY", GROUPS, "[ID]=%GROUPS_SET%")
    So it is not this problem. %ENTITYSET% just parameter, that i used.
    2. Are you running the scripts using the same data manager package? I am running two different package for 2 different Script.
    For example aPackage for aScript, and bPackage for bScript.
    My questions was how can i send parametr from one script to another, for example i can run another script by using BADi command Runlogic, but how can send parameter that i need to used on another script. I have for example parameter %GROUPS_SET% (CG001) on aScript, but i can't get this parameter on another script, if i write %GROUPS_SET% i will get error  ("GROUPSDATAVALUE" is not assigned to the Data Administrator)
    OR
    Maybe if you will answer for next question, i will be able solve problem , How can i send parameter CG001 (this is %GROUPS_SET%, for example it stay in EXCEL in cell A5) from excel to script logic by running package. Maybe i can get cell value on Dynamic Script Data Management?  
    My Dynamic Script on bPackage
    PROMPT(RADIOBUTTON,%CHECKLCK%,"u0412u044Bu0431u043Eu0440 u0431u0430u0437u043Eu0432u043Eu0433u043E u043Fu043Eu043Au0430u0437u0430u0442u0435u043Bu044F.",1,{"u0412u0441u0435u0433u043E u0410u043Au0442u0438u0432u044B","u0421u043Eu0431u0441u0442u0432u0435u043Du043Du044Bu0439 u043Au0430u043Fu0438u0442u0430u043B","u0412u044Bu0440u0443u0447u043Au0430 u043Eu0442 u0440u0435u0430u043Bu0438u0437u0430u0446u0438u0438","u0414u043Eu0445u043Eu0434 u0434u043E u043Du0430u043Bu043Eu0433u043Eu0431u043Bu0430u0436u0435u043Du0438u044F u043Eu0442 u043Fu0440u043Eu0434u043Eu043Bu0436u0430u044Eu0449u0435u0439 u0434u0435u044Fu0442u0435u043Bu044Cu043Du043Eu0441u0442u0438"},{"BPAST_ALL","BPEQ","BPPROCE","BPOPIN_GO"})
    INFO
    (%EQU%,=)
    INFO
    (%TAB%,;)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,CHECKLCK%EQU%%CHECKLCK%%TAB%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,MYTEST_145.LGF)
    Best Regards,
    Kadraliev Erlan

  • How to send Vector to Servlet?

    hi~~
    i want know that method of communicate form applet to Servlet.
    So far as I am concerned, Applet can't use I/O because of security.. but it can communicate with Servlet of calling the Applet.
    then, for example Vector.... How can send Vector to Servlet..

    The same way you send anything to a servlet, and the same way you send a vector to anywhere! You can do it a few ways, here's the one you'll see most of the time:
    URL servletURL = new URL(getDocumentBase(), "/servlet/myServlet");
    // Hope it's HTTP.  You probably should use instanceof before casting here.
    HttpURLConnection conn = (HttpURLConnection)servletURL.openConnection();
    conn.setDoOutput(true);
    ObjectOutputStream out = new ObjectOutputStream(conn.getOutputStream());
    out.writeObject(myVector);

  • How to go back on page by not sending request to servlet

    Hello,
    I have create web application using JSP and servlets. When I press a button I send request to servlet and it redirects me to jsp page where the results are displayed, then in that page I press a button and go to other servlet which redirects me to other JSP.
    I want to make a button on the third JSP page to go back to second JSP page by not sending request to servlet. For e.g. in FireFox, I press back button and it takes me back. But I want that the same action like in firefox would work with my created button.
    How can I do that?
    Edited by: peliukasss on Sep 14, 2010 3:28 PM

    evnafets wrote:
    You wnat your created button to act the same as the "back" button in the browser?Yes, thats exactly what I need.
    Then all you need to do is invoke some javascript on it.
    After a quick google search, the most commonly suggested solution appears to be:
    onclick="history.go(-1)"
    Thanks for your reply.

  • How can i send xml file with a http servlet request

    Hi
    Please tell me how can I send a xml file into http servlet request.
    I have a servlet(action) java file.From this servlet I have generate a xml file. Now I need to send that xml file to another servlet with http servlet request object.
    Dave.

    When you say you have generated an XML file what do you mean?
    Is it a file stored on disk? Then pass the file path as a string to the servlet.
    Is it stored in memory as an object? The pass a reference to the object to the servlet.
    Or are you asking how to communicate between servlets?
    Look in the JavaDocs for the RequestDispatcher class. You can use this class to forward the request to another servlet. Data can be passes using the RequestDispatcher by storing it as attributes using the request getAttribute and setAttribute methods. Also described in the JavaDOcs.
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html

  • My iphone 5 is stuck on recovery mode and everytime i tried to restore it , it says that my phone have error -1, how can i fix it or should i send my phone to the appstore ?

    my iphone 5 is stuck on recovery mode and everytime i tried to restore it , it says that my phone have error -1, how can i fix it or should i send my phone to the appstore ?

    This may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.
    error code - 1
    and see here
    http://support.apple.com/kb/TS3694#error1

  • How to send mail from servlets

    m having troubles sending mail from servlets...
    how do you use the SimpleMailUser object needed in the session?
    a sample code on this would be of great help, thanks!

    <html>
    <body bgcolor="white">
    <font size=5 color="black">
    <%@ page import="javax.servlet.http.HttpUtils" %>
    <%@ page import="java.util.*" %>
    <%@ page import = "java.sql.*" %>
    <%@ page import = "java.io.*" %>
    <%@ page import= "sun.net.smtp.SmtpClient" %>
    <%
         String from,to,subject,msgbody,serverName;
         try
    from = request.getParameterValues("from")[0];
    to = request.getParameterValues("to")[0];
    subject = request.getParameterValues("subject")[0];
    msgbody = request.getParameterValues("msgbody")[0];
    serverName = request.getParameterValues("server")[0];
         catch (Exception e)          // Generally Speaking, an Error getting one of these
                                       // Values means that it wasnt passed in; inform the user
              out.println("You must call this JSP from this ");
              out.println("<A href=\"FormMail.htm\"> form</A>.<BR>");
              out.flush();return;
    %>
    Hold On A Moment while I try to Send Your Mail... <BR>
    <%
         out.flush();
         // Here are the real guts of the mail sending
         try
         sun.net.smtp.SmtpClient sm = new sun.net.smtp.SmtpClient(serverName);
         sm.from(from);
         sm.to(to);
         PrintStream msg = sm.startMessage();
         msg.println("To: ");     // Note dont use + for Performance
         msg.println(to);
         msg.println("Subject: ");
         msg.println(subject);
         msg.println();
         msg.println(msgbody);
         msg.println("==============");
         msg.print("This mail brought to you by JSP MAIL..from a user at IP ");
         msg.println(request.getRemoteHost());
         sm.closeServer();
         out.println("Your Mail Has Been Sent!");
         catch (Exception e)
              out.println("The mail couldn't be sent, probably because the mailhost wasnt set correctly.<BR> ");
              out.println("The error message I am getting is: ");
              out.println(e.getMessage());
    %>
    <BR>
    <BR>
    Click here to send another!

  • How do I send E-Mail using Servlet or JSP?

    Hi friends,
    Anybody can you please tell me how do I send an email in Servlet or JSP?
    Do I need any special configuration to check in my server space?
    I am puzzled because after surfing on net, I found that some people sending email with Javamail and Activation API
    and some people sending email using import="sun.net.smtp.SmtpClient";Please give me some simple direction or any working code if possible.
    Thanking u,
    ---Sujoy

    What you need is a working SMTP account to be able to send email, that is accessible from the server. If you have that, simply use JavaMail.

  • How can I send an XML request to the server using servlets

    How can I send an XML request to the server using servlets

    http://forum.java.sun.com/thread.jspa?threadID=5158333
    http://forum.java.sun.com/thread.jspa?threadID=5158705
    Crossposting is lame.

  • Sending parameter between JSP and CGI

    How to send parameters from CGI to JSP ? And how to receive returned value from JSP to CGI?

    When you mention "rest of params" as a parameter, would the request not include all of the parameters within that bean????
    You might be calling ur bean from the JSP right, for
    eg assume your bean name is "myBean".
    From JSP you pass the request object ie,
    myBean.executeTransaction(request,<rest of the
    params you need>)Your bean should be like
    import javax.servlet.*;
    //methods
    public String executeTransaction(HttpServletRequest
    request, <rest of the paramss){
    //do you check here
    //if request.getParameter("actionPerformed")==null(?)

  • 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 can I pass parameter from report to form?

    Hi :)
    Now I try to build conference room like this by using form
    and report. And i design that when users click at group report
    then i'll show page that contain questions report and add
    question form. And question form and report must receive the
    same parameter from group report.
    First Problem: is I don't know how group report send the
    same parameter to question report and add question report at the
    same time. And is it possible??? If not please suggest me what
    should I do???
    Second Problem: is I don't know how can I pass parameter from
    report to form. I don't know the way to do it.
    Please tell me!!! Please...
    I look forward to hearing from all of you.
    Thank You.

    One way is to create a link based on that form and attach that
    link with the report. Through links you can pass parameters

  • PO should be send to vendor (PDF)as soon it is approved and print hard copy

    Hi,
    I have 2 requirements as below
    1) The PO should be send to the vendor in PDF as soon as it is released to the e mail id of the vendor maintained in the vendor master. Also a hard copy of the PO should  get printed.
    2)if the PO does not require a approval ,PO should be send to the vendor as soon as it is saved & print hard copy.
    Hi gurus can you pl tell me the stepwise config to be made.
    KN

    Hi,
    I just came across your post about Sending PO to a vendor through e-mail with PDF attachement.
    I have a similar issue on hand.
    My Program name - Z_SAPFM06P
    Routine - ENTRY_NEU
    Form - Z_MEDRUCK
    My requirement : After creation of a PO, on click of 'Save' button, an e-mail needs to be sent to a given receipient.
    As of now, I have included the code in the routine - ENTRY_NEU and I'm facing probelms with the FM - SO_NEW_DOCUMENT_ATT_SEND_API1.
    Pls let me know what exactly is the codeand where to I need to include it. Pls tell me how to go about tis issue step-by-step.
    In general you will have to do the following:
    1) Set NAST-NACHA = 8 (Special function)
    2) Before OPEN_FORM (maybe in In enhancement spot) if NAST-NACHA = 8, then set itcpo-tdgetotf = 'X' (to get OTF back from CLOSE_FORM!)
    3) During CLOSE_FORM, if NAST-NACHA = '8', get OTF output from TABLES parameter OTFDATA
    4) Convert this OTF output to PDF using following sample code:
    data: I_PDF STRUCTURE  TLINE occurs 0,
            I_OTF i_otf LIKE itcoo OCCURS 0.
        CALL FUNCTION 'CONVERT_OTF'
             EXPORTING
                  format                = 'PDF'
                  max_linewidth         = 134
             IMPORTING
                  bin_filesize          = w_bytes
             TABLES
                  otf                   = i_otf
                  lines                 = i_pdf
             EXCEPTIONS
                  err_max_linewidth     = 1
                  err_format            = 2
                  err_conv_not_possible = 3
                  OTHERS                = 4.
    5) Send email with PDF attachment using the method(s) mentioned in one of these excellent blogs:
    /people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    pherasath

Maybe you are looking for

  • ITunes (as well as Quick Time) doesn't work

    Just bought an iPod (Classic Video 160GB) and tried to install iTunes 7.5 (incl. QuickTime 7.3). Installation goes perfectly well. However, when I try to start the programs, the problems begin. QuickTime gives me a 'Buffer Overrun' when I try to star

  • Can't include C-code in objective-c project

    I am having problems including a little C source code file in an existing objective-c project. The problem is that xcode spits out lots of warnings and error messages when it tries to compile the whole project or just the C file, in particular, lots

  • How to restore standard library object

    Dear All, We have a standard library object 1VK(Absorption costing) deleted from one of our client in Development system.  Please suggest how do we restore this standard library back once again into that client. Thanks, Raj

  • Indesign CS6 - interactive pdf with the hidden image can't be print out

    Hi all, I am creating a interactive pdf with "Hidden until triggered" function when roll over to apper and roll out to disapper and also selected a "printable" function (Button and Forms/ PDF Options/ printable). The image can be print out when opene

  • Build plan error

    Hi, I created new container for Financial Oracle 11.5.10 after that i added new container subject areas to Financial Oracle 11.5.10 execution plan afer that executed buld paln. i got below error. Financials_Oracle 11.5.10 MESSAGE:::There is no databa