How to output a postscript file with .ps extension name in jsp?

Hi,
I could use a servlet to output a postscript file with .ps file extension name. But I tried to do the same with jsp, for some reason, jsp always outputs a file with .jsp extension name though the content is postscript. Could anyone help me on this? Here is my jsp code:
<%@page contentType="application/postscript"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<%@page import="java.io.*" %>
<jsp:useBean id="corresv" class="oiintranet.CorresVBean" scope="request"/>
<%
response.setContentType("application/postscript");
String corresId = request.getParameter("Id");
corresv.setCorresId(corresId);
PrintWriter output = response.getWriter();
output = corresv.getResult(output);
output.flush();
%>
In the bean corresv:
public class CorresVBean extends BaseBean {
private String corresId;
public void setCorresId(String s) {
this.corresId = s;
public PrintWriter getResult(PrintWriter output) {
//get postscript file content from a socket, one string line each time until reaches "X_END"
String str;
while ((str = in.readLine()) != null) {
if (str.equals("X_END")) break;
output.println (str);
output.close();
}catch(Exception e) {
e.printStackTrace();
return output;
Thank you in advance.
Geraldine

Hi
Every time u want to make a file u need to make its extension. I am talking
about general scenario like word, excel so even when u make spool file
so u need to give extension.
like
Spool temp.sql
it will save u r file as sql file.
hope it will help
regards

Similar Messages

  • How do I make ALL files with RTF extension open in Nisus Writer?

    How do I make ALL files with RTF extension open in Nisus Writer? Right now it opens in Text Edit. I don't want to change it for one file. I want all files, regardless of how many or where they are.

    select a .rtf file in finder and enter command+i. in the resulting popup go to the "open with" section and change the app to open it to Nisus Writer and click "Change All".

  • How can I overwrite a file with the same name in Content DB?

    Hi All,
    In Content DB if I upload a file with the same name as a previous one, the application shows the warning message:
    " ...You cannot upload "XXXXXX.doc" to "Test 1" because an item with the same name already exists ..."
    And the alternatives are "Create Version" or "Cancel" the operation. Is there any way to overwrite a previous file as we can do it in Oracle Files ?
    Regards
    Harvey

    Hi All,
    Can anybody from the Content DB product development answer this question?
    Regards
    Harvey

  • SPD 2010 - How to know if a file with a given name already exists in a document library

    Hi,
    I've created a workflow using SPD. One of the steps in there is changing the name of the document to a clean name. This workflow fails if a document with this same name already exists in my document library. Is there a way to check in a SPD workflow if
    a document with a given name already exists in my document library ?
    Marc Nemegeer

    Hi,
    According to your post, my understanding is that you wanted to know if a file with a given name already exists in a document library.
    You can use a SharePoint Designer workflow to achive it.
    To test to see if a document exists, you need to use condition:
    If Current List:Name  equals  [%Current Item:Title%].docx
    Here is a similar thread for you to take a look at:
    http://social.technet.microsoft.com/Forums/en-US/cc227020-ce81-4c08-aee0-a66789d8ad05/test-to-see-if-document-exists?forum=sharepointcustomizationprev
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can u open a file with .exe extension after it was unpacked?

    Thank you Linc Davis for THE ARCHIVER, I was able to unpacked the program. However, after it was unpacked, I clicked the file wtih .exe extension and I got a message that this file will not be extract with this program. Is there another way to open file with .exe extension after it was unpacked by THE ARCHIVER...??? Any assistance is highly appreciated.

    .exe files are Windows executables and do not run in OS X.  You would have to install Windows to use it.
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    1. Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    2. Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    3. VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    4. CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    5. VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    6. Last is Q.  Q is a freeware emulator that is compatible with Intel Macs.  It is much slower than the virtualization software, Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • How to save an XML file with a proper name and how to maintain the history?

    Hi All,
    As per the requirement, I have to remane the name of the XML file which is under the KM repository Userhome/personaldocuments based on the user logon information.
    I have created a Repository service for the same and following is the code for the same. The service is working, but only for the first entry in the XML form. Second onwards, the file does not get remaned to the preferred one.
    Request you to throw some light as what is wrong or missing in the code, so that I can follow the right approach. Many thanks in advance.
    // Code snippet is here//
    //Starts here//
    com.sap.security.api.IUser epUser;
                                            epUser = UMFactory.getAuthenticator().getLoggedInUser();
                                     String EntID = epUser.getUniqueName();
    IResourceContext resContext = null;
    try {
         resContext = ResourceFactory.getInstance().getServiceContext("cmadmin_service");
    } catch (ResourceException e1) {
              e1.printStackTrace();
    RID rid = RID.getRID("/userhome""/"EntID+"/Personal Documents");
    IResource resource = null;
    try {
         resource = (ResourceFactory.getInstance().getResource(rid, resContext));
    } catch (ResourceException e2) {
              e2.printStackTrace();
    ICollection collection = (ICollection)resource;
    IResourceList resourseList = null;
    try {
         resourseList = collection.getChildren();
    } catch (AccessDeniedException e3) {
              e3.printStackTrace();
    } catch (ResourceException e3) {
              e3.printStackTrace();
         for(int i=0;i<resourseList.size();i++){
              IResource res_new = resourseList.get(i);
                try {
                   res_new.rename("Address_new.xml");
              } catch (NotSupportedException e) {
                                  e.printStackTrace();
              } catch (AccessDeniedException e) {
                                  e.printStackTrace();
              } catch (ResourceException e) {
                                  e.printStackTrace();
    //Code ends here//
    Regards
    DK
    Edited by: DIPENDRA MOHANTY on Jun 5, 2009 5:20 PM

    Hi,
    The code seems ok.
    But you have mentioned about a KM Rep service, what service is that? which event it is listening to?
    Regards
    BP

  • How to put two files with the same name into the same folder?

    How can I put two files with the same name and the same extention into the same directory?
    Is this even possible?
    Thanks in advance. 

    Are you sure? I would be very surprised if that was the case.
    How does the computer/filing system differentiate the files, if not by their names?
    How do you tell the computer which one you want? (On the command line.)

  • How to check-in multiple files with same name having different revision num

    Hi
    Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
    For eg:
    First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
    How to implement this functinality using RIDC API? Any suggestions would be helpful.
    Regards
    Raj
    Edited by: 887680 on Mar 6, 2013 10:48 AM

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
    Regards
    Raj

  • Trying to convert video files with an extension of IDI_DVD to digital files itunes and imovies can read can someone help me

    Can someone please tell me how I can convert video files with an extension of IDI_DVD to a file itunes and imovie can read? Thanks.

    Thanks for the reply, The files are on a DVD disk. I coverted my family VHS tapes to digital dvds using an HP Media Centre PC five or more years ago cant remember the program but if I get info on the disk ,on the Mac it tells me the extension is IDI_DVD.

  • How do I print to a postscript file with InDesign CS6 without both extensions, .indd.ps?

    How do I print to a postscript file without an .indd extension in InDesign CS6? I choose Print, choose a print preset from my print shop and Save. The first time I tried it was blank (the Hide Extension was checked), so I tried to save and got a dialog box that said it cannot be saved as an .indd file (duh), to choose both or .ps. I chose .ps and it was fine, but every time I postscripted it gave me this dialog box until I unchecked Hide Extension. After I did that, every time I postscript it automatically saves both extensions. Not a big deal but it is annoying. I just want it to end with .ps like it used to. Any ideas on how to fix this?
    Thanks!!

    I have no idea but I am incredibly curious...why are you doing this?
    Printing to postscript is a completely archaic workflow. Export to PDF
    instead.
    Bob
    TKnudt <mailto:[email protected]>
    Tuesday, January 15, 2013 6:12 PM
    >
          How do I print to a postscript file with InDesign CS6 without
          both extensions, .indd.ps?
    created by TKnudt <http://forums.adobe.com/people/TKnudt> in
    /InDesign/ - View the full discussion
    <http://forums.adobe.com/message/4996731#4996731

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • How to load unicode data files with fixed records lengths?

    Hi!
    To load unicode data files with fixed records lengths (in terms of charachters and not of bytes!) using SQL*Loader manually, I found two ways:
    Alternative 1: one record per row
    SQL*Loader control file example (without POSITION, since POSITION always refers to bytes!)<br>
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode.dat
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001111112234444
    01NormalDExZWEI
    02ÄÜÖßêÊûÛxöööö
    03ÄÜÖßêÊûÛxöööö
    04üüüüüüÖÄxµôÔµ Alternative2: variable length records
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode_var.dat "VAR 4"
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001501NormalDExZWEI002702ÄÜÖßêÊûÛxöööö002604üuüüüüÖÄxµôÔµ Problems
    Implementing these two alternatives in OWB, I encounter the following problems:
    * How to specify LENGTH SEMANTICS CHAR?
    * How to suppress the POSITION definition?
    * How to define a flat file with variable length and how to specify the number of bytes containing the length definition?
    Or is there another way that can be implemented using OWB?
    Any help is appreciated!
    Thanks,
    Carsten.

    Hi Carsten
    If you need to support the LENGTH SEMANTICS CHAR clause in an external table then one option is to use the unbound external table and capture the access parameters manually. To create an unbound external table you can skip the selection of a base file in the external table wizard. Then when the external table is edited you will get an Access Parameters tab where you can define the parameters. In 11gR2 the File to Oracle external table can also add this clause via an option.
    Cheers
    David

  • How can I print a file with mixed page orientation in windows 8.1?

    I have a win 7 and a win 8.1 computer.  I have a file which contains both landscape and portrait pages.  The file prints correctly with the mixed orientation from the win 7 pc, but will only print with either landscape or portrait on the win 8.1 pc. 
    I am using Adobe reader XI on the win 7 pc and adobe touch on the win 8.1 pc

    ส่งจาก จดหมายของ Windows
    จาก: Pat Willener
    ส่งเมื่อ: จ. 5 มกราคม 2558 6:15
    ถึง: thang dinhvan
    How can I print a file with mixed page orientation in windows 8.1?
    reply from Pat Willener in Adobe Reader Touch for Windows 8 - View the full discussion 
    I have a win 7 and a win 8.1 computer.  I have a file which contains both landscape and portrait pages.  The file prints correctly with the mixed orientation from the win 7 pc, but will only print with either landscape or portrait on the win 8.1 pc. 
    I am using Adobe reader XI on the win 7 pc and adobe touch on the win 8.1 pc
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7064031#7064031 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7064031#7064031
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Reader Touch for Windows 8 by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • There is no 'Save as' under the file menu.  How do I save a file with another name?

    Numbers help refers to the 'Save As' function in the File menu.  My version (latest) does not have a 'Save As' function.  How do I save a file with another name?

    Ross Millard wrote:
    Badunit. You have an original file and an edited file. Now you duplicate the edited file and save it with a different name. Now do you have to go and delete the changed file from which the duplicate had been made? And.... is the original still unchaned... still original?
    Ross,
    For the situation you describe, Apple has provided Duplicate and Revert. Use File > Duplicate to reach this menu:
    Regards,
    Jerry

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

Maybe you are looking for

  • Issue on transporting a Request to quality

    HI, i have created a Function module(FM) . for that FM i have created a BOR in SWO1. I created a  TR for the function module. but while releasing it on development it said 'It is locked by a TR D01k990678'(that means somebody has created a TR earlier

  • Songs Transferred from ITUNES to IPOD NANO don't appear in IPOD NANO

    Help. I tried to do something simple: add songs to my ipod nano. Though the songs "appear" in the itunes gui when the ipod symbol is selected, I don't see these songs in my ipod when I eject it. I have updated itunes (6.0.4.2) and ipod software (1.1.

  • More connections in application...

    Hi! I need to create more connections in my app. So I have 2 users in DB. I created two connections under Application Resources in my project. How can I say that for first AppModule I want to use one connection, but for second AppModule I want to use

  • I am not able to read the xslt table column value.

    Hi, I have the scenario like this. I have two irpt pages  first.irpt and  second.irpt and saperate xslt tables for each page  and common js file for two pages. when I click on first.irpt   page xslt table row that opens  the  second.irpt as a popup w

  • Disk Issues with UltraBay 2ndHD Sata Adapter

    I'm having a bit of a wierd issue and I don't really know where to turn to. When I upgraded to my T61 I bought a Sata Ultrabay Drive adapter into which I stuck the old 100gb sata disk out of my R60 (which met an untimely end). The disk itself works f