Call a number of servlets with the same session

Hi,
for a purpose of performance testing I need to write a servlet that will call a number of servlets in a existing web application.
It will measure a average execution time of each servlet. The sequence of servlet names and arguments is stored in a xml file, which is accessed by the testing servlet.
For example:
<servlet>
        <name>ListExtras</name>
        <params>?dateLocale=en&dateFormat=dd/MM/yyyy&contentId=&staticDateFormat=dd MMMM yyyy&interfaceid=1243941814581</params>
</servlet>
<servlet>
        <name>ListFilters</name>
        <params>?dateLocale=en&dateFormat=dd/MM/yyyy&contentId=&staticDateFormat=dd MMMM yyyy&interfaceid=1243941814581</params>
</servlet>Moreover such testing scenario will be executed simultaneously for several user - I will create a thread for each user and call the sequence of servlets from the xml file. Results of measurements will be stored in a file.
In our web application a gatway between client and server in a Dispatcher class which forwards client requests to a specific servlet according to provided command parameter.
So having a servlet name and parameter I do as follows:
stopWatch.start();
URL servlerURL= new URL(dispatcherURL  +servletParams+  "&command="  +servletName);+
+BufferedReader in = new BufferedReader(new InputStreamReader(servlerURL.openStream()));+
+stopWatch.stop();+
+String inputLine;+
+while ((inputLine = in.readLine()) != null) {+
+     result.append(inputLine);+
+}+
+in.close();+
++
This way I can measure time of servlet execution and moreover I can store the result of execution in StringBuffer.
The problem is that each time I call the Dispatcher this way I get a different sessionId - so that objects stored in the session object by previous servlet cannot be accessed by the following one.
I tried calling the Dispatcher using an other RequestDispatcher, like this:
+RequestDispatcher rd = getServletContext().getRequestDispatcher("/xml/Dispatcher"+  servletParams  +"&command="+  servletName);But this throws java.lang.IllegalStateException: Cannot forward after response has been committed.
So the question is: How can I call various servlets, provide request parameters and keep the same sessionId for each call? And BTW sorry for such a long post, but I wanted to explain the problem is details, because it might be that you will provide a completely different solution.
Thank you in advance for answering!

