Add second item into PayPal express checkout list

I want to add second item into PayPal express checkout list public void initPayPal() throws SSLConfigurationException, InvalidCredentialException, IOException, HttpErrorException, InvalidResponseDataException, ClientActionRequiredException, MissingCredentialException, InterruptedException, OAuthException, ParserConfigurationException, com.paypal.exception.SSLConfigurationException, com.paypal.exception.InvalidCredentialException, com.paypal.exception.HttpErrorException, com.paypal.exception.InvalidResponseDataException, com.paypal.exception.ClientActionRequiredException, com.paypal.exception.MissingCredentialException, com.paypal.sdk.exceptions.OAuthException, org.xml.sax.SAXException
PaymentDetailsType paymentDetails = new PaymentDetailsType();
paymentDetails.setPaymentAction(PaymentActionCodeType.SALE);
PaymentDetailsItemType item = new PaymentDetailsItemType();
BasicAmountType amt = new BasicAmountType();
amt.setCurrencyID(CurrencyCodeType.fromValue("USD"));
double itemAmount = 1.00;
amt.setValue(String.valueOf(itemAmount));
int itemQuantity = 1;
item.setQuantity(itemQuantity);
item.setName("item");
item.setAmount(amt);
List<PaymentDetailsItemType> lineItems = new ArrayList<PaymentDetailsItemType>();
lineItems.add(item);
paymentDetails.setPaymentDetailsItem(lineItems);
BasicAmountType orderTotal = new BasicAmountType();
orderTotal.setCurrencyID(CurrencyCodeType.fromValue("USD"));
orderTotal.setValue(String.valueOf(itemAmount * itemQuantity));
paymentDetails.setOrderTotal(orderTotal);
List<PaymentDetailsType> paymentDetailsList = new ArrayList<PaymentDetailsType>();
paymentDetailsList.add(paymentDetails);
SetExpressCheckoutRequestDetailsType setExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();
setExpressCheckoutRequestDetails.
setExpressCheckoutRequestDetails.setReturnURL("http://devtools-paypal.com/guide/expresscheckout/java?success=true");
setExpressCheckoutRequestDetails.setCancelURL("http://devtools-paypal.com/guide/expresscheckout/java?cancel=true");
setExpressCheckoutRequestDetails.setPaymentDetails(paymentDetailsList);
SetExpressCheckoutRequestType setExpressCheckoutRequest = new SetExpressCheckoutRequestType(setExpressCheckoutRequestDetails);
setExpressCheckoutRequest.setVersion("104.0");
SetExpressCheckoutReq setExpressCheckoutReq = new SetExpressCheckoutReq();
setExpressCheckoutReq.setSetExpressCheckoutRequest(setExpressCheckoutRequest);
Map<String, String> sdkConfig = new HashMap<String, String>();
sdkConfig.put("mode", "sandbox");
sdkConfig.put("acct1.UserName", "peter.penzov_api1.gmail.com");
sdkConfig.put("acct1.Password", "5LQB5QHQJVKP9QKN");
sdkConfig.put("acct1.Signature", "AFcWxV21C7fd0v3bYYYRCpSSRl31A6JqBNQNOE3.Jwxfs7nIV1jR7qcl");
PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(sdkConfig);
SetExpressCheckoutResponseType setExpressCheckoutResponse = service.setExpressCheckout(setExpressCheckoutReq);
String token = setExpressCheckoutResponse.getToken();
String link = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=" + token;
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect(link);
}   

Help please?

