How to post multiple http requests using a single http connection in java

I am using the httpurlconnection class and it allows only to post one request on a connection. I require to post multiple http requests by opening a single connection. Code examples please. Thanx in advance.

Hi
I found this article through Google. I hope it helps a little
http://www.developer.com/tech/article.php/761521
D

Similar Messages

  • Multiple post requests using a single HttpConnection

    Hi,
    is it possible to send multiple post requests using a single Http connection.
    i am currently trying to simulate the preformance overhead because of creating HttpURLConnection to talk to my servlet. But, that made me wonder, if is there a way to send multiple post requests using a single HttpURLConnection.
    can anyone help me with this.
    thanks in advance

    Hi
    I found this article through Google. I hope it helps a little
    http://www.developer.com/tech/article.php/761521
    D

  • How to create the multiple spool requests for a single report.

    Hi gurus,
                     I have one requirement to be completed , i need to send the out put of the report via mail in pdf format. for that what i did was, iam executing report in background and creating spool request and converting it to pdf and sending the file.
    now the problem is, its a customer ledger report, for each customer i need to create a new spool request and send mail to that particular customer, now my dought is how to create multiple spool requests for a single pro and how i need to go about it.
    And one more question is can we create a spool request for a report which is running in online.
    waiting for inputs frm gurus.

    Hello,
    As per my knowledge for creating new spool id you will have to set
    output_options-tdnewid = 'X'.
    and then using
    job_output_info-spoolids
    create a pdf using
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Rachana.

  • How to send a https request using jsf

    hi
    Can anybody tell a sample how to send a https request using JSF ...
    thanks

    Prefix the request URI with the https protocol.
    The answer is too easy and straightforward that I guess that you mean something else. If you just want to know how to configure an SSL environment for your own webapplication, refer to the Java EE tutorial chapter 28: http://java.sun.com/javaee/5/docs/tutorial/doc/

  • How to POST (create) a folder using CMIS REST in Webcenter

    Has anyone tried to create a new folder using CMIS REST/Atom calls in Webcenter ?
    Here's what I try to do:
    http://172.31.100.150:7001/cmisrestprelim/cmis/children/MyContentServer ==>POST (using the REST client plug-in in Firefox)
    Content-Type=application/atom+xml
    <?xml version="1.0" encoding="utf-8"?>
    <entry xmlns="http://www.w3.org/2005/Atom"
    xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/"
    xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
    <title>mytestfolder</title>
    <cmisra:object>
    <cmis:properties>
    <cmis:propertyId propertyDefinitionId="cmis:objectTypeId"><cmis:value>cmis:folder</cmis:value></cmis:propertyId>
    </cmis:properties>
    </cmisra:object>
    </entry>
    This piece of code should create a folder called "mytestfolder" in the root directory.
    When I POST this, I get the following internal server error:
    <pre>javax.servlet.ServletException: com.sun.jersey.api.container.MappableContainerException: com.bea.content.RepositoryException: Please specify a valid ID object. Make sure the repository name is not null.
         at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:310)
         at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:314)
         at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:239)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
    Anyone has an idea how to solve this ?

    I must admit that I'm fairly new to all the CMIS and REST-things....
    So there are a couple of things in your answer that are a bit hazy to me.
    It looks like you are more familiar with all this.
    How do I find a creatable folder ? And what should be the URI to POST a new folder ?
    I try to POST a new folder using this URI:
    http://172.31.100.150:7001/cmisrestprelim/cmis/children/MyContentServer/IDC:Folder%2F13
    (IDC:Folder%2F13 is the /Contribution Folders/Documents folder in my repository)
    This POST keeps me giving the following internal server error:
    <pre>javax.servlet.ServletException: com.sun.jersey.api.container.MappableContainerException: com.bea.content.RepositoryException: Please specify a valid ID object. Make sure the repository name is not null.
         at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:310)
         at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:314)
         at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:239)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
    Thanks for helping me out.

  • Reg:how to post the parked documents using BDC

    Duplicate message in General deleted.  Please do not post the same question in more than one forum.
    Hi
    I am creating parked Documents using FV50. I am able to check them using FBV0, I am able to select and post the documents using the same transaction. Its working fine. However I want to post the selected parked documents using BDC. I am having problems as the output in FBV0 is in ALV report format. HAving problems selcting the parked documents to be posted. As there any way to post the selected parked documents using BDC.
    Please suggest me a solution for this.
    Thanks,
    Satish
    Edited by: Matt on Dec 3, 2008 7:40 PM

    Hi Rob,
    Thank you for ur reply, can u send that code how u post the parked documents using BDC for FBV0 transaction.  Please send the code.
    Thanks,
    Satish

  • How to create a Service request using Exchange connector in SCSM 2012

    HI ,
    I am able to create Incident request using exchange connector.Could you please let me know that how can i create Service request using Exchange connector 3.0.
    Thanks in advance. 

    Hi,
    Select a service request's template for new work items on the last wizard's page.
    Cheers,
    Marat
    Site: www.scutils.com  Twitter:
    LinkedIn:
    Graveyard:

  • Logging of Forwarded HTTP Requests using RequestDispatcher in Weblogic

    Can anyone help me on this?
    Logging of Forwarded HTTP Requests using RequestDispatcher in Weblogic
    Access Log File:
    1. I have a servlet(S1) which decides which JSP to be published based on
    some logic. If I try to forward the request from a servlet to a JSP or to
    another servlet from within S1 using RequestDispatcher, it doesn't get
    logged in the access log, only the initial request to S1 gets logged, when I
    switch on HTTP logging by setting weblogic.httpd.enableLogFile to true. Is
    there any way of logging this forwarding of request in the access log?
    2. If there is no solution for (1), I woiuld like to make entries into the
    access log file of weblogic in the common log format, when I forward a
    request to a JSP or a servlet throught the RequestDispatcher, so that I can
    use standard tools to analyze the logfile.The two issues with this are (i)
    is there any weblogic service that gives a handle to the access log file
    like the LogServicesDef which gives a handle to the weblogic log file. (ii)
    Is there any utility class available that can format a URL pointing to a JSP
    to a string confirming to the common log format.

    The log4j:ERROR messages are not coming from Log4j 2 and are most likely from Log4j 1.x. Somehow Log4j 1.x must be getting the log4j2 configuration.

  • How to combine multiple Unmanaged Solution to one single Managed solution

    Hi,
    How to combine multiple Unmanaged Solution to one single Managed solution.?
    There were some other third party developer have kept things lik ein UAT there are 2 release solution and both are Managed Solution.
    And in Production the changes are only deployed for release 1 and for the release 2 changes deployment needs to be done.
    But when i import that second release Managed Solution from UAT to Production then i got number of elements missing but i have checked they are already there in Soolution.
    I did some R&D on this but not much helpful.
    I thought i require to convert Unmanaged Solution of Production environment to Managed first for first release and then needs to import Managed solution of UAT to Production for second release.
    Is this the right way to overcome form this situation?
    Any help and response would be really appreciated.
    Thanks.
    If this post answers your question, please click &quot;Mark As Answer&quot; on the post and &quot;Mark as Helpful&quot;

    Hi, 
    You can prepare unmanaged solution by adding all the components from the default solution,which are there in the managed solution, If Customizatiable entity is true in  the managed solution.

  • How to include multiple image components into a single custom component???

    How to include multiple image components into a single custom component???

    Hi Marcel,
    an ABAP transaction can only run or at least be started on one single system. A portal transaction can be assigned using a URL. This doesn't need any logical component.
    Regards
    Andreas

  • How to run all Concurrent Requests in a single node in a multi node env

    DB;11.1.0.7
    Oracle Apps:12.1.1
    OS:Linux 86x64 Red Hat
    PCP setting is enabled.
    Load Balancer is enabled.
    APPLDCP=ON
    Could anyone please share - How to run all Concurrent Requests in a single node in a multi node env where there are 3 web tier nodes?
    Thanks for your time!
    Regards,

    PCP setting is enabled.
    Load Balancer is enabled.
    APPLDCP=ON
    Could anyone please share - How to run all Concurrent Requests in a single node in a multi node env where there are 3 web tier nodes?Concurrent requests will be processed by the CM nodes and it has nothing to do with the 3 web tier nodes you have.
    If you mean the database instance, then please see these docs.
    How to run a concurrent program against a specific RAC instance with PCP/RAC setup? [ID 1129203.1]
    In A PCP/RAC Configuration, How To Find Out On Which RAC Instance FNDSM Is Currently Running? [ID 1089396.1]
    Thanks,
    Hussein

  • Can I have multiple TFS instances use a single SSRS installation

    Can I have multiple TFS instances use a single SSRS installation?
    Thanks

    Hi Kim,
    According to your description, you have multiple TFS instances using one Reporting Services instance. Right?
    For installing TFS, to use a named instance with Team Foundation Server, you must install SQL Server by using a named instance, or move or restore Team Foundation Server data to a named instance, or create a team project collection on a named instance. Please
    refer to the link below:
    Work with SQL Server Named Instances
    Reference:
    Understanding SQL Server and SQL Server Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to post multiple message using file adapter in XI2.0

    We have to post multiple IDOCS.We have scenario as below.
    We will have file structure like as shown below.
    VKORG,VTWEG,SPART,BSART,PARVW,PARTNER,BSTDK,MATNR,MENGE,VSART,BSTZD,POLINE,BSARK
    BE10;10;10;OR;SP;1000033;;M184-ISS01;2;G;131;0002;
    BE10;10;10;OR;SP;1000033;;M184-ISS01;2;G;131;0002;
    BE30;10;10;OR;SP;1000033;;M184-ISS01;2;G;131;0002;
    For this we want that 2
    messages should be created.In first message there will be first 2 records
    with VKORG BE10 and in second message there will be last record with VKORG BE30.
    We can do it through FILE2XMBWITHSTRUCTURECONVERSION and using some options.
    I am sending the configuration that I have done for my adapter.
    classname=com.sap.aii.messaging.adapter.ModuleFile2XMB
    mode=FILE2XMBWITHSTRUCTURECONVERSION
    #mode=FILE2XMB
    XMB.TargetURL=http://20.60.53.36:8000/sap/xi/engine?type=entry
    XMB.ReceiverBusinessSystem=sapdev210
    #XMB.ContentKind=B
    XMB.ContentKind=T
    #XMB.ContentType=application/xml
    XMB.ContentType=text/xml
    #XMB.ContentType=text/plain
    XMB.QualityOfService=EO
    ##xml conversion properties if mode FILE2XMBWITHROWCONVERSION specified (example, see docu)
    xml.recordsetStructure=IDOC,*
    xml.recordsetName=SALESDATA
    xml.recordsetsPerMessage=1
    xml.documentName=SALESDATA
    #xml.fieldFixedLengths=
    xml.IDOC.processFieldNames=fromConfiguration
    xml.IDOC.fieldNames=VKORG,VTWEG,SPART,BSART,PARVW,PARTNER,BSTDK,MATNR,MENGE,VSART,BSTZD,POLINE,BSARK
    xml.keyFieldName=VKORG
    xml.keyFieldType=CaseSensitiveString
    xml.IDOC.keyFieldValue=BE10.
    xml.IDOC.fieldSeparator= ;
    What I have tried is hardcoding 2 in  xml.recordsetStructure=IDOC,2.It works fine
    Since I already knew this.
    Butin real scenario we wont be knowing this that is why I have given * in configuration , and
    given
    xml.keyFieldName=VKORG
    xml.keyFieldType=CaseSensitiveString
    xml.IDOC.keyFieldValue=BE10.
    With this it should identify on key field and its value and put first 2 records in one message
    and last record in second message.
    It is not giving any error when we start adapter but no XML message is created.Can u plz help me
    for the above problem.
    My datatype in repository is like
    SALESDATA
        IDOC
             VKORG
             VTWEG
    and allother remaining fields.
    Is this scenario possible in XI 2.0.If yes then will it  be done through above approach or something else.
    Thanx.
    Rekha.

    Hi,
    I think you can not handle this problem with keyFieldName/keyFieldValue.
    In my opinion with keyFieldName/keyFieldValue you can create different substructures of the same XML, but you can not seperate messages with the same substructure.
    But I don't know how to handle your problem ;-(
    Another point is that I see a dot after xml.IDOC.keyFieldValue=BE10.
    My be this is a problem too.
    Christoph

  • Multiple HTTP requests using single HTTPService component

    Hi,
    I am having one requirement, I need to use a single HTTPService component to send request to a same and single ASP.net multiple times.
    How can I acheive that..? I know that I can acheive this by sending one request at a time and after the "result" event is called for the first request then sending the second request and so on...
    But if I do so then it will be delayed response as I need to wait until the result handler for the previous request is called...
    So how do I do this..?
    Any help greatly appreciated....:)
    Thanks in advance..
    Thanks,
    Bhasker Chari

    yep, the setting works when set to 10. Seemed to not work when set to 20. Anyways, summary is "long polling" and Flex
    or Flash are not good compatriates. So, you will need to work out your own mechanism on the server or client
    side to limit the sockets used/wasted. Painful but true.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    import com.util.HTTPServiceProxy; 
    import mx.rpc.events.FaultEvent; 
    import mx.rpc.events.ResultEvent; 
    import mx.rpc.http.HTTPService; 
    private var urlOpenTasksDefault:String = HTTPServiceProxy.servercontext + "/blahblah?something=somethign";  
    private var waitRequestPart:String = "&wait=5000&lastUpdate=" // long polling period for now for testing
    private var iResponses:int; 
    private function runTest(urlString:String):void{ 
    var service:HTTPService = new HTTPService();service.url= urlString;
    service.resultFormat =
    "e4x";service.method =
    "get";service.contentType=
    "application/xml";service.addEventListener(
    "result", httpResult);service.addEventListener(
    "fault", httpFault);service.send();
    public function httpResult(event:ResultEvent):void { 
    trace("httpResult " + iResponses++ );}
    public function httpFault(event:FaultEvent):void { 
    trace("httpFault " + (iResponses++) + event.fault.faultString);}
    private function test1(evt:Event):void {iResponses=0;
    var reqs:int = parseInt(requests.text); 
    for( var i:int=0; i<reqs; i++ ){runTest(urlOpenTasksDefault);
    private function test2(evt:Event):void {iResponses=0;
    var reqs:int = parseInt(requests.text); 
    for( var i:int=0; i<reqs; i++ ){runTest(urlOpenTasksDefault+waitRequestPart+
    "0");}
    ]]>
    </mx:Script> 
     <mx:Label text="Requests"/>
     <mx:TextInput id="requests"/>
     <mx:Button label="Test Requests-Responses" click="test1(event)"/>
     <mx:Button label="Test Long Polling" click="test2(event)"/></mx:Application>

  • How to post multiple images in one blog post using iweb

    Hi
    I would like to post multiple images in a single blog post. When ever I add a second or third image in the "entry" section of iweb, it does not show up in the blog post on the homepage of the blog. does anyone know if it is even possible to have multiple, separate images in one post, and if so, how.
    Here is a link to my blog: http://www.hoopography.com. You can see how there is only one image. I I want to talk about multiple items, I need to create an image in Pages and put them all together. I would really like to break out of the one box (placeholder) mold. I feel so constrained in iweb right now. I think I have done a lot with my blog, but I am always looking to learn more about iweb and improve my blog. Thanks for any help!!!

    what's the url of your blog? I'd like to check it out. I'm always interested in learning more about iWeb to improve my blogs. Mine are: http://www.hoopography.com and http://www.wnysportscards.com

Maybe you are looking for

  • Display image in full screen canvas

    Hi frndz I have an Image, which either bigger in size of a canvas or small I want to give an option of a full screen view So its a kind of zoomIn/ zoomOut function in one method how can I convert such small/big images into full screen canvas size tha

  • Displaying cascading list in the page

    Hi I have a cascading parent child list of Country , City , World. I want to display the world list on the page using some webpart. I want that there should be two drop downs and when the Country and city are selected from that drop down then the lis

  • Trouble with Parameter Option - Show Value or Description

    First off we are on BI 4.1 SP01 Patch 6.  I have a Crystal Reports 2013 report with a lot of optional parameters some of which are based on dynamic lists of values which I created using Business View Manager. My hope would be that whatever values I s

  • Java: Your security settings have blocked an untrusted application from running

    I keep getting the error "Your security settings have blocked an untrusted application from running" when trying to access the Web Interface of an HP printer....I don't know the model of the printer since I cant get into it, but it does say HP. I am

  • WRT54gv6 wired interface hangs

    Hello, This problem has been bothering me for upwards of 6 months with no solution in sight. Basically every 6-12 hours the wired interface on my router hangs and none of my wired computers can communicate with the router or internet. If a pc request