Or investigate the [catus framework|http://jakarta.apache.org/cactus/].
If you understand very well how j2ee web applications work and then understand the cactus f/w, you can easily tweak it to meet your requirements.
ram.

Similar Messages

  • NUMBER OF COMPUTERS WITH THE SAME SERIAL NUMBER

    Hi, I am a Creative Suite 6 user and I need to know in how many computers can I run the applications with the same serial number.
    Thanks,
    Paloma

    El nombre inbdica que éste es un foro en español:.
    Para los programas Adobe, lo usual es dos instalaciones, en dos computadores diferentes, y siemnpre que el programa no se use al mismno tiempo en ambos (por ejemplo, uno en la casa y el motro en nel trabajo)

  • Can 2 invoice number be created with the same Purchase Order number

    HI,
    I have created one invoice number with a Purchase order number 4500020000. Now is it possible to create a another invoice number with the Same PO

    In me23n transaction go to Invoice tab(In items), there will be a check box for <b>Final Invoice</b>. If it is checked, full amount is invoiced.
    The same can be checked in table EKPO.
    Field EREKZ = 'X' means final invoice done.
    another method is:
    foe each item:
    go to table EKPO and see the quantity.
    then go to table ekbe and get all the invoiced quantity by passing VGABE = '2'. for the PO item.
    add all the records with SHKZG = 'H' and subtract the total of all SHKZG = 'S' records.
    If this quantity is equal to the ekpo quantity, then there is no more quantity to be invoiced.
    Get the PO Item quantities
      SELECT EBELN
             EBELP
             MENGE
        FROM EKPO
        INTO TABLE IT_EKPO
       WHERE EBELN IN R_EBELN.
    Get the Invoice Receipt Documents for the POs
        SELECT EBELN
               EBELP
               BEWTP
               MENGE
               GJAHR
               BELNR
               BUZEI
               SHKZG
          FROM EKBE
          INTO TABLE IT_EKBE
          FOR ALL ENTRIES IN IT_EKPO
         WHERE EBELN = IT_EKPO-EBELN
           AND EBELP = IT_EKPO-EBELP
           AND VGABE = C_VGABE_2.
    logic to check if the IR Quantity equals the PO Quantity for each Item
      LOOP AT IT_EKPO.
        CLEAR V_BPMNG.
    For each line item, calculate the total Invoiced Quanity
        LOOP AT IT_EKBE WHERE EBELN = IT_EKPO-EBELN
                          AND EBELP = IT_EKPO-EBELP.
    Change the sign of the quantity for debit
          IF IT_EKBE-SHKZG = C_SHKZG_H.
            IT_EKBE-MENGE = -1 * IT_EKBE-MENGE.
          ENDIF.
          V_BPMNG = V_BPMNG + IT_EKBE-MENGE.
        ENDLOOP.
    If the PO Item Quantity is equal to IR Quantity
        IF IT_EKPO-MENGE = V_BPMNG.   "ARAO
    write:/ 'No more quantity to be invoiced'.
        ENDIF.
      ENDLOOP.
    Regards,
    ravi
    Message was edited by: Ravi Kanth Talagana

  • Is it possible to do multiple recordings with the same session.

    I appologize in advance for this but here goes.  I want to make several background narrations for some video clips.  Using Audition 3, I start out by recording in the multitrack view on the top track.  Because of mistakes, this takes several audio clips.  After finishing, I rightclick on one of the clips, select bounce to new track all audio tracks and this creates a mixdown.  Moving to edit view, I do noise correction, then back to multitrack where I export the mixdown as .wav.
    THen I select the clips in the top track and mixdown in the next track and hit delete.  However, when I hit the arming 'R" and then the record button, the cursor doesn't move more than a milimeter and then keeps going back and forth.
    I was trying to do multiple narrations with just this one session, so is that possible?  Do I have to do a separate session for each separate mixdown?
    If there is something I'm doing wrong, I would appreciate any directions.
    Thanks in advance,
    John Rich

    Blue_Devil1 wrote:
    I appologize in advance for this but here goes.  I want to make several background narrations for some video clips.  Using Audition 3, I start out by recording in the multitrack view on the top track.  Because of mistakes, this takes several audio clips.  After finishing, I rightclick on one of the clips, select bounce to new track all audio tracks and this creates a mixdown.
    Let me stop you right there, for a start, because what you are doing still isn't clear, although I think that I can guess at it...
    Creating a bounce-down is not the same thing as creating a mixdown. If each of these clips you've recorded constitutes a separate file, which it will if you hit the stop button rather than pause - which it sounds as though you have, otherwise you wouldn't be able to separate them so easily - then just double-clicking on the clip will open it immediately in Edit View anyway. And the bounce-down options don't mention tracks, they mention clips - all audio in session, selected range or selected clips. Yes you get one file as a result - but it's literally just the clips as they stand run together not via the mixer, any effects or automation system - which it would have to be if it were a proper mixdown. A bouhce is exactly what it says - just bouncing the clips.
    THen I select the clips in the top track and mixdown in the next track and hit delete.  However, when I hit the arming 'R" and then the record button, the cursor doesn't move more than a milimeter and then keeps going back and forth.
    I was trying to do multiple narrations with just this one session, so is that possible?  Do I have to do a separate session for each separate mixdown?
    Hmm... when I hit the delete key, nothing happens - I have to right-click to get stuff to delete like that. But you most certainly can re-record in a session, yes. If you get the cursor moving just a fraction of a mm, then almost certainly this means that instead of moving the cursor back to the start, you've moved it slightly with the mouse pressed and created a very small range.So before you record, hit the 'Go to Beginning or Previous Marker' key (next to the play looped key) and try again - it should work properly then.
    And of course you haven't deleted all the files - they are still there on your system and will remain so unless you delete them outside Audition, either the hard way, or using MediaSweeper.
    Your workflow is, to say the least, a little strange. If I were recording narrations (which I do sometimes), I'd record in Edit View, and keep just the files or takes I wanted. Then I'd import these into Multitrack view, arrange them, crossfade them, whatever, and then do a mixdown of the result, which would appear back in Edit View for final trimming and saving, and I'd have a file (or files) to use in the final production. This would have the advantage of not creating all these 'take' files that you have to get rid of separately in the first place, and generally keep the workflow down to a sensible number of steps.

  • How to count number of Characteristics' with the same value?

    Hello, Everybody,
    In InfoCube I have data:
    person ID (characteristic), points (key figure), gendre (characteristic), org.unit (characteristic)
    1313; 10; F;5001
    1313; 10; M;5001
    1313; 12; F;5001
    1313; 6; M;5001
    1515;20;F;5001
    Report,  with data from this InfoCube, should look like this:
    org.unit/number of employees, 6 points, 10 points, 12 points, 20 points
    5001, 1, 2, 1, 1
    Could you give me a suggestion how I can count the number of employees?
    Thanks in advance!
    Best Regards,
    Arunas Stonys

    Arunas,
    you can crate 4 CKF one each for employee points, and in each of the CKY have a data function value =1 if <your condition is satisfied>. This way the CKY will have a value of 1 if point is 6 for the first CKY and similarly for the rest and use exception aggregation based on person ID to count the no. of employees with that particular point in the Org unit. Use org unit in the rows and these 4 CKY in the columns and you should be able to get the report.
    hope this helps.
    Regards,
    Aashish
    Edited by: Aashish Kalra on Jan 6, 2009 12:31 AM

  • I have a IPhone 5 and Iphone 5s. Both are set up with the same account ID and running IOS 8.0.2. When the phones are connected to the same Wifi at home, both phones will ring when someone call in to one of the phone.  Anyway to solve this problem?

    I have a IPhone 5 and Iphone 5s, each phone is activited with a different service provider. Both are set up with the same account ID and running IOS 8.0.2. When the phones are connected to the same Wifi at home, both phones will ring when someone call in to one of the phone.  Hence you do not know exactly which line the caller called.  If you answered using the wrong phone, then anyone calling the other number will not get through.  Anyway to solve this problem?

    Hey David Koh TP,
    Thanks for the question. It sounds like your devices are set up to use continuity together. Specifically, it sounds like you are signed into the same Apple ID in FaceTime, and have iPhone Cellular Calls enabled. To resolve your issue, simply disable this setting:
    Connect your iPhone, iPad, and iPod touch using Continuity
    http://support.apple.com/kb/HT6337
    Turn off iPhone cellular calls
    To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls.
    Thanks,
    Matt M.

  • Can i have multiple iphones with the same phone number?

    If I upgrade to iPhone6 can I: a) keep my 4s operational with the same phone number; or b) must I get a new number for one of the two?

    I don't believe your cellular provider will provision 2 SIM cards with the same number. You can forward calls, if your carrier supports it, from one phone to the other depending on which one you have with you.

  • My brother got his iphone s stolen a week or two ago. He didnt have the iphone finder app installed when it was stolen. He has recently gotten a new phone with the same phone number programmed. Is there any way to find the phone?

    My brother got his iphone 4s stolen a week or two ago, he didnt have the iphone finder installed at the time. The phone company just gave him a new phone progammed with the same number is there any way of tracking his old phone? If this is relevant whenever i call him and hes on the phone the phone connects to someone else answering machine.

    IF he set up find my ip[hone on the ihone itself BEFORE it was stolen ( there is no app, it is a setting) AND it is on AND it has jot been restored, then you may be able to track it using icloud/find my iphone.
    Otherwise, there is no way to track it.

  • TS3406 My phone doesn't make and receive calls. It doesn't have coverage where other iPhones with the same network do.

    My phone doesn't make and receive calls. It doesn't have coverage where other iPhones with the same network do. Please, let me know how way I sort this problem out?

    My wife is having the exact same issue after updating to the new iOS 8.1.1 and we've tried all the same steps even restoring the phone as a new phone. We've contacted our service provider and they've told us to go to apple to potentially "remove" her serial number from their servers to allow it to work properly on the service we have. We are desperate as purchasing a new phone right now is not an option and she desperately needs her phone for work and life.
    Iphone 5 8.1.1

  • I currently have aT-Mobile sim, and therefore, a UK telephone number. Can I get a sim from EE with the same number to use in my iphone 5?

    I currently have aT-Mobile sim, and therefore, a UK telephone number. Can I get a sim from EE with the same number to use in my iphone 5?

    The easiest way to find out what carrier it's locked to would be to call the store where you purchased the phone.
    The phone can be unlocked from any location.  However, most carrier have restrictions about unlocking and you have to contact them for details.

  • I want to FaceTime with a friend in Japan.  Can I just call her through my contacts list the same way I would call my friend who live next door to me?

    I want to FaceTime with a friend in Japan.  Can I just call her through my contacts list the same way I would call my friend who live next door to me?

    Short Answer: Yes
    When they set up facetime, they either used an apple ID, or (for iphone only) their phone number.  You call using one of them.  An apple id linked email address in my opinion is simpler, as you don't need to worry about country codes and the like.  (I have never tried to facetime anyone out of the country, so I will admit I am not sure what you do about country codes.)
    These articles are a little dated, but should help you set up your or your friends facetime if you need to.
    Facetime Setup for iphone guide: http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-facetim e-set-up-use-and-troubleshooting-problems/
    Facetime setup for mac: http://simpleleapsoftware.com/blog/how-to-setup-facetime-on-your-mac/486/

  • I changed my sim on my iPhone n reconfigured iMessage, it configured with my number but when i sign in with my apple id it says username/password is wrong while in all other things like FaceTime, App Store it worked with the same id and password

    i changed my sim on my iPhone n reconfigured iMessage, it configured with my number but when i sign in with my apple id it says username/password is wrong while in all other things like FaceTime, App Store it worked with the same id and password..
    can anyone help me to solve this issue

    i just opened my ipad, started my apple account/I.D. and realized I put the wrong e mail. I was having trouble correcting my I.D on the Ipad so I went to my laptop and make the proper changes/slash e mail address I wanted for my apple ID. I got back to my ipad and try to download an app I can't because I have to sign in my apple account and I can't because it still has the irrelivant I.D/email address..
    So, i did what you said.. went to setting>app store> tapped on my e mail.. it asked me to sign in (with my invalid emails address showing). I signed in with the password I had created. It said "incorrect".. I went to reset password. I reset password, tried to sign in and it says again "unvalid password".. this is getting irritating.  I have been asking and no one knows what to do.

  • TS3367 I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling m

    I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling mine.

    Each device needs a separate address. Use an email address (gmail.com) on the iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
     Cheers, Tom

  • How can I set up two iPhones with the same contact, photos, music etc... but a different sim card and phone number. They will both be my phones, but one will be for use in other countries.

    How can I set up two iPhones with the same contact, photos, music etc... but a different sim card and phone number. They will both be my phones, but one will be for use in other countries.

    Phone A = phone with information you want duplicated
    Phone B = phone that you want to copy from A
    Backup Phone A.
    Wipe Phone B using these instructions. What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support
    Phone B should be on the 'Hello' screen. Do not swipe it. Launch iTunes. Plug in Phone B.
    When iTunes asks if you want to set up as new phone or restore from backup, choose restore from backup of Phone A.
    After this setup, any changes to one phone (i.e. adding a contact, downloading an app) will have to be manually duplicated on the second phone, if that is your desire). Making changes to one phone will not affect the other after setup.

  • HT1911 If I make a new iTunes account with the same credit card number can I still have the same thing I bought from my other account?

    If I make a new iTunes account with the same credit card number can I still have the same thing I bought from my other account?

    Not without buying them from the new iTunes Store account.
    (84283)

Maybe you are looking for

  • Darn, I missed the Great iPod Giveaway when you buy an Apple Computer

    I still have these questions and I will do my best to keep this real short. I had tried the iPod a long time ago but I broke all 3 of them and except for the first one, I have no idea what I did. I have the new iPod: Missing Manual (can't remember th

  • Problem in using the install()'s byte array values?

    I tried to pass the values to the OwnerPIN object at the time of initialization. But when I try to install the applet I will get 6A80 error code . Can anybody tell me why I am getting this message. And if i use some different data values for pin.upda

  • Insert Image Javascript Error

    I've had this problem since I switched from MX2004 to version 8, and now on CS3. When I click on Insert Image I get a message that in Image.htm a javascript error occured. The strange thing is I have a second computer with CS3 installed and since re-

  • Brand new MPB crashing after welcome screen :/ ???

    Hello, I bought a brand new MPB, took it out of the box yesterday hooked it on the AC, started it up, got the nice welcome video, went through the language settings, and then when i had to give in my name all **** broke lose. I got the beautiful blac

  • 3 Different Currencies on 1 Purchase Order

    Hi all Is it possible to have 3 different currencies on 1 P.O. Eg Price of Item in Dollars Customs in Pounds Locak freight in Dollars Thanks Vishnu