Similar Messages

  • Add an item into announcement list in site collec. and repeat the same in all the sub webs' announcement list without using event receiver

    hi,
    I have a requirement: in my site collection i have an announcement list. and in my site collection  some 600+ sub sites exist. sharepoint admin uploads an announcement into this rootweb's announcement list. now is there any way
    i can add the same announcement -which has title, description, date time etc .- to all the 600+ sub sites' announcement list?
    i know , if i write a list item event receiver i will be able to iterate through eacha nd every subweb of my site collec and add this item into those sub web's  announcement list. But, without writing an event receiver and creating and deploying
    another wsp and avoiding all those headache, is it possible to achieve this requirement?
    any other approaches are highly appreciated!

    Hi,
    As a workaround, we can create a winform application for admin use only to add the item to all the sub web's announcement list.
    Developing Sharepoint Windows Forms
    http://www.codeproject.com/Tips/566370/Developing-Sharepoint-Windows-Forms
    Best Regards,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Paypal Express Checkout Integration

    Hi All,
    I have paypal express checkout account. I want to integrate it with my apex application. So when a customer wants to pay, he can just click the paypal button on my app's page which takes him to the paypal payment screen.
    I would appreciate if someone tells me how to add paypal checkout button on the page?
    Thanks in advance.

    Hi,
    Did you actually read the document or just looked at the title and decided it was not what you wanted?
    Here is the text from the PDF document that talks about Express Checkout on Page 4.
    >
    <p>Integrating with the Express Checkout is a little more involved and requires calling three distinct APIs. You first establish with PayPal that you want to start an express checkout transaction by calling SetExpressCheckout. PayPal responds with a token which you will need for subsequent API calls and a redirect. In the call to SetExpressCheckout you pass a URL as a parameter to tell PayPal where to redirect back to. You then redirect to PayPal and pass the token you received.</p>
    <p>The consumer then chooses their payment option on the PayPal site and can optionally change their shipping address. Once they finalize the transaction at PayPal, they are redirected to the URL you provided in the call to SetExpressCheckout. Two parameters are passed with the URL you provide, token and payerid.</p>
    <p>You create a PL/SQL procedure that has exactly two parameters, token and payerid. This procedure is the URL you pass in SetExpressCheckout to let PayPal know where to redirect to once the transaction is done. The procedure looks up the Application Express session for your application using the token.</p>
    <p>Now that the consumer is back at your site, you will make a call to the second API, GetExpressCheckoutDetails. This retrieves information from PayPal about the consumer, such as their name, email, phone number, and shipping address. Your application can use that information to display a summary page and a Pay Now button.</p>
    <p>Finally, when the consumer clicks the Pay Now button, you call the third API, DoExpressCheckoutPayment. PayPal responds with an acknowledgement and transaction details which your application can store in a local table.</p>
    >
    As for your query
    >
    Then I copied the script in the html header section of my apex page. But the buy now button is being displayed in the top left corner of my page. How can I display it somewhere in the body of the page?
    >
    You can put the script into the Region Source, Region Header or Region Footer to get the position you want in the regions.
    Cheers,
    PS: You will find some good tips here as well http://www.apexskins.com/~andrewro/paypal/Paypal_Website_Payments_Standard_and_IPN_Integration.pdf
    Edited by: Prabodh on Jul 30, 2012 12:10 PM

  • How to add an item into the Newsstand

    How to add an item into the Newsstand.  Please do NOT reply using  "tech-language." Use standard- normal everyday English. Thanks,
    Don Otlin
    Franklin Square, NY

    Open Newsstand. Tap on the "Store" button in the upper right. Any newspaper or magazine you download from the store will appear in Newsstand.

  • Paypal express checkout doesn't display properly - Firefox 33.0.3

    Paypal express checkout doesn't appear to be displaying properly in firefox (link to screenshot below). I've tried it with Chrome & IE and it works fine, so can only assume this is a firefox bug.
    Screenshot:
    http://voodoo-london.com/ss.png
    I've tried everything in regards to clearing cookies & cache but still no luck.
    Can anyone offer any explanation or resolution for this?

    Separate Issue; Update your
    Flash Player '''v15.0.0.189 http://get.adobe.com/flashplayer/'''
    Please flag your last post as '''Solved Problem''' so other will know.

  • Paypal - express checkout issue

    My formcentral account Paypal express check out no loger working. I have contected  the adobe formcental suppor team with in last 3 weeks several time,  all I heard is case was escalated to advance support team. So far not a single attempt made to resolve the issue.
    My account ID - [email protected]

    Hi;
    I don't see the image attachments but I think I get what is going on...  I apologize for mis-leading you there, the page I mentioned is the old page, I saw it because of the cookies in my web browser when I tested your form, now that I have signed into and out of Paypal I get the expected new page that does not have as obvious of a "credit card payment" method...
    The reason you have seen two different landing pages is likely the same, cookie based, but none of this is controlled by FormsCentral, it is Paypal.  For alternate payment methods the new page has a "Checkout as Gues" option below the "Log In" button:
    Thanks,
    Josh

  • PayPal Express Checkout Error 13122

    We sell silver bars on line, one of the items we sell contain the word 'Lakshmi' in the title and description, customers getting error 13122 which is PayPal User Agrement Violation, when I remove the word customers are able to checkout. Any idea why this word violates paypal user agreement?

    Separate Issue; Update your
    Flash Player '''v15.0.0.189 http://get.adobe.com/flashplayer/'''
    Please flag your last post as '''Solved Problem''' so other will know.

  • Copy windows sharepoint services list items into another sharepoint server list

    My requirement I have one windows SharePoint services 2007 site list. one SharePoint server 2013 site. 1.I have to copy data from windows SharePoint services 2007 site list to SharePoint server 2013 site list. 2.when ever data changes in windows SharePoint
    services 2007 site list  data has to reflect into SharePoint server 2013 site list.
    Could u pls help on this

    Hi,
    According to your description, my understanding is that you want to copy data in SharePoint 2007 list to SharePoint 2013 list and the data in SharePoint 2013 list changes with the data in SharePoint 2007 list.
    You could use JavaScript client object model to retrieve SharePoint 2007 list items and copy them to other SharePoint 2013 list.
    An official documentation about how to retrieve list items:
    https://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    A similar post about how to retrieve and copy list items:
    https://social.msdn.microsoft.com/Forums/office/en-US/1d01a48f-c28b-467b-acd1-22e5fb266670/how-to-retrieve-list-items-and-copy-it-to-other-list-using-javascript-object-model?forum=sharepointdevelopmentprevious
    And you could use SharePoint event receive to monitor the list items.
    A post about how to use SharePoint event receive:
    http://blog.sharedove.com/adisjugo/index.php/2009/03/12/develop-and-deploy-a-sharepoint-event-receiver-from-the-scratch/
    Best Regards,
    Dean Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How do I add a line into an access control list?

    We have a user VLAN that allows connectivity to printer VLAN.  Printers connect and need snmp to communicate.
    New printers were brought in, and they need port 443 opened.  I was under the impression I could insert a line into an ACL(below).
    I have copied the production ACL to this test ACL (102) and it works fine when I changed the VLAN interface to use this ACL.  I copied and pasted, however, and the new ACL was easy to create and apply.  Since I have 30 more production switches to do this to, I was hoping I would not have to delete this ACL and recreate it.  I thought there was a way to "inject" a line into an ACL
    Any thoughts?
    access-list 102 permit udp any any eq bootps
    access-list 102 permit udp any any eq bootpc
    access-list 102 permit icmp 10.0.32.0 0.255.3.255 10.0.32.1 0.255.0.0 echo
    access-list 102 permit icmp 10.0.32.0 0.255.3.255 10.0.32.1 0.255.0.0 echo-reply
    access-list 102 permit icmp 10.0.32.1 0.255.0.0 10.0.32.0 0.255.3.255 echo
    access-list 102 permit icmp 10.0.32.1 0.255.0.0 10.0.32.0 0.255.3.255 echo-reply
    access-list 102 permit icmp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 echo
    access-list 102 permit icmp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 echo-reply
    access-list 102 permit tcp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq 443
    access-list 102 permit udp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq snmp
    access-list 102 permit tcp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq 161
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.32.0 0.255.3.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.64.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 log
    access-list 102 permit ip host 10.105.34.9 10.0.112.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.112.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.114.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.161.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.165.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.235.0 0.255.0.255 log
    access-list 102 permit ip 10.0.32.0 0.255.3.255 10.0.240.24 0.255.0.0
    access-list 102 permit ip 10.0.32.0 0.255.3.255 10.2.240.0 0.0.1.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.240.0 0.255.0.255 log
    access-list 102 deny   ip 10.0.32.0 0.255.3.255 10.0.241.0 0.255.0.255 log
    access-list 102 permit ip any any

    Use show ip-access lists to see the numbering:
    R1#sh ip access-lists
    Extended IP access list 102
        10 permit udp any any eq bootps
        20 permit udp any any eq bootpc
        30 permit icmp 10.0.32.0 0.255.3.255 10.0.32.1 0.255.0.0 echo
        40 permit icmp 10.0.32.0 0.255.3.255 10.0.32.1 0.255.0.0 echo-reply
        50 permit icmp 10.0.32.1 0.255.0.0 10.0.32.0 0.255.3.255 echo
        60 permit icmp 10.0.32.1 0.255.0.0 10.0.32.0 0.255.3.255 echo-reply
        70 permit icmp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 echo
        80 permit icmp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 echo-reply
        90 permit tcp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq 443
        100 permit udp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq snmp
        110 permit tcp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq 161
        120 deny ip 10.0.32.0 0.255.3.255 10.0.32.0 0.255.3.255 log
        130 deny ip 10.0.32.0 0.255.3.255 10.0.64.0 0.255.0.255 log
        140 deny ip 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 log
        150 permit ip host 10.105.34.9 10.0.112.0 0.255.0.255 log
        160 deny ip 10.0.32.0 0.255.3.255 10.0.112.0 0.255.0.255 log
        170 deny ip 10.0.32.0 0.255.3.255 10.0.114.0 0.255.0.255 log
        180 deny ip 10.0.32.0 0.255.3.255 10.0.161.0 0.255.0.255 log
        190 deny ip 10.0.32.0 0.255.3.255 10.0.165.0 0.255.0.255 log
        200 deny ip 10.0.32.0 0.255.3.255 10.0.235.0 0.255.0.255 log
        210 permit ip 10.0.32.0 0.255.3.255 10.0.240.24 0.255.0.0
        220 permit ip 10.0.32.0 0.255.3.255 10.2.240.0 0.0.1.255 log
        230 deny ip 10.0.32.0 0.255.3.255 10.0.240.0 0.255.0.255 log
        240 deny ip 10.0.32.0 0.255.3.255 10.0.241.0 0.255.0.255 log
        250 permit ip any any
    Then if you want to add something at line 245:
    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#ip access-list extended 102
    R1(config-ext-nacl)#245 deny ip host 1.1.1.1 host 2.2.2.2
    Now it should be done:
    R1(config-ext-nacl)#do show ip access-lists
    Extended IP access list 102
        10 permit udp any any eq bootps
        20 permit udp any any eq bootpc
        30 permit icmp 10.0.32.0 0.255.3.255 10.0.32.1 0.255.0.0 echo
        40 permit icmp 10.0.32.0 0.255.3.255 10.0.32.1 0.255.0.0 echo-reply
        50 permit icmp 10.0.32.1 0.255.0.0 10.0.32.0 0.255.3.255 echo
        60 permit icmp 10.0.32.1 0.255.0.0 10.0.32.0 0.255.3.255 echo-reply
        70 permit icmp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 echo
        80 permit icmp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 echo-reply
        90 permit tcp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq 443
        100 permit udp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq snmp
        110 permit tcp 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 eq 161
        120 deny ip 10.0.32.0 0.255.3.255 10.0.32.0 0.255.3.255 log
        130 deny ip 10.0.32.0 0.255.3.255 10.0.64.0 0.255.0.255 log
        140 deny ip 10.0.32.0 0.255.3.255 10.0.96.0 0.255.0.255 log
        150 permit ip host 10.105.34.9 10.0.112.0 0.255.0.255 log
        160 deny ip 10.0.32.0 0.255.3.255 10.0.112.0 0.255.0.255 log
        170 deny ip 10.0.32.0 0.255.3.255 10.0.114.0 0.255.0.255 log
        180 deny ip 10.0.32.0 0.255.3.255 10.0.161.0 0.255.0.255 log
        190 deny ip 10.0.32.0 0.255.3.255 10.0.165.0 0.255.0.255 log
        200 deny ip 10.0.32.0 0.255.3.255 10.0.235.0 0.255.0.255 log
        210 permit ip 10.0.32.0 0.255.3.255 10.0.240.24 0.255.0.0
        220 permit ip 10.0.32.0 0.255.3.255 10.2.240.0 0.0.1.255 log
        230 deny ip 10.0.32.0 0.255.3.255 10.0.240.0 0.255.0.255 log
        240 deny ip 10.0.32.0 0.255.3.255 10.0.241.0 0.255.0.255 log
        245 deny ip host 1.1.1.1 host 2.2.2.2
    Daniel Dib
    CCIE #37149
    Please rate helpful posts.

  • How to add one item into Unit of meas.when create an operand?

    I am creating an operand, I want to select KGAL in Unit of meas., but it is not in the lists, How can I add KGAL to the list?Thanks.

    Hi tiff512:
    The way is:
    SAP NetWeaver > General Settings > Check Units of Measurement.
    The help documentation says the following in relation to the creation of new units of measure:
    "If required, define new units of measurement according to the international system of units (SI) with the menu function Unit of meaurement -> Create.
    Here you have to make make specifications for:
    Display (including a descriptive Units of measurement text)
    Conversion (not applicable to units of measurement without dimensions)
    Data exchange (EDI) (optional)
    Application parameters"
    I hope it is helpful to you.
    Regards,
    David

  • How get custom parameter back in PayPal Express Checkout response

    I'm sending the custom parameter <input type="hidden" name="PAYMENTREQUEST_0_CUSTOM" value="101"></input>  Got back result Array ( [TOKEN] => EC-2R626219M62454427 [SUCCESSPAGEREDIRECTREQUESTED] => false [TIMESTAMP] => 2013-11-04T09:38:47Z [CORRELATIONID] => 2441b978c048b [ACK] => Success [VERSION] => 104.0 [BUILD] => 8334781 [TRANSACTIONID] => 7JM13596VP514480B [TRANSACTIONTYPE] => expresscheckout [PAYMENTTYPE] => instant [ORDERTIME] => 2013-11-04T09:38:46Z [AMT] => 1.00 [FEEAMT] => 0.33 [TAXAMT] => 0.00 [CURRENCYCODE] => USD [PAYMENTSTATUS] => Pending [PENDINGREASON] => paymentreview [REASONCODE] => None [PROTECTIONELIGIBILITY] => Ineligible [INSURANCEOPTIONSELECTED] => false [SHIPPINGOPTIONISDEFAULT] => false [PAYMENTINFO_0_TRANSACTIONID] => 7JM13596VP514480B [PAYMENTINFO_0_TRANSACTIONTYPE] => expresscheckout [PAYMENTINFO_0_PAYMENTTYPE] => instant [PAYMENTINFO_0_ORDERTIME] => 2013-11-04T09:38:46Z [PAYMENTINFO_0_AMT] => 1.00 [PAYMENTINFO_0_FEEAMT] => 0.33 [PAYMENTINFO_0_TAXAMT] => 0.00 [PAYMENTINFO_0_CURRENCYCODE] => USD [PAYMENTINFO_0_PAYMENTSTATUS] => Pending [PAYMENTINFO_0_PENDINGREASON] => paymentreview [PAYMENTINFO_0_REASONCODE] => None [PAYMENTINFO_0_PROTECTIONELIGIBILITY] => Ineligible [PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE] => None [PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => YYA4BXSJ722PJ [PAYMENTINFO_0_ERRORCODE] => 0 [PAYMENTINFO_0_ACK] => Success ) Custom parameter didn't return, I need the to update my DB after the purchase.

    Issue Closed:
    Basically I used the expresscheckout as the basis and added a couponcode textbox, did validation etc. and passed if off to a subsequent custom process to create the cart/product/discount and redirected it to cart view.

  • Paypal Digital Goods Express Checkout Merchant FEE

    Hello Everyone, I  have a client who wants to integrate paypal express checkout for digital goods, she wants to know if it will cost her EXTRA fee's to use this Express Checkout Digital Goods service will the transaction / merchant fee will be same just like paypal charges for regular checkouts. Please advice ASAP

    Hi BR,
    The list is still the same. Digital goods express checkout has not been added yet. You can find the supported payment gateways list at : http://helpx.adobe.com/business-catalyst/kb/supported-payment-gateway-providers.html
    Regards,
    Aish

  • Cannot "Add new Item" in my SharePoint 2010 custom lists

    Hi guys,
                All these days it was working fine and all of sudden now when i click on "Add new item" in the the custom lists which i have created in my SharePoint 2010 and fill in the fields and click "save",
    I am getting an exception...:( 
    Please HELP!!!
    Neo Alpha

    One more thread for the same issue
    http://social.msdn.microsoft.com/Forums/en-US/51f37f3b-18a3-4d6b-b90f-2a4240306bf8/when-update-a-folders-property-it-throw-a-comexception-0x81020089
    hope this will help you
    Senthilrajan Kaliyaperumal

  • Inserting items into List on a JSP

    I want to insert new items into a multiple select list from database
    on selecting an item from an existing list in a JSP.
    I am not sure how to do this.
    thanks

    This is basically performing partial page rendering. There is no way for HTML or JavaScript executing in a user's browser to communicate directly with Java or your database. You'll either have to "preseed" the values from the database into the HTML page using JavaScript, and then change the select list w/ JavaScript based on what the user selects (this is how it's usually done.)
    Or, you could do something like using a hidden IFrame as a data conduit to your JSP which sends JavaScript back to the browser and updates the select list with the new values. A little more tricky, and doesn't work w/ all browsers, but it would work better if the data in question can be arbitrarily large.
    Hope that helps.

  • How to add  the fields into combo ?

    Hi,
    I want to add the table fields into combo box. Now I am able to getting the columns from table but I don�t know how to add that columns in combo box.
    My jsp getting the columns from table.
    function metadata(){
         try {
         Connection con =  null;
         Class.forName("oracle.jdbc.driver.OracleDriver") ;
         con = DriverManager.getConnection("jdbc:oracle:thin:@10.60.4.25:1521:clopaydb","scott","tiger");
         String query = "SELECT * FROM emp";
               DatabaseMetaData dma = con.getMetaData ();
             Statement stmt = con.createStatement ();
              ResultSet rs = stmt.executeQuery (query);
              ResultSetMetaData rsmd = rs.getMetaData ();
              int i;
              int numCols = rsmd.getColumnCount ();
              for (i=1; i<=numCols; i++) {
              if (i > 1) System.out.print(",");
              System.out.print("\nThe Table Column list "+rsmd.getColumnLabel(i));
              rs.close();
              stmt.close();
              con.close();
              catch (Exception ex) {
              ex.printStackTrace ();
         }Please give me a sample code for add these items into combo. (I need JSP sample code )
    Thanks & Regards,
    Merlin Roshina

    function metadata(){
    try {??
    Are you sure on this ? Dont mix javascript function with a java method.
    Make a java bean and your method may return an ArrayList.
    In your JSP ..
    <select name="yourComboBox">
    <%
    // Make a For Loop for the arraylist
    String columnLabel = (String ) arrayList.get(i);
    <option value="<%=columnLabel%>"><%=columnLabel%></option>
    <%
    } // end bracing of for loop
    %>
    </select>
    Post your code based on the directions above then we can help you more on this if reqd.
    Probably you should look up into sample JSP ..JDBC sample codes on google.
    -Rohit

Maybe you are looking for

  • OSX Update Failed To Install. Now Mail and App Store won't open

    I'm currently running Mountain Lion on my unibody Macbook Pro. Last night I got a notification that there was an update (10.8.3 I beleive), so I opened up the App store and proceeded with the install process. The update details mentioned that this up

  • How do i change the $Date variable format on an Ironport ESA to be DD/MM/YYYY

    I have an Ironport ESA running ASyncOS 7.6 and i use the $Date variable in notification emails.  It is currently formatted in the US way of MM/DD/YYYY but we need it to be formatted as DD/MM/YYYY.  Is there any way to do this?  The time zone is corre

  • Is there a way to link to a pdf in a iframe and have the find box removed?

    Hello folks... We are working on a transcription process and would like to have the pdf in an iframe. The problem is that in order to make this as quick as possible for the transcriber, the iframe needs to be as small as possible. The find box comes

  • Output could not be issued

    Hi, We are in process of upgrade.now we are in testing face.When we testing vy printing sales order doucments from VF03 trasaction we are getting error message 'Output Could not be issue',but when we are trying to see print preview it appears correct

  • HT4623 Wi-Fi re: iphone 5

    My iphone 5 can't access the web via my wi-fi network; I keep getting an error message saying "Can't connect to network". There is a lock icon on the phone where the wi-fi symbol usually is, but I can't find reference to it in the manual. Any solutio