Servlet: send back text and images to the requester

Hi,
I need some help about servlet responses.
I want to send back some text (and maybe some images) back to the requester after a POST request.
Can you give me some tips ?
thanks

aneuryzma wrote:
I want to send back some text (and maybe some images) back to the requester after a POST request.
Can you give me some tips ?Tip: Make up your mind. You can only send one thing as the response. If you want to send text, then send text. If you want to send an image, then send an image. In any case you should set the content type to indicate what you're sending.
You can only send a mixed bag of text and images in the unlikely case that you've defined your own content type along with a client which understands it. Or if you zip them all into a zip archive, or something like that.

Similar Messages

  • Text and images in the same component?

    Ok... a lil help please :
    into what component can i put text and images at the same time
    as in...
    example, what component could contain data like this :
    Hello this is me <imageofmyself> and this is my house <imageofmyhouse>... bye all !
    thanks in advance,
    Jonathan, a.k.a. Kyraz

    You could use a Swing HTMLPANE or draw it all onto a
    BufferedImage and display that (code posted under 2D graphics thread).
    MArk

  • How can I combine a lot of text and images on the same screen?

    How can I combine a lot of text and images on the same screen?  I can get a couple of words on the screen with a graphic but not 10 lines.  I need 10 lines on the page with the image. 

    Priscilla,
    I routinely combine 10 lines of 36 pt bible or lecture text to a suitable background using Boris Title 3D.
    Many times the text is too long to fit the screen using Boris, so I devide it into 2 or more parts with no transition between sections.
    In my case, the text is on the screen as the speaker quotes them.
    David

  • How can I erase the residual background text and images from the backside of a scanned page?

    How can I erase the residual background text and images from the backside of a scanned page?
    Also, I wanted to know what each subscriptions included as far as my question above is concerned?
    I am trying to edit a scanned page (pdf file) by changing some words and erasing the background from the page that is showing through it since the paper is so thin and want to know which subscription to buy in order to complete these tasks?

    This cannot be done in Reader. I think you will need software like Photoshop. You may be able to get buy with Photoshop Elements, but I haven't used recent versions of that software. Using either software this will not be an automated task.

  • Need text and image in the message

    Hi,
    I need to send an email with an image and text as part of the message, Ill do the following but it jsut takes the text and as an attachment, how can I include both content in the body of message??
    BodyPart texto = new MimeBodyPart();
    texto.setContent(fichero, "text/html");
    multipart.addBodyPart(texto);
    // Procesar la imagen
    MimeBodyPart imagen = new MimeBodyPart();
    imagen.attachFile("C:/Documents and Settings/Administrador/Mis documentos/Sandra/epinuevo/web/imagenes/logo150px.jpg");
    imagen.setHeader("Content-ID", "<figura1>");
    MimeBodyPart imagen1 = new MimeBodyPart();
    imagen1.setText("Sandra");//.attachFile("C:/Documents and Settings/Administrador/Mis documentos/Sandra/epinuevo/web/imagenes/logo150px.jpg");
    imagen1.setHeader("Content-ID", "<nombre>");
    multipart.addBodyPart(imagen1);
    message.setContent(multipart);
    Thanks!!

    Milene wrote:
    bshannon wrote:
    If you're still having trouble, you can find a message created by some other
    program that has the overall structure you want, and then copy its structure.I dont understand what do u mean exactly.You want your message to look and behave a certain way.
    Find another message (with different content), that looks and behaves similarly to what
    you want. Perhaps you can create such a message using another mailer. Or perhaps
    you've received a message from someone else that is similar to what you're trying to do.
    Then, look at that message using the "view source" function of your mailer. You'll see all
    the MIME headers, etc. You can then use a similar MIME structure in your message.
    You'll also see the content of the body parts and how the content references images and
    URLs. Use a similar technique in your message.
    But I was trying to include the image and the text as 2 different MimeBodyPart, now I found a simple solution I add html code as part of the message where there is a reference to the image, all the text in in the code.
    But now I have a problem cause I have in that html code an URL as an > but when i recieve the mail the url doesnt work, is there any other funciont to add urls in a special way???
    A URL reference like "xxxx.jsp" is implicitly relative to the html page containing the reference.
    When you include the html content in a mail message, the reference is relative to the mail
    message. That's not what you want. You want the reference to point to your web site. The
    simplest solution is to just use a reference like "http://myserver/myurl/xxxxx.jsp".
    Note that viewing html in a mail message is not exactly the same as viewing html on a web
    page. Different mailers will impose different restrictions on what you can do in the html in a
    mail message.

  • Stretched text and image with FULL_SCREEN_INTERACTIVE after Air player update

    One of my Air applications uses StageDisplayState.FULL_SCREEN_INTERACTIVE to switch to full screen during the presentation of some sheets.
    Everything worked fine untill some users reported a streching of texts and images in the sheets.
    It turns out that the problem occurs after an update from the Adobe Air Player to 3.1 from  2.7.
    The first screen shots shows the text as it should be, the second screen shot shows the text after the update of the Air Player.
    The code used to go into the Full Screen mode is:
        public function setFullScreenInteractive(fullScreenWidth:int = Constants.INT_SCREEN_WIDTH_SMALL, fullScreenHeight:int = Constants.INT_SCREEN_HEIGHT_SMALL):void
                             s.fullScreenSourceRect = new Rectangle(          0, 0, fullScreenWidth, fullScreenHeight);
            s.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    with  Constants.INT_SCREEN_WIDTH_SMALL = 800 and  Constants.INT_SCREEN_HEIGHT_SMALL = 600.
    I can reproduce the problem on a couple of computers with Windows Xp but it's not happening on all the computers I've tested.
    Any idea how to fix this (without telling my users to Uninstall the current Air Player and reinstall the Air Player 2.7)?
    Regards,
    Bart

    Hi Bart,
    Unfortunately the correct screenshot link appears to broken.  Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.  It would also help if we had a sample project/application that we can reproduce this issue with.  If you'd like to keep this private, please feel free to send it to me directly at [email protected]
    Thanks,
    Chris

  • Printing text and images together on a single page (printjob)

    Hello all,
    how am I able to print both text and images on the same page (defined by one printjob), using the javax.print API?
    It seems that one printjob (one page) can have only one flavor, that is text, or GIF, or JPEG, etc. Since the majority of print jobs out there usually require text and graphics on the same sheet this seems a bit strange.
    I have resorted on creating a PDF file through the iText library, and then printing by converting to GIF (quality is significantly reduced though, not an option), or by using the Acrobat Reader command line from java (looks dangerous for batch printing). My printer does not support printing directly using the PDF flavour.
    So, I solved the problem by converting to PDF, but printing is still cumbersome. Any other ideas?
    Thank you for your time,
    Ari.

    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Is the BSP extension better than this solution(Text and Image in Button)?

    Hi guys,
    I have a  concept question to decide whether a BSP extension is needed.
    I want to put text and image in htmlb button, and used the solution like below:
    <%
      data image type ref to cl_htmlb_image.
      data: image_string type string.
      create object image.
      image->id = 'back'.
      image->src = cl_bsp_mimes=>sap_icon( id = '@9S@' ).
      image->tooltip = 'Go back'.
      clear image_string.
      image_string = image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
            %>
            <xhtmlb:toolbarButton id      = "back"
                                  onClick = "back"
                                  text    = "<%= image_string %>" />
    But this solution is not desired by customer, since they don't think it looks nice. So is it possible to create my own BSP extension to get a nicer element?
    Thanks for any hint.
    Regards,
    Liying

    Hi,
    By a nicer element...did you mean to display a better image...or a nicer image ????
    if yes, the you can upload any image you need and then use it here...
    Tell me if you need more information...!!
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • The latest Firefox version won't expand to make text and images more visible on my 32" screen, although I have tried to adjust the advanced Windows appearance settings in the same way that has worked in previous versions of Firefox.

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

  • Is there a way to add images , text and button in the individual marquee of a carousel

    Is there a way to add images , text and button in the individual marquee of a carousel ?

    Write a custom carousel.  Usually carousel components are just ULs that use something like jQuery to rotate through the LIs.  The foundation carousel component is really just designed for some specific use cases.  Generally I would just recommend rolling your own.

  • Facebook is not loading properly and all my text and images are lined up along the right side of the page. How can this get fixed to the way it use to be?

    Facebook is not loading properly and all my text and images are lined up along the right side of the page. How can this get fixed to the way it use to look?
    Everyone who logs into Facebook on my Firefox has this problem however if we use Internet Explorer - facebook looks normal.

    If you have increased the minimum font size then try the default setting "none" as a high value can cause issues like you described.
    * Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    *Tools > Options > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"

  • When I print a webpage from FF how can I make the text and images bigger?

    I am trying to print an eticket for a flight. The text on the schedule comes out too small and the UPC symbol's black lines look ganged together. I know I can view it zoomed up, but how do I make the text and images stay zoomed so they will print out that way?

    I upgraded but the problem remains. At least with Firefox I do have the option to print a selection even if it mangles the top and bottom lines. With Safari or Chrome I have no option to print a selection. At the moment the only way to get a complete copy of the selection is to copy to openoffice etc and print from there.

  • Drag and drop the text and image

    Hi,
    I need help in drag and drop text and image.
    I am able to drag and drop the text and image in doc but  i want to drag the text in text frame and image in image frame only.
    For this how to get textframe id or is there any other way to do this. Pls help me if anyone know how to do this one.
    Thanks
    Arun

    This thread is pretty old, but this can help anyone in the future:
    To handle a drop in InDesign, you have to implement your own custom CDragDropTargetFlavorHelper. You can find a working example in SDK Sample. Take a look at BasicDragDrop.sdk project in the SDK.

  • Is it possible to extract the text and images using PHP

    Hi friends,
    Is it possible to extract the text and images using PHP, in the same order as it is in the PDF?
    Else is it possible extract the same as XML using PHP, or ASP
    I googled it but its in vain, any help is appreciated.
    Thanks in advance.

    Dear Mike,
    Thanks for your quick reply,
    I mean is it possible to parse the PDF line by line using the PHP.
    I extracted the whole text but couldn't the images. Since the PDF's images are decoded using various methods like DCTDecode, JPXDecode, etc.
    The text is decoded with FlateDecode, which i breaked using a function in PHP.
    Thanks,

Maybe you are looking for

  • RGB to CMYK (channels) with PixelConduit plugin

    As I'm unable to submit a user tip yet, I thought I'd share my solution here for anyone looking to simulate CMYK channels in Motion/FCPX. PROBLEM For some reason you want to convert your RGB source clip to extract individual CMYK (Cyan, Mangenta, Yel

  • File adapter PUT operation with header row.

    i have schema generated in the below format. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"             xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"             xmlns:tns="http://TargetNamespace.com/InboundService"             targetNam

  • Mini logo in front of the http

    HI, I need your help! I have been trying to add a mini logo in front of my http adreess in the window bar. Like the one of adobe in front of http://www.adobe.com/ is it possible in dreamweaver ? thanks a lot, Philo

  • Anyone have experience with RED 4k on an iMac?

    I've just been called in to teach editing with PPro CS5 on an iMac here at the school where I work, at 9:30 tomorrow morning. I've not used macs very much, and I've never used PPro on the Mac. The class had been using FCP (that was the editor of choi

  • Good receipt - invoice receipt

    Hi gurus, Do you know if exist a table that contain the link good receipt document - invoice receipt document? If not, do you know the way to link this documents? Thanks in advance Regards