Help needed in reading file

Hi all,
I am designing a web system that takes paragraph from a user and store it into database so that we can use those later to create a document using different paras from the database so that the user don't have to type anything.
Now i want to approach this as the following:
1. I am taking user input using HTML TEXTAREA because we don't know how long is the para is gonna be.
2. How can receive that TEXTAREA in the next page when the user submit that to the database. Can i use
String para=request.getParameter("astring"); the problem is para size could be anything i don't know what size of data can a string take. So can anyone suggest me what should i use
3. Next. When i receive the para i want to create a TEXT file and store the para AND i will save the name and location of the para in the database rather than the whole para in database.
4. Next when the query made system can show those para by taking the address from the database and then opening the file and copying those data in HTML TEXT area again to show to the user.
Can anyone please help me how can do that.
I really need your help.
Thanks

Hi,
Sounds like its really big inputs you are expecting. String are objects and have no such restrictions as seen at simple types. To my knowledge Strings have no limits in length.
So use the request.getParameter("string");
Make sure though that your form method id POST.
I think you should make a field in your database to where you can post your text directly. They can be made to contain quite big amount of data. Reading and writing to files are expensive. I'm using Postre and mssql having fields containing up to 15 MB data. Should be suficient in many cases.
Good luck to you

Similar Messages

  • Help needed making SWF file loop

    Hello Everyone-
    I have been researching this topic and am really struggling.
    I'm not much of a HTML guy and I think I'll need to do some to
    resolve my issues. I have searched and searched but I'm not having
    any luck.
    I create an animation in Apple Motion, exported it as a MOV
    and imported it as video into Flash CS3. It was encoded using
    Progressive download from server it creates a FLV file a SWF file
    and an HTML file. My provider is 1and1. I then use Adobe GoLive to
    create my webpage and upload to the web. I need my SWF file to loop
    and I cannot get it to loop.
    In flash. Everything plays fine. When I do a publish preview
    however, the swf file does not loop. I've got the loop option
    checked in my publish preview settings and even in the inspector in
    GoLive but it does nothing.
    Here is the link to the page. And the source code. If anyone
    can help me that would be genius.
    PS there is actually two SWF that I need to loop. Neither of
    them are looping.
    http://www.drewwfilms.com/Index2.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type"
    content="text/html;charset=utf-8" />
    <meta name= content="Adobe GoLive" />
    <title>Drew W Films Index</title>
    </head>
    <body>
    <div
    style="position:relative;width:750px;height:571px;margin:auto;-adbe-g:p;">
    <div
    style="position:absolute;top:64px;left:16px;width:720px;height:150px;">
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    height="150" width="720">
    <param name="loop" value="true" />
    <param name="movie" value="IndexHeader2/IndexHeader2.swf"
    />
    <param name="quality" value="best" />
    <param name="play" value="true" />
    <embed height="150" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    src="IndexHeader2/IndexHeader2.swf"
    type="application/x-shockwave-flash" width="720" quality="best"
    play="true" loop="true"></embed>
    </object></div>
    <div
    style="position:absolute;top:16px;left:64px;width:624px;height:32px;-adbe-c:c">
    <menumachine name="indexheader2" id="mre8mxf">
    <csobj t="Component"
    csref="menumachine/indexheader2/menuspecs.menudata"><noscript>
    <p><a class="mm_no_js_link"
    href="menumachine/indexheader2/navigation.html">Site
    Navigation</a></p>
    </noscript> </csobj>
    <script type="text/javascript"><!--
    var mmfolder=/*URL*/"menumachine/",zidx=1000;
    //--></script>
    <script type="text/javascript"
    src="menumachine/menumachine2.js"></script>
    <script type="text/javascript"
    src="menumachine/indexheader2/menuspecs.js"></script>
    </menumachine>
    </div>
    <div
    style="position:absolute;top:224px;left:16px;width:720px;height:304px;">
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    height="304" width="720">
    <param name="loop" value="true" />
    <param name="movie" value="IndexHeader2/IndexBody.swf"
    />
    <param name="quality" value="best" />
    <param name="play" value="true" />
    <embed height="304" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    src="IndexHeader2/IndexBody.swf"
    type="application/x-shockwave-flash" width="720" quality="best"
    play="true" loop="true"></embed>
    </object></div>
    </div>
    <p></p>
    </body>
    </html>

    The problem you are encountering is that you are telling the
    SWF to loop, when in fact you need to tell the FLV to loop.
    Unfortunately, you need to code a few lines of Actionscript
    to get this to work, you would think that it would be as simple as
    just checking an option.
    I don't know if you have an AS2 or AS3 project, so I'm going
    to give you both for the code.
    Actionscript 2:
    1. Select the FLVPlayback component on the stage.
    2. In the Actions panel, enter the following:
    on(complete){
    this.autoRewind = true;
    this.play();
    Actionscript 3:
    1. Select the FLVPlayback component on the stage, and give it
    an instance name by entering some text in the properties panel.
    (Upper left corner of the panel, right under where it says
    "Component" there is a text input box. This is where you input it.)
    Names are commonly things like "myFLVPlayback" or "myVideo" etc.
    2. Deselect everything.
    3. In the actions panel, enter the following (replacing
    "myVideo" with the instance name you chose):
    myVideo.addEventListener(VideoEvent.COMPLETE,doLoop);
    function doLoop(evt:VideoEvent):void {
    evt.currentTarget.play();
    Either of those blocks of code should work for you. Simply
    add them to your flash project and re-export the SWF.

  • URGENT HELP NEEDED! sort files randomly

    Hi
    I'm a film student and my final project needs to be finished in less than a week! I have a series of images which I need to appear in a random order in my timeline in Final Cut Express. I used Automator to add a series of numbers to the beginning of each filename corresponding to when each image was created/modified, in the hope that that would reorder them, but since they were all exported from Final Cut in the first place they were all created and modified at pretty much exactly the same time, so that didn't really help. I read somewhere that if you know AppleScript it would be a matter of minutes to write a script that could add a string of random alphanumerical characters to the beginning of a series of filenames, but I don't know AppleScript and I don't have time to learn it. Does someone out there know of a solution?
    Many thanks!

    User Craig Smith over in the AppleScript forums provided me with this helpful little script, which solved my problem:
    set a to choose folder
    tell application "Finder"
    set all_Files to every file in folder a
    repeat with a_file in all_Files
    set a_file's name to ((random number from 100 to 999) as text) & a_file's name
    end repeat
    end tell
    Copy and paste it into Script Editor (/Applications/AppleScript), press "Compile" and then "Run", and it will ask you to choose a folder, all the files in which will then receive a random three-digit number between 100 and 999 to the beginning of their filenames. Handy!
    Message was edited by: Bacchus

  • Help needed in reading data from a Crystal Report

    I am trying to read data values from a saved crystal report. (groovy code snippet below)
    I open a new ReportClientDocument and set the RAS using the inprocConnectionString property.
    Then I get the rowsetController and set defaultNumOfBrowsingRecords, rowsetBatchSize and maxNumOfRecords all to 1000000
    Using the browseFieldValues method after that returns only 100 records. I want to get all.
               ReportClientDocument clientDocSaved;
           def pathout=rc.pathToSavedReports+rr.path;
         //****** BEGIN OPEN SAVED SNAPSHOT ************
         clientDocSaved = new ReportClientDocument();
         clientDocSaved.setReportAppServer(ReportClientDocument.inprocConnectionString);       
            // Open report
         println("Reading file in.")
         clientDocSaved.open(pathout, OpenReportOptions._openAsReadOnly);
           def rowsetController = clientDocSaved.getRowsetController()
         rowsetController.setDefaultNumOfBrowsingRecords(1000000)
         rowsetController.setRowsetBatchSize(1000000)
         rowsetController.setMaxNumOfRecords(1000000)
         //setup metadata
         IRowsetMetaData rowsetMetaData = new RowsetMetaData()
         Fields fields =  clientDocSaved.getDataDefController().getDataDefinition().getResultFields()
         rowsetMetaData.setDataFields(fields)
         def values = rowsetController.browseFieldValues(fields.get(0), 1000000)
         values.each{value->
            println(value.displayText(new Locale("ENGLISH")))
    Before using the browseFieldValues method I was trying to use a rowsetCursor
                //get the rowset cursor to navigate through the results
                RowsetCursor rowsetCursor = clientDoc.getRowsetController().createCursor(null, rowsetMetaData)
                //navigate through the rowset and log the name and value
                rowsetCursor.moveTo(0)
                while(!rowsetCursor.isEOF()){
                     Record currentRecord = rowsetCursor.getCurrentRecord()
                     //println("current record number: " + rowsetCursor.getCurrentRecordNumber())
                     for(int i=0;i<fields.size();i++){
                          //println("Column - "+fields.get(i).getName())
                          if (currentRecord.size()>0){
                              println(currentRecord.getValue(i))
                     rowsetCursor.moveNext()
    the currentRecord was always an empty list and I did not get any data values at all.
    Am I missing something in using these approaches?
    I'm fairly new to using the Java SDK for CR. Any help will be greatly appreciated.
    Thanks

    hi, I am trying this second method to read the values from report. but all the records comming as null. Kindly help me to resolve this issue.

  • Help needed:Printing HTML file using javax.print

    Hi
    I am using the following code which i got form the forum for rpinting an HTML file.
    The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
    public boolean printHTMLFile(String filename) {
              try {
                   JEditorPane editorPane = new JEditorPane();
                   editorPane.setEditorKit(new HTMLEditorKit());
                   //editorPane.setContentType("text/html");
                   editorPane.setSize(500,500);
                   String text = getFileContents(filename);
                   if (text != null) {
                        editorPane.setText(text);                    
                   } else {
                        return false;
                   printEditorPane(editorPane);
                   return true;
              } catch (Exception tce) {
                   tce.printStackTrace();
              return false;
         public String getFileContents(String filename) {
              try {
                   File file = new File(filename);
                   BufferedReader br = new BufferedReader(new FileReader(file));
                   String line;
                   StringBuffer sb = new StringBuffer();
                   while ((line = br.readLine()) != null) {
                        sb.append(line);
                   br.close();
                   return sb.toString();
              } catch (Exception tce) {
                   tce.printStackTrace();
              return null;
         public void printEditorPane(JEditorPane editorPane) {
                   try {
                        HTMLPrinter htmlPrinter = new HTMLPrinter();
                        htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
                   } catch (Exception tce) {
                        tce.printStackTrace();
         * Sets up to easily print HTML documents. It is not necessary to call any of the setter
         * methods as they all have default values, they are provided should you wish to change
         * any of the default values.
         public class HTMLPrinter {
         public int DEFAULT_DPI = 72;
         public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
         public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
         int x = 100;
         int y = 80;
         GraphicsConfiguration gc;
         PrintService[] services;
         PrintService defaultService;
         DocFlavor flavor;
         PrintRequestAttributeSet attributes;
         Vector pjlListeners = new Vector();
         Vector pjalListeners = new Vector();
         Vector psalListeners = new Vector();
         public HTMLPrinter() {
              gc = null;
              attributes = new HashPrintRequestAttributeSet();
              flavor = null;
              defaultService = PrintServiceLookup.lookupDefaultPrintService();
              services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
              // do something with the supported docflavors
              DocFlavor[] df = defaultService.getSupportedDocFlavors();
              for (int i = 0; i < df.length; i++)
              System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
              // if there is a default service, but no other services
              if (defaultService != null && (services == null || services.length == 0)) {
              services = new PrintService[1];
              services[0] = defaultService;
         * Set the GraphicsConfiguration to display the print dialog on.
         * @param gc a GraphicsConfiguration object
         public void setGraphicsConfiguration(GraphicsConfiguration gc) {
              this.gc = gc;
         public void setServices(PrintService[] services) {
              this.services = services;
         public void setDefaultService(PrintService service) {
              this.defaultService = service;
         public void setDocFlavor(DocFlavor flavor) {
              this.flavor = flavor;
         public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
              this.attributes = attributes;
         public void setPrintDialogLocation(int x, int y) {
              this.x = x;
              this.y = y;
         public void addPrintJobListener(PrintJobListener pjl) {
              pjlListeners.addElement(pjl);
         public void removePrintJobListener(PrintJobListener pjl) {
              pjlListeners.removeElement(pjl);
         public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.addElement(psal);
         public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
              psalListeners.removeElement(psal);
         public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
                   if (ps == null || jep == null) {
                        System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
                        return false;
                   // get the root view of the preview pane
                   View rv = jep.getUI().getRootView(jep);
                   // get the size of the view (hopefully the total size of the page to be printed
                   int x = (int) rv.getPreferredSpan(View.X_AXIS);
                   int y = (int) rv.getPreferredSpan(View.Y_AXIS);
                   // find out if the print has been set to colour mode
                   DocPrintJob dpj = ps.createPrintJob();
                   PrintJobAttributeSet pjas = dpj.getAttributes();
                   // get the DPI and printable area of the page. use default values if not available
                   // use this to get the maximum number of pixels on the vertical axis
                   PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
                   int dpi;
                   float pageX, pageY;
                   if (pr != null)
                        dpi = pr.getFeedResolution(PrinterResolution.DPI);
                   else
                        dpi = DEFAULT_DPI;
                   MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
                   if (mpa != null) {
                        pageX = mpa.getX(MediaPrintableArea.INCH);
                        pageY = mpa.getX(MediaPrintableArea.INCH);
                   } else {
                        pageX = DEFAULT_PAGE_WIDTH_INCH;
                        pageY = DEFAULT_PAGE_HEIGHT_INCH;
                   int pixelsPerPageY = (int) (dpi * pageY);
                   int pixelsPerPageX = (int) (dpi * pageX);
                   int minY = Math.max(pixelsPerPageY, y);
                   // make colour true if the user has selected colour, and the PrintService can support colour
                   boolean colour = pjas.containsValue(Chromaticity.COLOR);
                   colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
                   // create a BufferedImage to draw on
                   int imgMode;
                   if (colour)
                        imgMode = BufferedImage.TYPE_3BYTE_BGR;
                   else
                        imgMode = BufferedImage.TYPE_BYTE_GRAY;
                   BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
                   Graphics myGraphics = img.getGraphics();
                   myGraphics.setClip(0, 0, pixelsPerPageX, minY);
                   myGraphics.setColor(Color.WHITE);
                   myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
                        java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
                   // call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
                   rv.paint(myGraphics, rectangle);
                   try {
                        // write the image as a JPEG to the ByteArray so it can be printed
                        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
                        ImageWriter writer = (ImageWriter) writers.next();
                                       // mod: Added the iwparam to create the highest quality image possible
                        ImageWriteParam iwparam = writer.getDefaultWriteParam();
                        iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
                        iwparam.setCompressionQuality(1.0f); // highest quality
                        ByteArrayOutputStream out = new ByteArrayOutputStream();
                        ImageOutputStream ios = ImageIO.createImageOutputStream(out);
                        writer.setOutput(ios);
                        // get the number of pages we need to print this image
                        int imageHeight = img.getHeight();
                        int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
                        // print each page
                        for (int i = 0; i < numberOfPages; i++) {
                             int startY = i * pixelsPerPageY;
                             // get a subimage which is exactly the size of one page
                             BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
                                                 // mod: different .write() method to use the iwparam parameter with highest quality compression
                             writer.write(null, new IIOImage(subImg, null, null), iwparam);
                             SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
                             printDocument(sd, ps);
                             // reset the ByteArray so we can start the next page
                             out.reset();
                   } catch (PrintException e) {
                        System.out.println("Error printing document.");
                        e.printStackTrace();
                        return false;
                   } catch (IOException e) {
                        System.out.println("Error creating ImageOutputStream or writing to it.");
                        e.printStackTrace();
                        return false;
                   // uncomment this code and comment out the 'try-catch' block above
                   // to print to a JFrame instead of to the printer
                   /*          JFrame jf = new JFrame();
                             PaintableJPanel jp = new PaintableJPanel();
                             jp.setImage( img );
                             JScrollPane jsp = new JScrollPane( jp );
                             jf.getContentPane().add( jsp );
                             Insets i = jf.getInsets();
                             jf.setBounds( 0, 0, newX, y );
                             jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
                             jf.setVisible( true );*/
                   return true;
              * Print the document to the specified PrintService.
              * This method cannot tell if the printing was successful. You must register
              * a PrintJobListener
              * @return false if no PrintService is selected in the dialog, true otherwise
              public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
                   if (ps == null)
                   return false;
                   addAllPrintServiceAttributeListeners(ps);
                   DocPrintJob dpj = ps.createPrintJob();
                   addAllPrintJobListeners(dpj);
                   dpj.print(doc, attributes);
                   return true;
              public PrintService showPrintDialog() {
                   return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
              private void addAllPrintServiceAttributeListeners(PrintService ps) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < psalListeners.size(); i++) {
                   PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
                   ps.addPrintServiceAttributeListener(p);
              private void addAllPrintJobListeners(DocPrintJob dpj) {
                   // add all listeners that are currently added to this object
                   for (int i = 0; i < pjlListeners.size(); i++) {
                   PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
                   dpj.addPrintJobListener(p);
              // uncomment this also to print to a JFrame instead of a printer
              /* protected class PaintableJPanel extends JPanel {
                   Image img;
                   protected PaintableJPanel() {
                        super();
                   public void setImage( Image i ) {
                        img = i;
                   public void paint( Graphics g ) {
                        g.drawImage( img, 0, 0, this );
    Thanks
    Ram

    Ram,
    I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
    Regards,
    Kevin

  • Search help - Need to read dynpro of the calling program

    Hello all,
    We have a requirement where we need to read the dynpro of the calling program of a search help.
    Say I have a screen (selection screen, module pool or ALV grid etc) where I have a field PARTNER with whom a custom search help is attached. But on this same screen there is another field RLTYP. What we want is that when an F4 is taken on PARTNER, the value of RLTYP should also be passed as value to the Search help exit.
    In short, we need to read the screen fields of the calling screen of a search help.
    Any ideas are appreciated.
    Regards
    Priyanka

    Check the sample code:
    FUNCTION F4IF_SHLP_EXIT_OFFRCONT.
    ""Local interface:
    *"  TABLES
    *"      SHLP_TAB TYPE  SHLP_DESCT
    *"      RECORD_TAB STRUCTURE  SEAHLPRES
    *"  CHANGING
    *"     VALUE(SHLP) TYPE  SHLP_DESCR
    *"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
      DATA : ws_flag(1) TYPE c,
             ws_rec(1)  TYPE c.
      DATA : i_dynpfields TYPE dynpread OCCURS 0 WITH HEADER LINE.
      DATA : ws_data TYPE ddshiface,
             i_data TYPE ddshifaces.
      ws_flag = 'X'.
      ws_rec = 'X'.
      IF ws_flag = 'X'.
        i_dynpfields-fieldname = 'P_CUST'.
        APPEND i_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_READ'
          EXPORTING
            dyname               = sy-cprog
            dynumb               = '1000'
          TABLES
            dynpfields           = i_dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            invalid_parameter    = 7
            undefind_error       = 8
            double_conversion    = 9
            stepl_not_found      = 10
            OTHERS               = 11.
        READ TABLE i_dynpfields WITH KEY fieldname = 'P_CUST'.
        ws_data-shlpfield = 'ZCUSTOMER'.
        ws_data-valfield = 'G_SIMFIELDS-FIELDNAME'.
        ws_data-value = i_dynpfields-fieldvalue.
        APPEND ws_data TO i_data.
        ws_data-shlpfield = 'ZOFFRCONT'.
        ws_data-valfield = 'P_CONT'.
        ws_data-f4field =     'X'.
        APPEND ws_data TO i_data.
        LOOP AT shlp_tab.
          IF ws_rec = 'X'.
            shlp_tab-interface[] = i_data[].
            APPEND shlp_tab.
            ws_rec = ' '.
          ENDIF.
        ENDLOOP.
        DELETE shlp_tab INDEX 1.
        ws_flag = ' '.
      ENDIF.
    ENDFUNCTION.
    Regards,
    Prakash.

  • Help needed with Reader Integrated Key

    Hi,
    I have develop a plug-in and apply for Reader Integrated Key License. This plug-in have been tested with acrobat and reader professional and it is working.
    I follow the advice from the above website and use RIKLATools.zip to created the pair.
    i have just receive the Reader Integrated Key from Adobe,I tried all method but the key  does not work with the plug-in. What is the fool proof way to integrate my Reader Integrated Key with the plug-in to get a digtally signed plug-in?
    Urgent help needed as we are submitting the plug-in to client.
    many Thanks in advance
    Regards
    Jia hao

    Thank you lrosenth, i will email them

  • Help needed in splitting files using BPM

    Hello experts,
    I am working on an interface where i need to split files within BPM.
    I know,i can achieve it in Message Mapping by mapping Recordset to Target structure and then using Interface Mapping within Transformation step.But i dont want to follow this.Is there an alternative way to achieve this within BPM.
    I have an input file with multiple headers and i need to split for each header.My input file looks like this:
    HXXXXXABCDVN01
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN02
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN03
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    Is there a way, where i can specify this condition within BPM , that split files for every H.
    Thanks in advance.
    Regards,
    Swathi

    Hi,
    have your target structure with occurence as 0...unbounded in the mapping and map the header filed to the root node (repeating parent node) of the target structure....this will create as many target messages as the header fileds....if you want to send these messages separately then use a block in BPM with ForEach option....
    Splitting and Dynamic configuration can be applied in the same mapping.
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 18, 2008 12:59 PM

  • Need help- need to read a customer table from the payroll schema

    Hi gurus,
    I need to read an amonunt from a customer table in the payroll schema. Is it possible to input TABLE XXXX in the schema, or is impossible to read from a customer table?Do I need to create a report to upload the amount in an infotype?
    Thanks in advanced for for support!

    You should create your own custom operation (based on operation TABLE) to read your custom table from a Payroll PCR.
    If your custom table's name is longer than 5 characters, you may be required to use operations VAOFF and/or VALEN prior to your custom operation in the PCR.

  • Urgent Help Needed regd reading a file in apex

    Hi all,
    I need to know how can we store content of a file in a variable or any item(like text box).
    i have a os user name in the file.
    when i use apex_util.get_file it is opening in new page.
    instead i want it to stored in a text box or any variable.
    cany any one help me on this.
    Thanks in advance,
    Srini
    Message was edited by:
    user650963

    Hi Srini,
    You can use the normal file upload functionality to do this.
    1 - Create a page region and add in a File Browse item - I'll call it P1_FILE_NAME
    2 - Create a button in that region, I'll call it P1_UPLOAD_BUTTON, and set it to branch back to the same page
    3 - Create a TextArea item - I'll call it P1_FILE_CONTENTS
    4 - Create a page process, called P1_UPLOAD_FILE, and triggered by the P1_UPLOAD_BUTTON
    5 - Use the follownig code for the process:
    declare
    v_clob clob;
    v_blob blob;
    v_varchar2 varchar2(30000);
    BEGIN
    SELECT blob_content into v_blob FROM APEX_APPLICATION_FILES where name = :P1_FILE_NAME;
    v_clob := wwv_flow_utilities.blob_to_clob(v_blob,'utf-8');
    :P1_FILE_CONTENTS := wwv_flow_utilities.clob_to_varchar2(v_clob);
    :P1_FILE_NAME := '';
    delete from APEX_APPLICATION_FILES WHERE NAME = :P1_FILE_NAME;
    END;When you select the file and click the Upload button, the file is uploaded into the APEX_APPLICATION_FILES table. The contents of the file is put into a BLOB field. The above code, converts that BLOB into a CLOB and then into a VARCHAR2 value - you can then change P1_FILE_CONTENTS to that value. Finally, the code removes the file from the table and resets the File Browse field.
    Note that this assumes that the file contains nothing but text and is no more than 30,000 characters in length.
    Andy

  • Help needed regarding reading in a text file and tokenizing strings.

    Hello, I require help with a task I've been set, which asks me to read in a text file, and check the contents for errors. The text file contains lines as follows.
    surname:forename:1234:01-02-06
    I can read in the file, but dont know how to split the strings so each token can be tested (ie numbers in the name tokens)
    However, I am not allowed to use regex functions, only those found in java.io.*
    I think i should be putting the tokens into an array, but have had no luck so far in doing so. Any help would be appreciated.

    public class Validator {
         public static void main(String args[]) {
              String string = "Suname:Forename:1234:01_02-06";
              String stringArray[] = string.split(":");
              System.out.println (validateLetters(stringArray[0]));//returns true
              System.out.println (validateNumbers(stringArray[3]));//returns false
         static boolean validateLetters(String s) {
                 for(int i = 0; i < s.length(); i++) {
                 char c = s.charAt(i);
                 if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z')) {
                         return false; //return false if one of characters is other than a-z A-Z
                 }//end if
                 }//end for
                 return true;
         }//end validateLetters
         static boolean validateNumbers(String s) {
                 for(int i = 0; i < s.length(); i++) {
                 char c = s.charAt(i);
                 if ((c < '0' || c > '9') && (c != '-')) {
                         return false; //return false if one of characters is other than 0-9 or -
                 }//end if
                 }//end for
                 return true;
         }//end validateNumbers
    }

  • Help Needed, problem reading a configuration file in XML form

    Hello,
    I am using NetBeans 6.5.1 with Apache Tomcat 6.0.18.
    I am trying to develop a web application and in my source files I have a thread that loops every second and reads the contents of a configuration file which is in XML form using java.util.Properties.
    As soon as I call props.loadFromXML(new FileInputStream(file)); I get several exceptions that I don't know what they mean nor I know how to resolve them.
    I would apreciate any help you guys can provide.
    Here is what I get in NetBeans:_
    Apr 30, 2009 8:56:53 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy
    INFO: WSSERVLET15: JAX-WS servlet destroyed
    Apr 30, 2009 8:56:53 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
    INFO: WSSERVLET13: JAX-WS context listener destroyed
    Apr 30, 2009 8:56:53 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
    INFO: Illegal access: this web application instance has been stopped already. Could not load META-INF/services/javax.xml.parsers.DocumentBuilderFactory. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    Apr 30, 2009 8:56:53 PM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:111)
    at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:75)
    at java.util.XMLUtils.load(XMLUtils.java:57)
    at java.util.Properties.loadFromXML(Properties.java:852)
    And following the above I get:_
    Apr 30, 2009 8:56:53 PM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already. Could not load com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:111)
    at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
    at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:75)
    at java.util.XMLUtils.load(XMLUtils.java:57)
    at java.util.Properties.loadFromXML(Properties.java:852)
    Thanks in advanced.

    kimskams wrote:
    Very Sorry Problem Remains... I checked Scanner on a Smaller file (to give u fast feedback) but I think the spaces in Small file were normal.. that is why it worked..
    In fact I can feel some word on the blank line (hidden words).. its cursor who evidence their presence so Its not working..
    Its a big program which is accessing a lexical resource so I think what I copied was Ok..
    If u still have some solutions then please tell me otherwise I have to remove these blank lines manually for the time being but its not solution.
    I m trying alsoI don't think anyone can give you an answer: people here don't know how your file looks like. Obviously those lines (when the Scanner instance stops reading) are not just empty lines.

  • Help needed in reading text file to database table

    Hello experts,
    i have to insert the values from the column of this text file and insert them in my database table.
    I have done a few file to table insertions but i'm having some trouble with this one.
    Any suggestions plz
    thanks
    liab_report      1.00                                                                                                                              Page: 1
    CDC:00537 / Mon Jun-21-2010                           LIABILITY REPORT                               Mon Jun-21-2010 22:06:26
    DRAW    1; SET    1;  November 7, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         701040.00          0.00     660146.00          0.00      40894.00    0.00          0.00
        Div3        1444128.00          0.00    1330056.00          0.00     114072.00    0.00          0.00
        Div4        4711900.00          0.00    3889700.00          0.00     822200.00    0.00          0.00
                    6857068.00          0.00    5879902.00          0.00     977166.00    0.00          0.00
    DRAW    2; SET    1;  November 14, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         817817.00          0.00     817817.00          0.00          0.00    0.00          0.00
        Div3        1687405.00          0.00    1611742.00          0.00      75663.00    0.00          0.00
        Div4        3402100.00          0.00    3034200.00          0.00     367900.00    0.00          0.00
                    5907322.00          0.00    5463759.00          0.00     443563.00    0.00          0.00
    DRAW    3; SET    1;  November 21, 2009
                         TOTAL       PAID ON         TOTAL    EXPIRED ON         TOTAL    FRAC   OUTSTANDING
                       WINNERS      06/21/10          PAID      06/21/10       EXPIRED   ROUND
      DIVISION          AMOUNT        AMOUNT        AMOUNT        AMOUNT        AMOUNT  AMOUNT        AMOUNT
        Div1              0.00          0.00          0.00          0.00          0.00    0.00          0.00
        Div2         779933.00          0.00     769804.00          0.00      10129.00    0.00          0.00
        Div3        1605548.00          0.00    1525104.00          0.00      80444.00    0.00          0.00
        Div4        4891700.00          0.00    4256800.00          0.00     634000.00    0.00        900.00
                    7277181.00          0.00    6551708.00          0.00     724573.00    0.00        900.00

    Plz clarify whether u want to load text file as a file into database or value of this text file into database. If values are to be loaded from this text file, U can better format the text file and use SQL loader to load the file into database. By formatting the database, i mean remove the unnecessary headings and characters, kee only the values to be loaded idelimited by ' '(space) or ','(comma). Create a control file and load it into the target table.

  • Urgent help needed - writing/ reading to/from file

    hi all..
    can anyone help me with this problem:
    The problem dioscussed in www.javaworld.com forum
    any clues what the problem is??

    hi all...
    i managed to get the gui set up, and the JList is finally loading the data,
    yet, i am having problems with displaying relevant data of each item in the list...
    could you please help??
    // required imports
       import javax.swing.*;
       import java.awt.*;
       import java.awt.event.*;
       import javax.swing.event.*;
       import java.io.*;
       import java.util.*;
    // ViewPanel class: the panel for the view pane. handles its own events.
       public class ViewPanel extends JPanel implements ListSelectionListener
          private JList list;
          private DefaultListModel listModel;
          private JButton deleteButton;
          private TicketStorage data;
       // add pane items
          private JLabel seat, seatData;
          private JLabel name, nameData;
          private JLabel duration, durationData;
          private JLabel price, priceData;
          private JCheckBox waiterService;
       // creating panels
          JPanel p1 = new JPanel();
          JPanel p2 = new JPanel();
          public ViewPanel(TicketStorage data)
          // store data structure reference
             this.data = data;
             TrainTicket[] summary = data.summary();         
             listModel = new DefaultListModel();
             for (int i = 0; i < summary.length; i++)
                listModel.addElement(summary.getSeat());
    list = new JList(listModel);
    list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    list.setSelectedIndex(0);
    list.setVisibleRowCount(5);
    JScrollPane listScroller = new JScrollPane(list);
    listScroller.setPreferredSize(new Dimension(100, 150));
    seat = new JLabel("Seat No:");
    seatData = new JLabel();
    name = new JLabel("Name:");
    nameData = new JLabel();
    duration = new JLabel("Duration:");
    durationData = new JLabel();
    price = new JLabel("Price:");
    priceData = new JLabel();
    // create add pane items
    waiterService = new JCheckBox("Waiter Srevice");
    waiterService.setEnabled(false);
    // waiterService.addActionListener(boxListener);
    JButton deleteButton = new JButton("Delete");
    // deleteButton.addActionListener(buttonListener);
    // adding listeners to the components
    //deleteButton.addActionListener(this);
    //waiterService.addActionListener(this);
    list.addListSelectionListener(this);
    // adding the components to their coreesponding panels
    p1.setLayout(new GridLayout(5,1));
    p1.add(seat);
    p1.add(name);
    p1.add(duration);     
    p1.add(price);
    p1.add(waiterService);
    p2.setLayout(new GridLayout(5,1));
    p2.add(seatData);
    p2.add(nameData);
    p2.add(durationData);     
    p2.add(priceData);
    p2.add(deleteButton);
    this.setLayout(new GridLayout(1,3,3,0));
    this.add(listScroller);
    this.add(p1);     
    this.add(p2);
    public void valueChanged(ListSelectionEvent e)
    if (e.getValueIsAdjusting() == true)
    // enable the delete button when an item is selected
    deleteButton.setEnabled(true);
    // retrieve the sellected seat number value
    String itemSellected = listModel.getElementAt(list.getSelectedIndex()).toString();
    // retrieve the ticket with the sellected seat number
    TrainTicket tk = data.retrieve(itemSellected);
    // load the relevant data of a sellected ticket
    seatData.setText(tk.getSeat());
    nameData.setText(tk.getName());
    durationData.setText(Integer.toString(tk.getDuration()));
    priceData.setText(Double.toString(tk.getPrice()));
    /*/ if the selected ticket of type first class
    if(tk instanceof FirstClassTicket)
    if(((FirstClassTicket)tk).getWaiter()==true)
    waiterService.setSelected(true);
    waiterService.setEnabled(true);
    else
    waiterService.setSelected(false);
    waiterService.setEnabled(true);
    else
    waiterService.setSelected(false);
    waiterService.setEnabled(false);
    the application runs, it loads the data available in the linked list,
    yet, on switching from an item to another in the list, it keeps generating errors!!!
    in addition to the fact that it does not display the data!!
    for more info refer to the url in my first post!
    any clues??

  • Help needed recovering project files from trash

    Hi everyone, I am hoping that someone will be able to help me. I just did something stupid!
    I created two new projects in iMovie this morning and then needed to clear out the mac in order to speed up a clip as I was getting the warning that my disk was full. So I copied a lot of files from iPhoto onto a hard drive and then moved them to trash including the raw files that I was using for these projects. (I got a bit carried away!) Yes the video files were in iPhoto and not iMovie Events as the last time I uploaded files iMovie was not playing the game.
    The files are still on the mac as I have not emptied the trash and they are also backed up on an external drive connected to the mac, but I have emptied the iPhoto trash. I tried importing the files back into iPhoto from trash and only got so far before the disk full message came up again. But even those ones that I did manage to re import are not showing up.
    Is there any way that I can continue with these projects or have I effectively ruined them? Do I need to start again from scratch? I hope not as they took me hours and hours to create and had pretty much finished them.
    Any help will be greatly appreciated. Thanks. :-)

    http://pondini.org/TM/17.html
    To see these "other" backups, you need the Browse Other Backup Disks or (Browse Other Time Machine Disks on Snow Leopard or Leopard) option.  It's available by Alt/Option-clicking the Time Machine icon in your Menubar, or by control-clicking (right-clicking) the Time Machine icon in your Dock.

Maybe you are looking for

  • ? Brand New phone, same iTunes: How to transfer without losing apps/music

    In preparation for a new device, is it possible to transfer all your apps, music, bookmarks from iTunes to your new device without losing your apps/music, etc?  If so, how?  What are the steps involved?  For example, if you have an iPod Touch and wan

  • Runtime.exec error - java.lang.NullPointerException

    Hi, I am trying out the example code from javaWorld that shows how to use exec to execute external command. The problem is that I aways run into java.lang.NullPointerException on line that has "Process proc = rt.exec(cmd);" I have tried to run the co

  • Commit and roll back problem in java and MS SQL

    I want to ask some Question ... I used this code con.setAutoCommit(false); con.commit(); it will throw Exception... [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode. I think it is a solve on

  • Wont print get error messages works fine on internet explorer

    Any time I want to print something it gives me an error message.This has happened for a while.Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: https://support.mozilla.com/media/css/questions-min.css?build=2d0a4d1 Line:

  • ACE: Can I loadbalance based on client Source IP/and client tcp source port?

    We recently migrated serving a client from being thick client at the desktop to being served via a citrix farm.  Prior to the migration the clients came from about 5000 unique source IP's to their VIP, now they come from only 31 unique source IP's fr