Problem to interpret a GET

Hi,
I have a problem to make the following task in a web project. I mean I should use servlet but I'm not sure.
1. I must call an URL from a web page, for example http://url1 (make a GET)
2. In a browser, the result of this GET is a HTTP 404 Error but the URL of the page has however changed : http://url2&ticket=123
3. I want to get the ticket parameter, so "123"
In order to do that I use the following code but the problem is that the "http://url2&ticket=123" is returned in the EXCEPTION !! Is there another way to proceed ?
try
               URL u = new URL(urlStr);
               try
                    URLConnection uc = u.openConnection();
                    InputStream in = uc.getInputStream();
                    int c;
                    while((c = in.read()) != -1)     System.out.write(c);
               catch(IOException ex2)
                    System.err.println(ex2);
          catch(MalformedURLException ex1)
               System.err.println(urlStr + " n'est pas une URL valide");
So the new URL is given by "System.err.println(ex2);" because "InputStream in = uc.getInputStream();" gives an Exception.
Is there another way to do that with a servlet ?
Thanks.
-- G

What BalusC was trying to confirm above was that you knew how to construct a valid URL. In your question, you said:
In a browser, the result of this GET is a HTTP 404 Error but the URL of the page has however changed : http://url2&ticket=123
Here http://url2&ticket=123 is invalid because *&* is used to separate parameters in the query string and *?* is used to separate the query string itself from the site name. So the correct URL would be http://url2?ticket=123.
Also, let me rephrase your question since it's kinda difficult to figure out what your problem is. You're saying that you want to access http://url2?ticket=xyz. The value of xyz keeps changing and you are actually redirected from http://url1 to this URL with a new ticket value each time.
Is this a correct interpretation? I've no idea how to go about this but perhaps my post will make it easier for someone else to help you out.

