JSP with URLConnection or HttpsURLConnection, please help!

Thanks in advance for looking at this post :)
I have to develop an application. This application consists of a JSP form that collects credit card information. The form using a java bean to validate user input.
Once the input has been validated I need to connect to a URL and transmit this collected data and receive a response from the remote server. My questions are:
1. My plan of action is to write the java code required to connect to the URL and transmit the data within that java bean itself. Is this an acceptable way to handle it? OR should I make a separate bean for this, OR should I embed the code directly into the JSP?
2. My server is set up with a secure certificate. I need to connect to URL using the https protocol. Do I use URLConnection or HttpsURLConnection? I already wrote the code using URLConnection, and I can connect and receive a response from the server. However the test I ran is just a system check (still connecting to https://). I am concerned about the security of data being transmitted via a URL Connection (obviously need to make sure this is encrypted going out as well as coming in since it will contain credit card info).
I appreciate the response, I need to get this figured out asap.
Thanks!

By the way thanks for your input - sorry for the delay with the dukes... I got URLConnection working and from what I can tell all is good. Now posting to set a timeout feature on URLConnection:
http://forum.java.sun.com/thread.jsp?forum=31&thread=386270

Similar Messages

  • Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!

    Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!

    ... when i click go - connect to server, it comes up with connection failed.
    If you're trying to connect to a Bonjour server on the remote network, that won't work over a layer 3 VPN. Use something like Hamachi or one of the SSH-tunnelling Bonjour proxy apps for that.

  • I want to bring over music from my iTunes library on iMac to an ipod touch with another apple id. please help

    I want to bring over music from my iTunes library on iMac to an ipod touch with another apple id. please help. Is this possible. In former versions of itunes this was posible. I can't find the solution is iTunes 11

    Perhaps those apps require a newer version of iOS than is compatible with your iPod.

  • HT4199 I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need a

    I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need advice.

    What type network is yu router set up for? The 4G iPod can only connect and see 2.4 GHZ networl like B, G and the 2,4 GHz N. There is also a 5 GHz N but the iPod will not even seethat network.
    See:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS: Recommended settings for Wi-Fi routers and access points

  • What's wrong with my code? please help....

    when display button is clicked it must diplay the remarks but it didn't happen...
    what's wrong with my code? please help
    here is my code.....
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class Area extends Applet implements ItemListener,ActionListener
         {Label arlbl = new Label("AREA");
          Choice archc = new Choice();
          Label extlbl = new Label("EXPENDITURE TYPE");
          CheckboxGroup extchk = new CheckboxGroup();
              Checkbox fchk = new Checkbox("FOOD",extchk,true);
              Checkbox schk = new Checkbox("SHELTER",extchk,false);
              Checkbox echk = new Checkbox("EDUCATION",extchk,false);
              Checkbox uchk = new Checkbox("UTILITIES",extchk,false);
          Label exalbl = new Label("EXPENDITURE AMOUNT");
          TextField exatf = new TextField("",20);
          Label remlbl = new Label("REMARKS");
          TextField remtf = new TextField("",30);
          Button disbtn = new Button("DISPLAY");
          Button resbtn = new Button("RESET");
          String display;
          public void init()
              {add(arlbl);
               archc.add("MANILA");
               archc.add("MAKATI");
               archc.add("QUEZON");
               archc.add("PASAY");
               add(archc);
               archc.addItemListener(this);
               add(extlbl);
               add(fchk);
               fchk.addItemListener(this);
               add(schk);
               schk.addItemListener(this);     
               add(echk);
               echk.addItemListener(this);
               add(uchk);
               uchk.addItemListener(this);
               add(exalbl);
               add(exatf);
               add(remlbl);
               add(remtf);
               add(disbtn);
               disbtn.addActionListener(this);
               add(resbtn);
               resbtn.addActionListener(this);
         public void itemStateChanged(ItemEvent ex)
              {int n = archc.getSelectedIndex();
               if(n==0)
                   {if(fchk.getState())
                         {exatf.setText("10000.00");
                         display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("15000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("24000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("8500.00");
                        display = archc.getSelectedItem();
              if(n==1)
                   {if(fchk.getState())
                        {exatf.setText("5000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("11000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("7500.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("24000.00");
                        display = archc.getSelectedItem();
              if(n==2)
                   {if(fchk.getState())
                        {exatf.setText("13000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("7000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("27000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("6000.00");
                        display = archc.getSelectedItem();
              if(n==3)
                   {if(fchk.getState())
                        {exatf.setText("6000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("9000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("15000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("19000.00");
                        display = archc.getSelectedItem();
         public void actionPerformed(ActionEvent e)
              {if(e.getSource() == disbtn)
                    {String amtstr = exatf.getText();
                     int amt = Integer.parseInt(amtstr);
                        {if(amt > 8000)
                             {remtf.setText(display + " IS ABOVE BUDGET");
                        else
                             {remtf.setText(display + " IS BELOW BUDGET");
              if(e.getSource() == resbtn)
                   {archc.select(0);
                   fchk.setState(true);
                   schk.setState(false);
                   echk.setState(false);
                   uchk.setState(false);
                   exatf.setText("");
                   remtf.setText("");
    Edited by: lovely23 on Feb 28, 2009 11:24 PM

    Edit: thanks for cross-posting this question on another forum. I now see that I wasted my time trying to study your code in the java-forums to help you with an answer that had already been answered elsewhere (here). Do you realize that we are volunteers, that our time is as valuable as yours? Apparently not. Cross-post again and many here will not help you again. I know that I won't.

  • I have created a form which needs to be completed once a week for 6 weeks. On completing week 1, weeks 2 - 6 are completed at the same time with week 1 information. please help?

    I have created a form which needs to be completed once a week for 6 weeks. On completing week 1, weeks 2 - 6 are completed at the same time with week 1 information. please help?

    Hello, thanks for replying.
    Yes they just copy to the next page, the fields are the same. The document is an observation to school lessons so it needs to be consistent but with different data on.

  • Cant download itunes, because ' there is an error with windows installer package' please help?

    cant download itunes, because ' there is an error with windows installer package' please help?

    I am getting the same message when I try to install the latest version of iTunes, I am running on Windows Vista Home Premium. I have tried so many different things to try to correct this and have now completly unistalled it from my laptop..... Now I have no iTunes what-so-ever on it and still can't install it. I found an older versin of iTunes and it installed without any problems, but I can't access it because my library was created on a newer version! Talk about frustrated..... WE NEED HELP!!!!!

  • HT5312 I forget answer to my qustion with rescue email adrees please help me and send the answer to my main mail. Thank you very much

    I forget answer to my qustion with rescue email adrees please help me and send the answer to my main mail. Thank you very much

    We are fellow users here on these forums, you're not talking to iTunes Support.
    If you don't have access to your rescue email account, or you don't have one on your iTunes account, then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to add/change a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • I want to put music on my iPhone but when I want to do it it keeps telling me that I can't to id with a sign. Please help me?

    I want to put music on my iPhone but when I want to do it it keeps telling me that I can't to id with a sign. Please help me?

    You will have to upgrade your operating system version and possibly your whole computer.  We cannot provide more information easily until we know more about your system.
    Get more information about your computer. Go to the Apple in the upper left corner of any window, then "About This Mac", then "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).
    Apple does tell you about required equipment for the iPhone -- in 8 point medium gray type on a light gray box.   The Store associates kind of automatically assume everybody is running a new model computer and the one I met when we bought our iPhone had never seen a pre-2008 Mac and was somewhat puzzled why anybody would own such an antique.

  • I am trying to buy an app (Aperture). I don't see a "buy" icon in the app store. If I go to Apple site, there is a buy icon but when I click it, I get a dialogue box saying the link needs to be opened with an application. Please help. Thanks.

    I am trying to buy an app (Aperture). I don't see a "buy" icon in the app store. If I go to Apple site, there is a buy icon but when I click it, I get a dialogue box saying the link needs to be opened with an application. Please help. Thanks.

    Hi ...
    Installing the OS X Lion Update 10.7.3 (Client Combo) will reinstall the App Store for you.
    Restart your Mac after the combo is installed then try purchasing Aperture.

  • I need to install the find my iPhone app on my ipad, it's won't install. Any reasons. Do I need to change something in my settings? I am up to date with my ios7. Please help!

    I need to install the find my iPhone app on my ipad, it will not install. Any reasons. Do I need to change something in my settings? I am up to date with my ios7. Please help!

    Try closing the App Store app via the iPad's taskbar and then do a soft-reset and see if you can install it after the iPad has restarted. To close the App Store : double-click the home button to open the taskbar, and then swipe or drag the App Store app's screen from there up and off the top of the screen to close it, and click the home button to close the taskbar.
    Soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    The Adobe auto updater is pretty decent in CS6.  Just go to the Photoshop Help menu > Updates.
    You will be able to update ACR, Photoshop and Bridge right there, if there are in fact updates available.

  • I reset my phone and it now receives calls that were meant for my husband. I know how to fix this with messaging and facetime, but can't seem to find how to make it stop with the calls. Please help.

    I reset my phone and it now receives calls that were meant for my husband. I know how to fix this with messaging and facetime, but can't seem to find how to make it stop with the calls. Please help.

    It may be due to Continuity
    The following quote is from  Connect your iPhone, iPad, and iPod touch using Continuity
    Turn off iPhone cellular calls
    To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls.

  • I have downloaded adobe download assistant but when ever i click on sign in it says 'error communicating with adobe (error 100). please help.

    I have downloaded adobe download assistant but when ever i click on sign in it says 'error communicating with adobe (error 100). please help.

    Boskou41043636 for information on how to resolve error 100 please see Troubleshoot Adobe Download Assistant.

  • TS2446 How do I unlock my daughters iPod touch with no computer? Please help!

    HOw do I unlock my daughters iPod touch with no computer? Please help me!

    If she set up Find My iPod on it before this happened, follow the instructions listed under "If you don't have access to a computer" here: http://support.apple.com/kb/HT1212.  Otherwise, you would have to use a computer to restore it by following one of the other two solutions listed at the bottom of the article.

Maybe you are looking for

  • Run time error while creating a sales order by va01

    hi ,      while  i am creating a sales order a runtime error occurs as i fill entry for sole to party and then material and quantity and as i press enter. the run time error is: error in current abap program "saplv61z"  had to be terminated because i

  • Power Mac - G4 QuickSilver and dial-up problem..

    Hi all, first post here please excuse my naiviety! As well as owning a Macbook I've been helping a friend out with their 9-10 yr old G4 Power Mac. The problem started with it not being able to power on so I tried resetting CUDA etc; that didn't work

  • Either there is no default mail client or the current client..

    Is there a fix for the error message (either there is no default mail client or the current mail client cannot fulfill the message request. Please run Microsoft Outlook and set is as your default mail client) when trying to open a PDF file?. This err

  • Video playback to TV on older iPod

    I have an older iPod, Gen 2 or 3 (bought Spring '04). Can I move a file recorded by my PC (a TV show) via Windows Media Player onto my iPod, then take the iPod on the road, use video cables from www.speckproducts.com (which I know would work with new

  • RFC to SOAP Scenario error

    Hello ALL I am trying to working in RFC to SOAP scenario in sap pi 7.31 single stack system.with help of blog **************** - Scenario on RFC to SOAP i am trying to pass input values from ECC through RFC  to web service . while sending data using