Request a Servlet from a batch process

Hi all.
I have a batch process in the client side that uploads files to the server. I want that this process to be automatically, so this process call to a Servlet in the server side to do the file upload automatically. Can I make the request manualy from the client to the Servlet that uploads the file (without client form)?
TIA.

We can do it using java.net.HttpURLConnection class.

Similar Messages

  • How to send  a request to servlet from a java client.

    I called a servlet from java client using URL object.
    I could establish a connection with server and display
    the content(like req.getservername etc.,)
    of servlet on client side(DOS prompt).
    My question is how do i send a request to servlet from the client.
    let me say, i have to send a value as 10 to servlet and do some processing
    ( like 10*2 = 20) display the output (20) on client side..
    It will be appreciated if u can mention the syntax...

    just add the query string to the url you use to create the URL object from.

  • How to create multiple pdf files from multiple batch processing

    I have several file folders of jpeg images that I need to convert to separate multi-page pdf files. To give a visual explanation:
    Folder 1 (contains 100 jpeg image files) converted to File 1 pdf (100 pages; 1 file)
    Folder 2 (contains 100 jpeg image files) converted to File 2 pdf (100 pages; 1 file)
    and so on.
    I know I can convert each folder's content as a batch process, but I can only figure out how to do so one folder at a time. Is it at all possible to convert multiple folders (containing jpegs) to multiple pdf files? Put differently, does anyone know how to process a batch of folders into multiple (corresponding) pdf files?
    Many thanks.

    There are two approaches to do this:
    - First convert all JPG files to PDF files using a "blank" batch process. Then combine all PDF files in the same folder using another batch process and a folder-level script (to do the actual combining). I have developed this tool in the past and it's available here:
    http://try67.blogspot.com/2010/10/acrobat-batch-combine-all-files-in.html
    - The othe option is to do everything in a single process, but that requires an application outside of Acrobat, which I'm currently developing.
    If you're interested in any of these tools, feel free to contact me personally.

  • Batch Processing and Putting Two files together?

    Hello,
    I'm trying to find out if there is a way, in Photoshop, to automate placing a logo file and border from another file into a set of photos? Basically, I have a folder of, let's say, 4x6 images, and I have a file that has two layers, a thin transparent border layer, and a layer housing the logo. I would like to find out if it's possible to automate the process where I can batch a lot of files to put this file (or the two layers) onto the original image, then save and close and go on to the next file. Any ideas how to accomplish this? Thanks!
    Regards,
    Dave

    Here is a simple script I made a while back that allows you to place one of two different logo files on the image, depending whether the image is upright or horizontal in orientation.
    All you need is to put you two logo files in a folder and tell the script which folder they are in. After that, when you run the script, it will place the appropriate logo file onto you image depending on the orientation. I used "C:\\MyLogoA.tif" and "C:\\MyLogoB.tif" for this script.
    You can run this script from a batch process.
    var doc = app.activeDocument; // This defines the active document
    var width = doc.width.value; // This is the width of the original image
    var height = doc.height.value; // This is the height of the original image
    // Call the placeLogo function
    if(width>height){
    placeLogo("C:\\MyLogoA.tif");
    }else{
    placeLogo("C:\\MyLogoB.tif");
    // This is the placeLogo function
    function placeLogo(path)
    // =======================================================
    var id35 = charIDToTypeID( "Plc " );
    var desc8 = new ActionDescriptor();
    var id36 = charIDToTypeID( "null" );
    desc8.putPath( id36, new File( path ) );
    var id37 = charIDToTypeID( "FTcs" );
    var id38 = charIDToTypeID( "QCSt" );
    var id39 = charIDToTypeID( "Qcsa" );
    desc8.putEnumerated( id37, id38, id39 );
    var id40 = charIDToTypeID( "Ofst" );
    var desc9 = new ActionDescriptor();
    var id41 = charIDToTypeID( "Hrzn" );
    var id42 = charIDToTypeID( "#Pxl" );
    desc9.putUnitDouble( id41, id42, 0.000000 );
    var id43 = charIDToTypeID( "Vrtc" );
    var id44 = charIDToTypeID( "#Pxl" );
    desc9.putUnitDouble( id43, id44, 0.000000 );
    var id45 = charIDToTypeID( "Ofst" );
    desc8.putObject( id40, id45, desc9 );
    executeAction( id35, desc8, DialogModes.NO );
    // =======================================================

  • Saving JPEG images in a batch process

    Please, I need help....
    I'm making an application that loads an image, perform some manipulations and save it into a JPEG file..
    The code I use to paint that image to a Graphics object is this:
              public void paintToImage(Graphics gr){               Graphics2D g = (Graphics2D)gr;               //CONFIGURO O RENDER PARA SER O MELHOR POSS?VEL                g.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);               g.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,RenderingHints.VALUE_COLOR_RENDER_QUALITY);               //seto o clip rect               g.setClip(0,0,w,h);               //pinto o fundo de branco               g.setColor(Color.white);               g.fillRect(0,0,w,h);               if(img==null)return;               g.drawImage(img, -origemXY.width, -origemXY.height,this); //'this' means an instance of my JPanel          }I call this method to paint my image into a BufferedImage this way:
         BufferedImage bi = new BufferedImage(myComponent.width,myComponent.height, BufferedImage.TYPE_INT_RGB);     myComponent.paintToImage(bi.createGraphics());If I call it to a single image (like an ActionEvent for a selected image) it works fine...
    But when I try to call it from a batch process, like a loop to paint several selected images, it aways produces a white JPEG.
    All the code inside my "paintToImage()" method works fine but the line "g.drawImage(img, -origemXY.width, -origemXY.height,this);".
    I know that because if I use "g.setColor(Color.red)" instead of "g.setColor(Color.white)" it produces a red JPEG.
    Could it be a proble with the ImageObserver that I'm using?
    The method below is invoked to save several images selected in a JTree, but it only produces white Images:
                   public void actionPerformed(ActionEvent e){                    TreePath paths[] = filesTree.getSelectionPaths();                    for(int i=0;i<paths.length;i++){                         filesTree.setSelectionPath(paths);//this line sets the selected image that is about to be painted by my previewPane into a BufferedImage                         try{                         BufferedImage bi = new BufferedImage(previewPane.getImagePane().getPreferredSize().width, previewPane.getImagePane().getPreferredSize().height, BufferedImage.TYPE_INT_RGB);                         previewPane.paintToImage(bi.createGraphics());                         /* write the jpeg to a file */                         File file = new File("D:/VER/0000" + i + ".jpg");                         FileOutputStream out = new FileOutputStream(file);                         /* encodes the image as a JPEG data stream */                         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);                         JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);                              param.setQuality(1.0f, false);                         encoder.setJPEGEncodeParam(param);                         encoder.encode(bi);                         out.close();                         }catch(IOException ioex){                              ioex.printStackTrace();                         }                    }               }
    What is the problem?? What am I doing wrong?? any help wold be greate...
    Thank's all and aloha from Brazil...

    Reformat your problem, you can infinitly insert any number of '\n's here,

  • Getting rid of batch processing javascript console popup

    So i don't know much javascript but i am doing some relatively simple commands here...
    i thought that before whenever i would execute javascript from the batch processing window it would just go through all of the files.... but now it prompts me with the javascript editor for every single file it goes through.
    this cannot happen as i am running this on over 1000 pdfs and i must let it run without a user present...
    does anyone know how to get rid of the window from popping up? or why it is popping up?
    the code i am executing is the following:
    /* Extract pages to folder */
    // Regular expression used to acquire the base name of file
    var re = /\.pdf$/i;
    // filename is the base name of the file Acrobat is working on
    var filename = this.documentFileName.replace(re,"");
    try {for (var i = 0; i < this.numPages; i++)
    this.extractPages({
    nStart: i,
    cPath: filename+"$" + i +"_" + this.numPages + "$.pdf"
    } catch (e) { console.println("Aborted: " + e) }
    any help is much appreciated

    hmm that didnt work either....
    what is so wierd to me is i am pretty sure that a couple of days ago i tried using the exact same script and it went through fine... but now it is doing this...
    i dont know what could have changed...

  • LR/Enfuse 3.00 - New batch processing option

    Hi,
    Some of you may be interested to know that LR/Enfuse version 3.00 is finally here.
    After many requests I've added a batch processing option. Simply group images to be blended into stacks, select all and then run enfuse in batch mode.
    As an added bonus LR/Enfuse can now automatically reimport the blended images and even stack them with the originals.
    http://timothyarmes.com/lrenfuse.php?sec=quickguide#batch
    Both of these new features require Lightroom 2.
    Regards,
    Tim

    Hi Timothy,
    thanks for the update. Like it.
    BTW, should it not be updated here as well?:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&exc=25&loc=en_us
    I see here only n entry of May 2008.
    Best regards
    Jacob

  • Transaction to end online batch processing

    I need to exit from my batch processing that is started in online mode. Can anyone tell me the transaction to do this?

    General command field formats /n Skip to the next record if you are processing one batch input session 
    /bend Cancel a batch input foreground process 
    /nend Close all R/3 sessions and logoff 
    /nxxxx Call the transaction xxxx in the same session 
    /o Generate a session list 
    /oxxxx Call the transaction xxxx in an additional session 
    /i Delete the current session 
    /h Turn the debug mode on 
    /$tab Reset all buffers (for System Administrators) 
    /$sync Synchronize instances buffers (for System Administrators
    Kevin

  • Payment Process Request split output by payment batch amount

    Hello,
    I have task to create multiple electronic outputs from payment process request.
    Example: I run payment process request with 4 payments (A, B, C, D) with amounts: 1000$, 2000$, 3000$, 2500$ then in payment process it splits by payee into 3 payments (E, f, g) with amounts: 1000$, 5000$ and 2500$. Then I have payment amount, for example 2500$, that means that into 1 payment output I can put only payments that sums below 2500$ or only one that is greater than 2500$. Other payments necessary to put into new outputs. Oracle standard process "Format Payment Instructions with Text Output" create only 1 output with all payments in other cases but if there is chosen my payment profile then it necessary a lot of outputs.
    Example with outputs where limit 2500$ amount sum for multiple payments else 1 payment:
    1. output: 1 payment with amount sum 1000$
    2. output: 1 payment with amount sum 5000$
    3. output: 2 payments with amount sum 2500$
    Question: Is it possible to create such custumization with Oracle Standard Payment Batch creation process?
    Or you have another ideas?
    Thanks!
    Edited by: 966870 on 2012.22.10 05:52

    Hello,
    I have task to create multiple electronic outputs from payment process request.
    Example: I run payment process request with 4 payments (A, B, C, D) with amounts: 1000$, 2000$, 3000$, 2500$ then in payment process it splits by payee into 3 payments (E, f, g) with amounts: 1000$, 5000$ and 2500$. Then I have payment amount, for example 2500$, that means that into 1 payment output I can put only payments that sums below 2500$ or only one that is greater than 2500$. Other payments necessary to put into new outputs. Oracle standard process "Format Payment Instructions with Text Output" create only 1 output with all payments in other cases but if there is chosen my payment profile then it necessary a lot of outputs.
    Example with outputs where limit 2500$ amount sum for multiple payments else 1 payment:
    1. output: 1 payment with amount sum 1000$
    2. output: 1 payment with amount sum 5000$
    3. output: 2 payments with amount sum 2500$
    Question: Is it possible to create such custumization with Oracle Standard Payment Batch creation process?
    Or you have another ideas?
    Thanks!
    Edited by: 966870 on 2012.22.10 05:52

  • Service Request disappears from the list of My Service Requests after changing status to In process

    Service Request disappears from the list of My Service Requests after changing status to In process
    Incident manager (resp.) > Agent Dashboard

    Hi,
    As far as I know, this is a new feedback, Please vote this customer voice, here is the link:
    http://feedback.azure.com/forums/216926-service-bus/suggestions/6062851-batching-in-rest-api, or create a new voice at azure feedback forum:
    http://feedback.azure.com/forums/34192--general-feedback
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Automate (batch process) other than from default list?

    I really admire the batch process feature that lets me automate functions. The problem is, I want to do something with a single page PDF that is not on the list; Save as TIFF. This is very common in my work environment, and time consuming. Any way to automate this that does not involve a feature request?
    It seems to me that the equivalent feature in Photoshop (Record) is much more flexible.

    Sure it's available. In Acrobat Pro XI add a Save command to your Action
    and then click on Specify Settings and select "Export files to alternate
    format" and select TIFF from the drop-down list.
    On Fri, Mar 29, 2013 at 5:30 PM, HealthcareHelper

  • Cannot process an HTTP request to servlet [Faces Servlet] in [wcb] web application

    Hi All
    l am working on a Wcem 3.0 with Trex with ERP and WAS 7.3.
    When I logon to http://<host>:<port>/wcb/index.html url I am able to see wcbuilder_erp & wcbuilder_erp_ume application ids.
    But suddenly I am getting The website cannot display the page error message when I access the above mentioned URL.
    When I verify the developer log trace it showing as 500 Internal sever error issue.[EXCEPTION] java.lang.VerifyError: Bad return type
    In defaultTrace.trc file it is showing as Cannot process an HTTP request to servlet [Faces Servlet] in [wcb] web application exception.
    09 10 18:08:56:098#+0530#Error#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#
    com.sap.ASJ.web.000137#WEC-APP-BF#sap.com/wec~comm~wcb~leanapp#C0000A229CA7094A0000000000001188#2392750000000004#sap.com/wec~comm~wcb~leanapp#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#Guest#0##CFAFBF4C38E411E4B4750000002482AE#ffbcbcdd38e611e49d020000002482ae#ffbcbcdd38e611e49d020000002482ae#0#Thread[HTTP Worker [@455349581],5,Dedicated_Application_Thread]#Plain##
    Cannot process an HTTP request to servlet [Faces Servlet] in [wcb] web application.
    [EXCEPTION] java.lang.VerifyError: Bad return type
    Exception Details:
    Location: com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContextFactory.getExternalContext(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljavax/faces/context/ExternalContext; @17: areturn
    Reason: Type 'com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContext' (current frame, stack[0]) is not assignable to 'javax/faces/context/ExternalContext' (from method signature)
    Current Frame:
        locals: { 'com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContextFactory', 'java/lang/Object', 'java/lang/Object', 'java/lang/Object' }
        stack: { 'com/sap/wec/tc/core/runtime/jsf/resource/WecExternalContext' }
      Bytecode:
        0000000: bb00 0359 2ab6 0004 2b2c 2db6 0005 b700
        0000010: 06b0                                
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2446)
        at java.lang.Class.getConstructor0(Class.java:2756)
        at java.lang.Class.getConstructor(Class.java:1693)
    Any help?
    Regards
    Rami Reddy

    Hi Steffen,
    Thanks for promt response.
    But when I checked with Basis team as of now there are not yet configured TREX, only WCEM components has been configured in WAS 7.3. When they are configuring WCEM components HTTPS protocol not configured.
    But for past 2 weeks I am able to see the below screen using http://<host>:<port>/wcb/index.html url.
    But now I am getting The website cannot display the page error.
    Please clarify me if anything is wrong from my side. And also pl let us know which configurations I have to check for fixing the issue.
    Regards,
    Rami Reddy

  • AutoTrim & Include Subfolders From A Folder & Preserve Subfolder Structure & Auto Shut Down Computer - ALL In Batch Processing Mode And Match Volume Mode ?

    Hi! I salute you all!
    First of all I want to excuse my english (it's not my native language)!
    In 2014 we are dealing with thousands of files (video, audio, etc.), because of the present powerful technology, still... we are missing very important and useful parts for doing our jobs properly and very quickly!
    In this case is Adobe Audition too, in my oppinion!
    Adobe Audition is a great program, which help us to edit in many ways our audio files, but... unfortunatelly has major missing parts, which would be nice to be implemented as soon as possible!
    Some of them are are right below this line:
    1. AutoTrim (for removing silences from audio files, before and after)
    2. Include Subfolders From A Folder (when adding a folder for working with, we should have the possibillity to add its subfolders too)
    3. Preserve Subfolder Structure (when exporting a folder with its all subfolders, we should have the possibillity to export the exact structure like the original)
    4. Auto Shut Down Computer (when all the tasks/jobs are done, we should be able to auto close the program and auto shut down our desktop/laptop as well)
    When you will add these features which are so wanted, to have them all in Batch Processing mode and Match Volume mode as well, please?!
    Many other audio softwares have all of these "old" possibillities, like "GoldWave" for instance (I am not advertising it at all), but the Adobe Audition which is more complex...doesn't so far!
    I thank you all and I really wait for these very next future feature requests!
    Have a nice day!
    P.S.: Is this message/question read by Adobe stuff members (persons who can take decissions in this way) too, or only by us, the comunity members?!

    Hello Kavans,
    Thank you for the details of the issue you are experiencing with your MacBook Pro.  I recommend reviewing the following article for this issue:
    Mac OS X: Why your Mac might not sleep or stay in sleep mode
    http://support.apple.com/kb/HT1776
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is j

    I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is just a plain photoshop file, a watermark is added, then save as jpeg - the jpeg is saved to a different folder than the original photoshop file.)  It happens for about 10 of 30/40  files approximately . Thank you, Kathryn

    I believe I have figured it out - I need to flatten the image, even though there are no layers except for layer 0, first.

  • Add layers from other psd file and retain text layers (Batch processing)

    I want to batch process a large number of portraits adding text info from the filename (year_name_number.jpg) to existing text layers. I want to make a template psd file containg the correct labeled text layers formatted and adjusted (With bleding effects and more) How can i add layers from an other psd file to the active document and retaining the text layers editable. The place command in PS5 adds the file as a smart object, no use.
    Any ideas?
    I tried the combined action/script way, but no joy so far. Right now i am making the text layers with a action, then calling the script from the action. It works but its difficult to make different templates from adjusting a action.
    The code i am using now (in combination with a action creating the 3 text layers and other grapchical elements)
    var docRef = activeDocument;
    // strip the extension off
    var fileNameNoExtension = docRef.name;
    fileNameNoExtension = fileNameNoExtension.split( "_" );
    if ( fileNameNoExtension.length > 1 ) {
                    fileNameNoExtension.length--;
    fileNameNoExtension = fileNameNoExtension.join("_");
    var myString = fileNameNoExtension;
    var mySplitResult = myString.split("_");
    var textLayer = docReflayers['Year']; // define the existing text layer to a var
    docRef.activeLayer = textLayer;
    textLayer.kind = LayerKind.TEXT;
    var T1 = textLayer.textItem;
    T1.contents = mySplitResult[0]
    var textLayer = docRef.layers['Name']; // define the existing text layer to a var
    docRef.activeLayer = textLayer;
    textLayer.kind = LayerKind.TEXT;
    var T2 = textLayer.textItem;
    T2.contents = mySplitResult[1]
    var textLayer = docRef.layers['Number']; // define the existing text layer to a var
    docRef.activeLayer = textLayer;
    textLayer.kind = LayerKind.TEXT;
    var T3 = textLayer.textItem;
    T3.contents = mySplitResult[2]
    Thanks
    Eivind

    norway_photo wrote:
    Here is my intended workflow:
    - A set of same size portraits labeled "year_name_number.jpg"
    - A template.psd os same size with graphical elements and text layers (named "year", "name" and "number")
    - A script or action copy/pasting og adding all layers from the template.psd file to the open portrait file, retaining text layers editable.
    - A script (The one i have working) changing the text layers added from the template to text from the filename.
    - A action saving this as a PDF ready for print.
    This way i can process a large number of portraits, add names and other information and save it as a file ready for print.
    I can image it is much easier to edit a template than writing a script or an action creating all the graphical elements.
    And even better, to change this template for different customers/departments/logos.
    Basically i need a way to add layers to an open file using a batch file or script.
    Eivind
    OK I understand what your trying to do and now I do not agree with your conclusion you made in you first append about place being no good for you.  Its is I think a perfect solution for you. I feel you need to address the process from a new angle.
    I am very familiar with templates I use them all the time for collages which I populate with an actions.  However I do not batch this process and my process is interactive.  If you look at what your trying to do from the angle of creating a collage.  You will see what you are trying to do is automate the population of a single image collage using a single template in a batch process.  An example of one of my single image collage populated by one of my actions that has been saved as a jpeg image file.  My actions are played in Photoshop with no document opened.  After my action is play there is a single collage document in Photoshop that contains layers that can be tweaked all text is in text layers the can be edited.
    If I wanted to automate the batch population of a single collage template I think all I would need to know is three thing.
    1.) The location of the input images
    2.) The full Path of the PSD template file.
    3.) The location to store the output  file
    Looking at some of the recent threads in this forum I could almost cut and past the script you want to put  together.  There was a recent thread that had javascript code to process files in a folder and process only a list of file types.   There also was a thread that had a place function in it to place images into the current document or create a new document to place the image into.  The image was read from the web using a URL.  This thread has code to change a text layer.  At first I though you may need to open these image file to get at its meta-data to get the Portrait image Exif creation data.  But see all you need is the Filename for it has the data you want the year and name.  So the function that get the image files from the folder will give you that. The   Script needs to Open the Template PSD file and retrieve the prototype text layers text content  then the scrip needs a loop that get the next image file to be processed from the folder get filename function. In the loop the image files are place into the open template above a place holder layer like the Background layer. Then using the prototype text contents and the filename are used  create the new content for the text layer and then change the text layers content to it.  Follow that up with a save as for the output file.  Once the output file is saved delete the placed smart object layer.  When this loop ends the script will close the document with no save and end. As for the three inputs you need  the script could either have a dialog like the images processor or simply prompt you for the folders and template file.

Maybe you are looking for