Similar Messages

  • I was told to update iTunes. The update failed. Now I can't open iTunes but get the following messages: The program can't start because MSVCR80.dll is missing from your computer. Try reinstating the program to fix this problem.  Then I get iTunes was not

    I was told to update iTunes. I did and it failed. Then every time I tried to open iTunes I get the following message: "The program can't start because MSVCR80.dll is missing from your computer.  Try reinstalling the program to fix this problem." Then I get the following: "iTunes was not installed correctly.  Please reinstall iTunes. Error 7 (windows error 126)." I have uninstalled and installed iTunes a couple of times with no luck. I cannot even access iTunes support

    Troubleshooting issues with iTunes for Windows updates - MSVCR80

  • Hi, I cant open a document I have been working on. It has previously been saved without a problem now all I get is a box stating that the file cannot be opened. Any suggestions please?

    Hi, I reecntly purchased a Mac and the Pages App. But now I find that I cant open a document I have been working on. It has previously been saved without a problem now all I get is a box stating that the file cannot be opened. It is visible in both the Pages Windows and under Recent Items but just will not open. Any suggestions please?

    Hi Colourdoodles,
    Maybe the document is corrupted. Can you open other Pages documents? Preview may open it. Right click (or control click) on the document in Finder and Open With > Preview.
    If that works, Edit > Select All, Edit > Copy. Then paste into a blank Pages document. Formatting may be messed up, but you will have editable text. Then Save (with a different name), close and see if you can open the new document.
    Regards,
    Ian

  • I had bought the iphone 5 four months ago. The problem is that it gets heated too much. I noticed it recently. What should I do? Should I take it to apple store to replace? Will they replace my iphone 5?

    I had bought the iphone 5 four months ago. The problem is that it gets heated too much. I noticed it recently. What should I do? Should I take it to apple store to replace? Will they replace my iphone 5?

    The Basic Troubleshooting Steps are:
    Restart... Reset... Restore from Backup...  Restore as New...
    Restart / Reset
    http://support.apple.com/kb/ht1430
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414
    If you try all these steps and you still have issues... Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • Got a Problem? How to Get Started

    Getting started on fixing your problem:
    Working with video editing on an NLE (Non Linear Editor) program can tax the most robust computers. Depending on many factors, this can be a daunting task, at best. Many of the components of one’s computer can be stressed, more than with almost any other operation, that it will ever perform.
    Getting help on the forum can seem almost as daunting, as the first thing that a poster is likely to encounter is a list of questions, before any answers. This is the natural flow, because people are trying to help remotely. They cannot come to your office and sit behind you to determine your computer system’s capabilities, and observe just what you are doing, when and how you are doing it. Do not be put off by these questions, as they are very necessary and will very likely give the respondents some clues on where to look for your problem.
    Problems can normally be broken down into these categories:
    1.) System
    2.) Assets (the Audio, Video and still images)
    3.) Project (how it is setup and with which Preset)
    4.) Workflow (what you are doing, and how you are doing it)
    If you prepare a checklist, before you post your problem, it will save everyone a great deal of time, and will likely yield your answer much more quickly. The more detail that you furnish, the fewer questions will remain, that have to be asked. Remember, you have to be the "eyes" for the others on the forum, if they are expected to help you. They could be thousands of mile away, in other time zones, and will not know about your system, your Assets, your Project or your workflow, until you tell them. Help them get started quickly, by telling them in your first post. Do your "homework," so they do not have to ask questions for the first five responses, and can start giving you answers much more quickly.
    System:
    Be very specific about your computer. Just saying that "I have a Dell" doesn’t tell them much of anything. List your CPU type and speed, i.e. Core2 Quad Q6700 2.3GHz. Same for your RAM, i.e. 4GB of DDS. Also, list your Video Card, type, connection and driver number and date. Same for your Audio System. Note: most of this data can be found in Control Panel>System>Hardware>Device Manager. Pointing people to a URL on your computer company’s Web site isn’t a bad idea, but giving the exact details of your system is far, far better. It is likely that that Web site will have the general configuration, and who knows if that is exactly what you bought. List it for them, so they do not have to go and guess, and write down the specs. of your system.
    One of the most important aspects of your system will be the I/O sub-system. What is that, you might ask? Well, it’s your HDD’s (Hard Disk Drives). The important info is how many physical HDD’s do you have. List their size, their speed, their connection, the amount of free, defragmented space and how they are allocated. This would look something like this: "3x 200GB SATA II. Drive C:\ OS, programs and Windows Virtual Memory with 185GB free, D:\ media with 120GB free, E:\ Project files, output and Scratch Disks with 150GB free." If you have any drive partitioned (not a good thing nowadays), let everyone know and give details. If you have a RAID, give full details on how it is managed, the type and how it is used in your system. [As an aside, most RAID’s should not really be considered for a system drive, unless one has built in redundancy in the RAID, i.e. 3, or more, physical disks. Remember, this info can be critical. If you have CD/DVD burners, list them and their connections. If you have external HDD’s, list them with the same details as for your internal HDD’s.
    Next, tell about your Windows Virtual Memory (Page File). How large is it, where is it located on your system and how is it managed, i.e. dynamically by Windows, or static? Again, this can be critical. For info, you will need to go to Control Panel>System>Advanced>Performance and look. In the Settings>Advanced, you should see things like Process Scheduling, Memory Usage and Virtual Memory. This is where you will find the answers. Note: depending on which OS one has, the exact location and syntax may differ.
    While we’re on the OS, list the exact OS that you have, i.e. Vista Ultimate 64-bit SP-2 with all updates and hot-fixes.
    What version of the NLE are you using and has it been updated, i.e. PE3.0.2.
    Finally, list any other programs, that might be in use, while you are editing, such as MSN Messaging, etc. These can be critical, even though you are basically editing video.
    Assets:
    Give full details on your Assets. Just saying "a bunch of .AVI’s" tells people nothing. Be very specific with the details. See this ARTICLE on what info to give, and how to obtain it. Same for your Audio and for your still images. Size in pixels, file type, etc., are very important for the stills, and file type. Sample-rate and sample size are important for the Audio.
    Project:
    How is your Project setup? Which Preset did you use? What is the Duration of your Timeline. This gives someone the "lay of the land," so to speak and is very important. Note: your Project Preset should match your Video Assets. You can always Export/Share to some other frame size, or format, but your Project should match your Video Assets.
    Workflow:
    How have you arranged your Assets on the Timeline allows someone to "see" your Project in their mind. Information such as one 00;10;00;00 AVI (remember, you will have furnished complete details on those AVI’s, or MPEG’s when you listed your Assets above) on Video Track 1 (VT1) with its Audio on Audio Track 1 (AT1). One AVI used as a PiP (Picture in Picture) on VT2 with its Audio on AT2. One MP3 soundtrack for the full Duration on Soundtrack and my Narration on the Narration Track. List any Transitions, or Effects used. If you have Titles, list them. If you have any Keyframing used, list where and what they control.
    List exactly what you are doing and to which Asset you are doing it, when your problem occurs. If you are doing something like Export/Share, list the full settings (Presets) used, and be sure to mention any other tasks being performed by your computer, while you are doing the Export/Share.
    If you have already done some trouble shooting, list what you have done and the complete results. Were there any error messages? If so, give the full description. To say, "I had error messages," tells people nothing. What exactly did they say?
    This information will help people get right to your problem and will get you up and running much more quickly.
    As an aside, think about the title of your post. Saying "Problem" is not good enough. Instead, something like "PE7 Fails on Share to MPEG-2" would be better. First, you are trying to let everyone know something about your Problem, so they will see it, and be interested in helping you. If you are having an Audio issue, mention "Audio" in the title, so the right people will find your post. Not everyone knows everything about all aspects of Video. You want the right people to see your post and to be working with you, to fix your problem. Also, later on, it is good to have a title that will be easily found by others, who may have the same exact problem. If you get an answer that works, please post back that success, so others, finding your post, will know what worked, and what did not. Note: do not put your entire post into the title. That is just tough to read and understand. Use a few words, but make them the right words.
    Other useful links:
    Get Help Quickly
    FAQ's
    System Crashes
    PE Help
    Forum Etiquette
    Help others to better help you.
    Hunt

    Hi Bill, Ho
    w or more like where do I post a question.  I can go to a forum page wher
    e there are questions but there is no place to ost a question.
    If you could clear up this I would greatly appreciate it.  I've been looking for 2 hours.
    Thank you!
    Cindy

  • I have a client that uses Windows that has recently told me she can no longer open the PDFs I send her. I can't find this elusive "Always Send Windows-Friendly Attachments" setting that I have read may solve my problem. Can someone get me there?

    I have a client that uses Windows that has recently told me she can no longer open the PDFs I send her. I can't find this elusive "Always Send Windows-Friendly Attachments" setting that I have read may solve my problem. Can someone get me there?

    Dear Dan,
    It was from InDesign that I was creating the shared pdfs. I was one of two Mac drivers in a corporate sea of Win users and had to make the change I mentioned in order for the Win users to see my pdfs for review. The difference from what you appear to be doing was that were all on an MS Exchange Server so the files were shared over the company's Exchange Server e-mail system. However, some of these files occasionally went to outside users via regular e-mail and those people had no issues either.
    So what I did was tested and worked for years.
    You might look at the Adobe forums or Knowledge Base to see if that is a reported issue with newer version of CS. I was on CS2 when I was doing this, and the other Mac driver was on CS3 but had no problems either.
    Some Win users I've talked to find a problem opening some pdfs (not mine) in general and found they had to open Reader first and them open the file from Reader's File menu. That most often happened if the client was using an outdated version of Reader.

  • I have been exporting lightroom webgaleries to my iweb site without any problem.  Suddenly I get the error message "finder can't complete the operation because some data can't be read or written" - error code -36 - thoughts?

    i have been exporting lightroom web galleries to my iweb site without any problem.  Suddenly I get the error message "finder can't complete the operation because some data can't be read or written" - error code -36 - and the move to the sites folder on my idisk fails..... thoughts?

    Try this community: MobileMe on my Mac: MobileMe: Apple Support Communities.
    And you can continue to use iWeb for some time to come. The following will explain:
    It's now confirmed that iWeb and iDVD have been discontinued by Apple. This is evidenced by the fact that new Macs are shipping with iLife 11 installed but without iWeb and iDVD.
    On June 30, 2012 MobileMe will be shutdown. HOWEVER, iWeb will still continue to work but without the following:
    Features No Longer Available Once MobileMe is Discontinued:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    ◼ MobileMe Gallery
    All of these features can be replaced with 3rd party options.
    I found that if I published my site to a folder on my hard drive and then uploaded with a 3rd party FTP client subscriptions to slideshows and the RSS feed were broken.  If I published directly from iWeb to the FPT server those two features continued to work correctly.
    There's another problem and that's with iWeb's popup slideshows.  Once the MMe servers are no longer online the popup slideshow buttons will not display their images.
    Click to view full size
    However, Roddy McKay and I have figured out a way to modify existing sites with those slideshows and iWeb itself so that those images will display as expected once MobileMe servers are gone.  How to is described in this tutorial: #26 - How to Modify iWeb So Popup Slideshows Will Work After MobileMe is Discontinued.
    In addition the iLife suite of applications offered on disc is now a discontinued product and the remaining supported iApps will only be available thru the App Store from now on.
    HOWEVER, the iLife 11 boxed version that is still currently available at the online Apple Store (Store button at the top of the page) and those copies still on the shelves of retailers will include iWeb and iDVD.

  • I have a MacBook Pro and OS10.6 and am trying to log into a site that requires me to enter a code from a picture ... problem is all I get on the screen is a white '?' in a blue box. What do I need to display the picture?

    I have a MacBook Pro and OS10.6 and am trying to log into a site that requires me to enter a code from a picture ... problem is all I get on the screen is a white '?' in a blue box. What do I need to display the picture?

    Reload the page. If it doesn't load, choose Activity from Safari's Window menu, find that picture in the list, and see what it says to the right; this may reveal what the problem is.
    (91827)

  • I have a BTHub4 - My iMac, iPhone, and children's iPads all connect to the internet no problem. I cannot get my 2 MacBook Pros or my partners MacBook Air to connect. Have tried diagnostics - says to change DNS but  it is correct.

    I have a BTHub4 - My iMac, iPhone, and children's iPads all connect to the internet no problem. I cannot get my 2 MacBook Pros or my partners MacBook Air to connect. Have tried diagnostics - says to change DNS but  it is correct. I have re-set both router and all laptops - no joy. They can all see the network but cannot connect.

    This is extraordinary. I have moved the router and also tried resetting it to its factory strings.  We have had this router for over a year and all our devices have always worked. Now all four laptops will not connect to the internet. Only one oMac and our phones and iPad.
    I have had far more devices running at once before but now all laptops are timing out on connection. Some say this iIP address is already being used but if I manually set to a slightly different IP address it does not help, noir if I manually set to the correct IP address. Why would all our laptops (four) suddenly be unable to connect?

  • Problem accessing iTunes. Getting error message "The iTunes Library Extras.itdb file is on a locked disk"?

    Problem accessing iTunes. Getting error message "The iTunes Library Extras.itdb file is on a locked disk"

    Close iTunes, delete iTunes Library Extras.itdb from your iTunes folder, start iTunes. iTunes should rebuild the file automatically.
    tt2

  • Has anyone had a problem with Draft Emails getting sent with Mac OS 10.8.2? It just happened to me and sent a few drafts out to a potential employer I planned on sending out torrow.

    Has anyone had a problem with Draft Emails getting sent with Mac OS 10.8.2? It just happened to me and sent a few drafts out to a potential employer I planned on sending out tomorrow.

    Hi, one question & one suggestion...
    What possible things are connected at home but not at the store, inlude every cable, etc.
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • I have an ipad3(wifi  cellular). Now i want to upgrade my iOS5.1 to ios 7. But download speed in our country is too slow(100kbps). It can be disconnected anytime. Is there any problem if net connection get disconnected while upgrading ios? Please ans me.

    I have an ipad3(wifi +cellular). Now i want to upgrade my iOS5.1 to ios 7. But download speed in our country is too slow(100kbps). It can be disconnected anytime. Is there any problem if net connection get disconnected while upgrading ios? Please ans me.

    haha, so now i'm thinking. I'm learning the terminal as fast as i can but there are several lines of codes and commands in there that throws up red flags to me that i don't fully understand. It just looks fishy too me. It would be highly appreciated if someone could just check this out just to tell me that i don't need to worry about it. Or point me in the right direction. I just feel un easy about this. ha.

  • HT204053 i couldn't open new terms and conditions of icloud, and so i can't use the icloud on my device iphone 5, this problem appears, when I get new ios 7

    i couldn't open new terms and conditions of icloud, and so i can't use the icloud on my device iphone 5, this problem appears, when I get new ios 7

    Try download the Find My Friends app and signing in to accept the terms and conditions there.

  • Help my hard drive is being taken up by about 200gb of "other" memory, i am running time machine on an imac does does cause the problem how can i get rid of all "other" memory

    my problem is that most of my imac hard drive is being taken up by 200gb of "other' memory
    i am running time machine does this contribute
    how can i get rid of all "other" memory
    thanks

    JKOL96 wrote:
    i am running time machine does this contributex
    Some, possibly, but shouldn't be a problem.
    how can i get rid of all "other" memory
    Much of it is OSX and other things needed to run your Mac.
    See The Storage Display for an explanation, and don't miss the link to Where did my Disk Space go?

  • Apple Please sort out the V 11.1.4 problems as I cant get iTunes to work now. You need to have a new version asap

    Please sort out the V 11.1.4 problems as I cant get iTunes to work now. You need to have a new version asap

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

Maybe you are looking for

  • Yoga 2 pro mode switching problem

    there is problem on my yoga 2 pro. My yoga 2 pro should be in the laptop mode, but it changed to tablet mode suddenly and changed back to laptop mode after 5 seconds. This is not only the first time, it had happened about ten times since I bought it

  • Forwarding to a new jsp page from one jsp  EXCEPTION occured....Help me out

    When i was trying to forward control to invalidSession page from a JSP if someone tries to log in without entering password....he must be directed to invalidsession page... but this is giving exception on line 6... The server encountered an internal

  • Apps won't update after installing iOS 8

    After having installed iOS 8 on my IPhone 5, which has never let me down before, I have had this ridiculous problem, which goes like this - I can't update the existing apps on my phone. Anyone else with a similar problem?

  • I am trying to connect my mac air with my tv but it is not connecting

    hi i am trying to connect my mac book air with my tv but it is not connecting . please tell me the procedure .

  • Mp4 Video on a iPad

    Hi there, I have the following problem. I have integrated into Captivate 8 a short video sequence in a slide. The Project is published as HTML5 file incl. Scorm 2004 Revision 4 in ILIAS LMS. This all works great so far. I can see the video sequence o