Specifying file name for ServletOutputStream ?

Hello,
How can I specify a file name for a ServletOutputStream ? The code below always defaults to file name "MinimalBinaryStream" ?
Thanks for your help !!!
James
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class MinimalBinaryStream extends HttpServlet
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    doGet(request, response);
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("application/octet-stream");
    response.setContentLength(3);
    ServletOutputStream bout = response.getOutputStream();
    bout.write(0x31);
    bout.write(0x32);
    bout.write(0x33);
    bout.flush();
    bout.close();
}

Thanks nantucket,
I have solved the problem by editing my "web.xml" file, for example:
<web-app>
    <servlet-mapping>
        <servlet-name>MinimalBinaryStream</servlet-name>
        <url-pattern>/myfile.bin</url-pattern>
    </servlet-mapping>
</web-app>

Similar Messages

  • How to specify file names for the generated code in wscompile

    Hi,
    We want to follow a certain file naming conventions for the artifacts generated by wscompile.
    How is it possible to set the name for the service interface file, service implementation file etc....
    This is possible in AXIS ant task Wsdl2Java. How do we do it for wscompile.
    thanx

    Thanks Chris and c. Under Description I'm presented with three Names for the profile: ASCII, UniCode and Mac Script. ASCII and Mac Script are the same name for the profile, with nothing being in the UniCode Name box. Which do I change -- both?
    Am I going to screw things up in Photoshop if I change these names to something I can comprehend? Looks like I may just have to make a sticky-note list of the cryptic profile names with my own descriptive name as a reference. Thanks.

  • Error: binding operation "locate" must specify a name for its input message

    Hello everybody.
    I have a WSDL file created by .NET and I want to generate the corresponding Java classes.
    I am using JWSDP 1.5. I have created a config.xml as following:
    <?xml version="1.0"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"
      <wsdl location="http://blablabla.asmx?WSDL"   packageName="blabla"  />
    </configuration> I also add the following line after the <configuration xmlns
    xmlns:tns="tnsFromWsld">As value I add the value appeared at tag of xmlns:tns from WSDL file.
    I received in both cases the following exception:
    "error: binding operation "locate" must specify a name for its input message".
    Does anybody knows what is the problem?
    I really appreciate your help.

    Hi berobero,
    You can only have the device in either Workgroup mode or Active Directory mode, not both. Which are you trying to set it up as?
    Have questions and need answers?
    Search the database for answers to FAQ's, software/driver downloads, tutorials, news, features and more!
    LenovoEMC Support & Downloads
    LenovoEMC North America Support Contact Page

  • How to create Same file names for source and target.

    hi
    Can any body send Procedure for below requirement.
    how to create the dynamic file names for a source and save the file with same name in the Target, because it has to identify that which sender had sent the file and the target file should be again sent back to the customer as a link.
    Please help me.
    Thanks

    Hi,
    See the below link
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - sender file name as receiver file name
    Regards
    Chilla

  • I just found an error in the file name for my Camera Raw Cache file.  How do I correct it?

    I just found an error in the file name for my camera raw cache file.  The error is in my username.  I don't know how to correct the error or if I should just leave it.  I'm not sure where my cache file is stored on my computer.  Any help would be appreciated.
    Thank you

    Since you are on a Mac if when you first set up your account you left out the i in Wilson nothing you do will change that. The REAL account name will always be alicewlson. Once an account is created you can't actually change the name of it. You can change the name that is displayed but not the REAL account name.
    Simplest thing to do is stop worrying about it. Everything is as it should be, that is except Wilson being spelled without the i.
    Lilac50 wrote:
    When I searched finder for "alicewlson" I found a long list of files like this:
    2014-07-22 12.50/File005.nef[15:16:35.212] (debug) src/ImageLoader.cpp:363: File: /Users/alicewlson/Recovered/2014-07-22 12.50/File002.nef[15:18:02.173] (debug) src/StoreXMLFile.cpp:21: /Users/alicewlson//.rpro/rpro.cfg
    I believe I made the error in my user name when I first got my computer a year ago. I then corrected it under my user name but not in my Lightroom files. I also looked for files with a .lrdata extension and didn't find any.

  • How to read a ftp file with a specified file name in Proxy-XI-File scenario

    Dear all,
    I have the following requirement:
    The end user send a request via the proxy to XI, within the request parameters there is a file name, and the XI need to retrieve the file content from a ftp server with this specified file name, how can I achieve this?
    According to my understanding, the file receiver adapter can only write the files to the server.
    Thanks and regards,
    Bean

    Dear Bean,
    This can be achieved using a BPM...
    you will have to use Two parallel receive steps within a fork...
    1. 1st receive step :This will bring the data from the proxy
    2. 2nd receive step :according to pipeline step before this step would be executed interface determination would be called withini that you can put a mapping wherin the source and target message type would be as follows
    a. source message type ; the file structure that is going to be picked from ftp structure
    b.target message type : same structure as source except at top you will add "filename" field
    (you cna find on forum how we can get a fielname in the mapping ..in case you dont knw )
    3. now you can define correlation on the field "fielname" in both the receive steps provide the hirearchy and structure of data coming from both file and procy are same...
    4..  after corelation you can put any steps like transformation ( as you want)
    Hope this helps

  • How to modify 'Specified File Name' of a scheduled report

    I run a daily scheduled report every morning and send it out as an emailed attachment. My problem is, I want the file name of the pdf attachment to include the previous day's date. How can I modify the 'Specified File Name' setting in the destination tab to reflect the previous day's date. I do not want to use %SI_STARTTIME% because that only shows the date&time that the report was actually run....I need the previous date. So far I am unsuccessful.
    Thanks

    Hi,
    i think this is only possible via the SDK. I would recommend creating a Support Message with SAP to solve this issue.
    Maybe there is already Samplecode available from the Support.
    Regards
    -Seb.

  • Assign Logical file name for the physical file path through Program

    Hi all,
    I am having a physical file which is getting generated dynamically. It is having the date and time stamp in its name which is added at runtime.
    Now I need to assign a logical file name for the physical file path through the program.
    Is there any FM or any other method to assign the same.
    Gaurav

    I think it is not possible. becuase the date & time added at runtime. so if you check the table  PATH you can find filename and their definitions

  • How do i change the HTML file names for existing index

    Hi,
    How do i change my existing HTML file names for indexes. The Html file name is disabled when we click on properties.
    Ex:   Index Keywork : Architecture
            Old HTML Page/URL =: Architecture.htm
    I want to change  Old HTML Page/URL =: Architecture.htm to architecture_new.htm
    Please find the screenshot attached.

    That's because you are looking at the Properties and that is not how you create index entries.
    Highlight the Index keyword ("Paste" in this example). It shows below what is already linked. If you delete that, the keyword will be displayed in bold to show no keyword is attached. You can add further keywords by dragging them from the Topic List.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do I change the .php file name for a page of my site?

    how do I change the .php file name for a page of my site? The only link to the page is the nav. button link for it in the global nav. The reason I need to change the file name is we want the breadcrumbing name to change and the breadcrumbing is linked to the file name.

    The reason I need to change the file name is we want the breadcrumbing name to change and the breadcrumbing is linked to the file name.
    I don't understand this reason. How would changing the file extension solve your breadcrumb issue? Why don't you explain the issue in more detail.

  • Displaying File Name for Photo and Video Clips in Premiere Elements 10

    I am using Premier Elements 10 on a Windows 7 Pro desktop computer to create
    a project consisting of 128 jpg photo and mp4 video clips.  Before creating
    the project I created a short file name for each clip describing its
    content.  I've added menu tags at locations which separate the project into
    discrete segments.  I've selected a disc menu which utilizes the menu tags I
    created.  I previewed the project and I'm satisfied that the DVD disc I
    intend to create will display everything I want except for one thing.  I
    have spent several hours trying to find out how to have each displayed clip
    include the file name (without extension) somewhere near the edge of each
    window as it is opened in the finished production.  I sure would appreciate
    some help with the steps needed to accomplish this.

    Welcome to the forum.
    This can most easily be accomplished by adding a Title (maybe from a Lower-Thirds Title Template), above each Clip/Still Image.
    I would create one such Title, and manually add the "File Name" in the location desired. Then, place that on a higher Video Track, above the Clip/Still. Then, just use the Duplicate Title function, to create a new Title, with the Text and Style, per the first - edit the Text for each, as required.
    I know of no automated method to grab the Clip's/Still's File Name, and add that to a Title, as PrE does not support any scripting.
    Good luck,
    Hunt

  • Import tables using same file name for all tables

    hi,
    We are using oracle 11.2.0.3.0, we have taken export of multiple tables in schema, unfortunately in exp command we have mention same file name for all the tables, now it has created one file for all export but the size of that file shows that all the tables included in it , when we try to import the tables only last table mention in export command is imported for other tables it hangs, example of code show below.
    Is there any way to import the remaining tables.
    exp system file =exp05042013.dmp tables=gr.table1
    exp system file =exp05042013.dmp tables=gr.table2
    exp system file =exp05042013.dmp tables=gr.table3

    Hi,
    You can use as :
    exp username@database tables=table1,table2 file=tabledata.dmpDid you have any RMAN full backup?
    Why you are not recover crash database?
    Mahir

  • File names for photos on iPad?

    How do find the file name for photos in iPhoto on the iPad?

    To the best of my knowledge, you can't do it on the iPad. But after syncing, you can just click on a given photo in iPhoto and the name will appear in the "title" field in the Information box on the left-hand side of the iPhoto window.
    (Make sure you have that little icon of an "i" in a circle checked in the bottom left corner next to the search bar, or you won't see the Information pane.)

  • Unique Render File Name For Clips?

    How do I create a unique output file name for each clip in my timeline that is edited?
    Example:
    REEL_123.MOV appears 3 times on my timeline at different edit points. I need the output to  be REEL_123_1.MOV REEL_123_2.MOV etc. etc. Or something similar.
    I tried Src.FileName + General.RenderStartTime12hrs thinking that would give me a unique output name but it doesn't. Well, it kinda does, but if the clips are too close together on the timeline it looks like they all get created the same time resulting in a non-unique filename.
    Any suggestions?
    Cheers.

    Add General.EditNumberPadded.4 (from the Common catagory) as the first or the last string to your output name.

  • What are shortest file names for outlook express and PSE11 to import photos pls

    what are shortest file names for outlook express and PSE11 to import photos pls

    Hi, Troubled. The size of the file name is pretty much irrelevant here to PSE, but to answer your question directly, you will be able to import a file that has only a single character as its file name (plus the file name needs to have the required extension, such as .jpg)

Maybe you are looking for

  • Excel attachment in mailing program

    Hi, I am sending excel attachment in the mailing program. The attachment contains 56 lines, but the problem is the attachment which is coming with 22 line only in mail . What may be the problem? Regards,

  • PSE4 How to burn slide show to DVD

    I have created a slide show with over 200 photos and added music. After saving it (which took 45 min.) I want to save it to DVD. When I open the burn page it only has VCD option. How do I get it to burn to DVD. I have a Gateway Computer wit an NEC DV

  • Milestone trigger of Activity.

    Hello Friends, I have a Project definition says with header WBS and under which three more WBS (Assembly, Testing and Packing) with activities (Assembly, Testing and Packing) assigned to each WBS. In the activity Testing, I have attached a milestone

  • Change application parameter during runtime

    Hello, I have a WD application that expects a parameter: system_name. The parameter is defined in the application parameter field and is correctly interpreted by the handledefault function of the startup event default. The handledefault event handle

  • KERN INVALID ADDRESS ERROR

    Hello, I have an old computer that I'm letting someone use and an app they are trying to utilize keeps shutting down with the following error. If anyone can shine some light on what it is that is causing this, it would be much appreciated. Thank you.