Querystring directed to same file returning null

I have a jsp (say customer.jsp). When it is called from the previous page it is called without any querystring variable. But there is a hyperlink within the page which calls itself and passes a querystring variable as Sort by Name.
I'm reading the parameter using String sort = request.getParameter("sort"). In WAS 4 environment it is working fine, but in WAS 5.1.1 environment the value of 'sort' variable is always null, but when I see the url, it contains the querystring.
Please help me ASAP.
Thanks..

I agree. Try getting everyting inside quotes.
<a href="customer.jsp?sort=abc">Sort by Name</a>.if you are println() then do the following:
out.println("<a href=\"customer.jsp?sort=abc\">Sort by Name</a>");and just for the sake of troubleshooting change the following:
String sort2 = request.getParameter("sort").let us know how you fixed it.

Similar Messages

  • The result of a direct action returned NULL/nil.

    I'm new to Macs so please bear with me. I've been tasked with setting up a new iMac (20 inch display - totally stock - bought on Saturday.) After plugging it in and started running through the registration, setting up the wireless access then it looked like the setup was doing something with the camera suddenly it flashed to the following message:
    "the result of a direct action returned NULL/nil." the Continue and Back buttons at the bottom of the page were dimmed out. The only thing I could do was reboot the computer.
    Is there any way to restart the "setup sequence" - as if I just plugged it in and turned it on for the first time? Have I missed anything in the setup because of this error? Anyone know why this happened? I've tried to search on this topic but couldn't find anything. If I've missed something please direct me to the appropriate link.
    Thanks.
    20 inch iMac 2.16GHz Intel Core 2 Duo   Mac OS X (10.4.6)  

    Go to ~user/Library/Assistants and double click the file Send Registration.setup and it should relaunch the Mac OS X Setup Assistant.

  • Binding for "File Content Repository Path" is returning null value

    I have created a data control for file based content repository based on an existing file system path. *But when this data contol is invoked the command "#{bindings['getURI_returnURI'].inputValue}" is returning null.*+
    Please advice what are possible scenarios. I have performed the following
    #1. Create a file system folder in windows XP named "C:\CPContentRepository" and add some html pages into this folder.
    #2. Create a "content" project in the application.
    #3. Create a "Content Repository Data Control" named "CPFileContentRepository". Repository Type : "File System", Base Path : "C:\CPContentRepository". Test & Registration is successful.
    #4. Add a "panel horizontal" into jsf jsp "ContentTest" page & drap-dop data control "CPFileContentRepository--> getURI(String)--> Return--> URI". select return type as "ADF Output Text".
    #5. Edit Authorization of the "ContentTest" page definition for "View --> anyone".
    #6. Edit Authorization of the "ContentTest" page definition bindings "getURI" for "Invoke --> anyone".
    #7. Run the "ContentTest" page. The output for the page is empty.
    Regards,
    Vikki

    There're two major problems in your code. One you have used different names to get your parameters like in your first jsp they're like
    <input type="text" name="did" size="20" </p>
      <p align="center"> </p>
      <p align="center"><b>Name        </b>          
      <input type="text" name="name" size="20"></p>
      <p align="center"> </p>
      <p align="center"><b>Specialist In         
      <input type="text" name="specialist" size="20"></b></p>
      <p align="center"> </p>
      <p align="center"><b>Address                
      <input type="text" name="address" size="20"></b></p>
      <p align="center"> </p>
      <p align="center"><b>Phone no.            
      <input type="text" name="phno" size="20"></b></p>
      <p align="center"> </p>but when you're getting you're doing it like this
    String name = request.getParameter("name");
         String did = request.getString("did");
         String add = request.getParameter("add");
         String specilist = request.getParameter("specilist");
         String phno = request.getParameter("phno");First get them with same name as you have them in your first jsp. another thing in that you're not used form tag in write way... You have created submit button in some other form
    and when you're pressing submit button actully you're submitting only that form value and your form1 is not submitted that's why you're getting null values for
    those parameters you're getting with right name

  • Why ResultSet getDate() method returns null when querying .csv file?

    Here is the full code:
    import java.sql.*;
    import java.sql.Types;
    import java.sql.Date;
    import myjava.support.CachedRowSetMaker;
    import javax.sql.rowset.CachedRowSet;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    class jdbc2{
    final private String s1="SELECT top 10 [DATE], [ADJ CLOSE] FROM [vwo-1.csv]";
    private ResultSet result=null;
    private Connection conn=null;
    public static void main(String[] args) throws SQLException{
    jdbc2 db=new jdbc2();
    try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              db.conn = DriverManager.getConnection("jdbc:odbc:STOCK_DATA");
              PreparedStatement sql=db.conn.prepareStatement(db.s1);
              db.result=sql.executeQuery();
    // check column names and types using the ResultSetMetaData object.
              ResultSetMetaData metaData = db.result.getMetaData();
         System.out.println("Table Name : " + metaData.getTableName(2));
         System.out.println("Field\t\tDataType");
         for (int i = 0; i < metaData.getColumnCount(); i++) {
         System.out.print(metaData.getColumnName(i + 1) + "\t");
         System.out.println(metaData.getColumnTypeName(i+1));
         System.out.print(metaData.getColumnName(1) + "\t"+metaData.getColumnName(2)+"\n");
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    catch (Exception e) {
    System.out.println("Error: " + e.getMessage());
         finally {
              db.result.close();
              db.conn.close();
    Everything works well, until getting to the block
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    The getDate("DATE", Calendar.getInstance())); always returns null, instead of the date value in the vwo-1.csv.
    Even though I change it to
    java.sql.Date d=db.result.getDate("DATE") and convert to String using .toString(), I still gets nulls. The dollar amount in "Adj Close" field is fine, no problem.
    The .csv fils is downloaded from YahooFinace.
    Can anyone review the code and shed some light as to what I did wrong?
    Thanks alot.

    CREATE TABLE `login` (
    `username` varchar(40) DEFAULT NULL,
    `password` varchar(40) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `amount` (
    `amountid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `amount` bigint(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `paymentid` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`amountid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `applicationfee` (
    `applicationfeeid` int(11) DEFAULT NULL,
    `applicationamount` int(11) DEFAULT NULL,
    `applicationfee` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `category` (
    `categoryid` int(11) DEFAULT NULL,
    `categoryname` varchar(40) DEFAULT NULL,
    `categorydescription` varchar(500) DEFAULT NULL,
    `cattype` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `commission` (
    `commissionid` int(11) DEFAULT NULL,
    `bussiness` int(11) DEFAULT NULL,
    `commission` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `customer` (
    `cacno` int(11) NOT NULL DEFAULT '0',
    `name` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `cphone` varchar(40) DEFAULT NULL,
    `cmobile` varchar(40) DEFAULT NULL,
    `caddress` varchar(500) DEFAULT NULL,
    `cstatus` varchar(20) DEFAULT NULL,
    `cphoto` longblob,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`cacno`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `daybook` (
    `closingbal` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `extraincome` (
    `categoryid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `employee` (
    `empno` int(11) DEFAULT NULL,
    `empname` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `sal` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `image` (
    `id` int(11) DEFAULT NULL,
    `image` blob
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `loan` (
    `loanid` int(11) NOT NULL DEFAULT '0',
    `loanamt` varchar(40) DEFAULT NULL,
    `payableamount` double DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `payableinstallments` int(11) DEFAULT NULL,
    `monthlyinstallment` varchar(20) DEFAULT NULL,
    `surityname` varchar(20) DEFAULT NULL,
    `applicationfeeid` int(11) DEFAULT NULL,
    `interestrate` float DEFAULT NULL,
    `issuedate` date DEFAULT NULL,
    `duedate` date DEFAULT NULL,
    `nextduedate` date DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(20) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    `interestamt` double DEFAULT NULL,
    `pendingamt` float DEFAULT NULL,
    PRIMARY KEY (`loanid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `md` (
    `mdid` int(11) NOT NULL DEFAULT '0',
    `mdname` varchar(40) DEFAULT NULL,
    `mdphoto` varchar(100) DEFAULT NULL,
    `mdphone` varchar(40) DEFAULT NULL,
    `mdmobile` varchar(40) DEFAULT NULL,
    `mdaddress` varchar(500) DEFAULT NULL,
    PRIMARY KEY (`mdid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partner` (
    `pid` int(11) NOT NULL DEFAULT '0',
    `pname` varchar(40) DEFAULT NULL,
    `paddress` varchar(500) DEFAULT NULL,
    `pphoto` varchar(100) DEFAULT NULL,
    `pphone` varchar(40) DEFAULT NULL,
    `pmobile` varchar(40) DEFAULT NULL,
    `pstatus` varchar(20) DEFAULT NULL,
    `mdid` int(11) DEFAULT NULL,
    `mdname` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `nextpaydate` date DEFAULT NULL,
    PRIMARY KEY (`pid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partnerinvested` (
    `pid` int(11) DEFAULT NULL,
    `pname` varchar(20) DEFAULT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountinvested` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `payments` (
    `paymentid` int(11) NOT NULL,
    `categoryid` int(11) DEFAULT NULL,
    `particulars` varchar(100) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `paymentdate` date DEFAULT NULL,
    PRIMARY KEY (`paymentid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `receipts` (
    `receiptid` int(11) DEFAULT NULL,
    `paiddate` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(40) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

  • Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?

    iPLANET ISSUE
    Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?
    CODE
    ServletContext context = mpiCfg.getServletConfig().getServletContext();
    // Debugging
    out.print(context.getServerInfo());     // Get server info
    out.print(&#8220;getRealPath = &#8221; + context.getRealPath("WEB-INF/xsl/RedirectToAcs.xsl"));
    String strXslName = "RedirectToAcs.xsl";
    InputStream is = context.getResourceAsStream("WEB-INF/xsl/"+ strXslName);
    TRACE FROM THE LOG
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]getServerInfo() = iPlanet-WebServer-Enterprise/6.0, getRealPath() = C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl\RedirectToAcs.xsl
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]strXslName = RedirectToAcs.xsl, is = null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][16]ResourceAsStream is null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][30]Problem reading XSL file.
    DIRECTORY DUMP
    C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl>dir
    Volume in drive C has no label.
    Volume Serial Number is 9457-EBF4
    Directory of C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl
    07/22/2002 05:54p <DIR> .
    07/22/2002 05:54p <DIR> ..
    07/22/2002 05:54p 3,086 RedirectToAcs.xsl
    07/22/2002 05:54p 3,088 Response.xsl
    2 File(s) 6,174 bytes
    2 Dir(s) 1,797,405,696 bytes free

    I think there's supposed to be a forward slash before WEB-INF.
    InputStream is = context.getResourceAsStream("/WEB-INF/xsl/"+ strXslName);

  • HT202020 Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Oh, baby! This bad boy flies!! Here's what to expect:
    I had 40,000 images in Aperture 3 and it was dog slow at everything. I installed 3.1 update today. It took 5 minutes to update the database and then behaved marginally better than before at ASIC library navigation. I was disappointed.
    Then I QUIT the app. It took a couple of hours to "update files for sharing" with a counter that went to 110,000 images. So it must have updated every thumbnail and variation of preview. Turned it back on , and BAM. Came up fully in seconds. Paused for 10 seconds ten everything was lickrty split. For the first time ever, I can use the Projects view with all 791 projects and scroll quickly. I even put it in photos modevand whipped thru all 49,000 images!
    Haven't done anybprocessing yet, but i'm liking it!!
    Jim

  • Does readLine return null at end of file?

    My program is reading lines from a file in groups of 5. I want it to stop reading when it has reached the end of the file. Does readLine return null when there are no more lines or is there another way to end a loop like this?
    Thanks!
    try {
    String a, b, c, d, e;
    a = BR.readLine();
    b = BR.readLine();
    c = BR.readLine();
    d = BR.readLine();
    e = BR.readLine();
    while (a != null){
    a = BR.readLine();
    b = BR.readLine();
    c = BR.readLine();
    d = BR.readLine();
    e = BR.readLine();
    }                              

    readLine returns null at end of file. I actually use the following to end my loop...maybe this would help you.
    FileReader file = new FileReader("bkupcandilist.bin");
    BufferedReader buff = new BufferedReader(file);
    boolean eof = false;
    while(!eof) {     //retrieve all candidate names          
         scandi = buff.readLine();
         if(scandi == null) {
            eof = true;
         } else {
            atally = new String[2];
               atally[0] = scandi;
               atally[1] = "0";
               listtally.add(atally);
    buff.close();          

  • Graphics returning null in one place, but not another.

    If you want to compile and run my program.... you can get all the files here:
    http://s94182144.onlinehome.us/randomstuff/files.zip
    (The main classes you'll need to look at are DrawingCanvas, Trig and GraphEngine)
    Here's a visual just in case:
    http://s94182144.onlinehome.us/randomstuff/graph.jpg
    When I click the "Graph It" button, I'm sending all those variables in the window to another class. Except the method I need to call is passed Graphics g... and thus, I needed to create a graphics variable. But it's returning null.
    Here is my code in GraphEngine, which runs when a button is clicked. You'll notice for Graph It... I created a Graphics variable... this returns null. Except you'll also notice I do the same thing for "Clear"... but this works.
    NOTE: I was getting mad so I named some methods not so nicely :p .... you may notice they are different in my files.
         public void actionPerformed(ActionEvent e)
              userDisplay=e.getActionCommand();
              if(userDisplay.equals("Draw"))
                   String progChoice=grapher.graphType.getSelectedItem();
                   System.out.println(progChoice);
                   if(progChoice.equals("Lines"))
                        grapher.allButtons[0].enable();
                        draw();
                   else if(progChoice.equals("Scatter Plot"))
                        lineOfBestFit();
              else if(userDisplay.equals("Graph It"))
                   Trig.graphThisStuff();
                   Graphics g = canvas.getGraphics();
                   canvas.trig(g);
               else if(userDisplay.equals("Clear"))
                    Graphics g = canvas.getGraphics();
                   System.out.println(g);
                    canvas.clear(g);
            else if(userDisplay.equals("Reset"))
                Trig.restartThis();   
              else if(userDisplay.equals("Credits"))
                showInstructionsFrame();
            else if(userDisplay.equals("Help"))
                showHelpFrame();   
            else if(userDisplay.equals("Create Sinusodial Graph"))
                showTrigFrame();   

    1. Do you expect forum members to download and unzip your code? Good luck...
    2. Inside almost every "big" problem is a small one trying to get out. Write a minimal program
    demonstrating your problem (say <50 lines) and post that. The shorter code and the easier it
    is to copy, paste and run, the more forum members will actually give it a go.
    That being said, you problem is that you are using Component's getGraphics at all. Don't use it.
    It doesn't work very well -- they rendering you do is temporary, if you iconify and restore your
    window your changes will disappear (sometimes even moving another window past yours will do this!).
    What should you do instead? Put all your rendering code in paintComponent (or subroutines
    it calls). Changes in state of your app should trigger a call to repaint (or you will call it directly).
    Repainting will eventually cause your paintComponent to be called.

  • GetContextURL returns null using the default ECM repository

    Hello experts,
    This is the scenario.
    We are using the SAP ECM repositoy for document storage in our BPM proyect. In this case we are using the default configuration and repository location  (ecm/default  and DefaultUser), but after the upload, when i try to get the document URL with the method getContentURL(), returns null.
    The ECM documentarion saids than this condition is expected when using a third party repostiory, but this is not the case.
    I appreciate a lot your advices and recomendations,
    Best regards!
    Julio C. Leyva

    Hi Vasil,
    We didn't resolve this issue by this method, because we are using the default ECM repository witch doesn't support the operation getContextURL() and gets the "null" result. If you are using a different repository maybe works.
    Re-checking the API specification, saids:
    getContentURL
    java.lang.String getContentURL() throws InvalidStateException, RepositoryException  Returns a URL that can be used to retrieve the content directly from the respective backend, thus bypassing ECM. Note that this URL might have several restrictions which depend on the connector's backend store, such as a limited lifetime or requiring a user to authenticate with different credentials than the ones used to connect to ECM. Other stores might provide no content URL at all, in which case this method returns null. Applications might want to consider utilizing the ECM WebDAV server to present their users a URL that is located on the same system as ECM.  
    Finally, you would consider to expose a webservice (EJB Session Bean) witch encapsulates the ECMI implementation and extract your file content as a binary array (encode/decode), sending as the input your path/fileName for lookup in the ECM repository.
    Regards!

  • FindNode returning Null And XML Not Accepting Special Characters

    Hi All,
    i am trying the get the attribute value in the element "ns4:InfoCFDi" using FindNode method, but the method is returning NULL. I used the same code for other sample as well and was successfull. but for this specific XML file(which is below) I am getting a Null.
    i can get till S:Body, but when i try to use FindNode for ":Body/s4:ResponseGeneraCFDi" I get Null value.
    And I used "S:Body/*[local-name()=" | "ns4:ResponseGeneraCFDi" | "]";
    as mentioned in other post but still no success.
    ==>I Have one more question relating to special characters. I need to use characters such as - ó in my XML to read as well as write. When I try to read i am getting XML parse error and when writing, i cannot open the file properly.
    Your help is much appreciated.
    My code is here:
    Local XmlDoc &inXMLDoc, &reqxmldoc;
    Local XmlNode &RecordNode;
    &inXMLDoc = CreateXmlDoc();
    &ret = &inXMLDoc.ParseXmlFromURL("D:\Agnel\Mexico Debit Memo\REALRESPONSE.xml");
    If &ret Then
    &RecordNode = &inXMLDoc.DocumentElement.FindNode("" );
    If &RecordNode.IsNull Then
    Warning MsgGet(0, 0, "Agnel FindNode not found.");
    rem MessageBox(0, "", 0, 0, "FindNode not found");
    Else
    &qrValue = &RecordNode.GetAttributeValue("asignaFolio ");
    Warning MsgGet(0, 0, "asignaFolio." | &qrValue);
    End-If;
    Else
    Warning MsgGet(0, 0, "Error. ParseXmlString");
    End-If;
    XML File:
    - <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    - <S:Body>
    - <ns4:ResponseGeneraCFDi xmlns="http://www.xxl.com/ns/xsd/bf/rxx/52" xmlns:ns2="http://www.sat.gob.mx/cfd/3" xmlns:ns3="http://www.xx/ns/bf/conector/1&quo t; xmlns:ns4="http://www.xx/ns/xsd/bfxx/xx/32&qu ot; xmlns:ns5="http://www.xxcom/ns/xsd/bf/xxxxx&q uot; xmlns:ns6="http://wwwxx.com/ns/referenceID/v1">
    - <ns3:Result version="1">
    <ns3:Message message="Proceso realizado con exito." code="0" />
    </ns3:Result>
    - <ns4:InfoCFDi noCertificadoSAT="20001000000100003992" refId="STORFAC20121022085611" fechaTimbrado="2012-10-22T08:56:45" qr=" "
    uuid="a37a7d92-a17e-49f4-8e4d-51c983587acb" version="3.2" tipo="XML" archivo="xxx" sello="B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=" fecha="2012-10-22T08:56:44" folio="281" serie="IICC">
    <InfoEspecial valor="Este documento es una representacin impresa de un CFDI." atributo="leyendaImpresion" />
    <InfoEspecial valor="||1.0|a37a7d92-a17e-49f4-8e4d-51c983587acb|2012-10-22T08:56:45|B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=|20001000000100003992||" atributo="cadenaOriginal" />
    <InfoEspecial valor="Doscientos dieciocho mil cuatrocientos setenta y cinco pesos 00/100 M.N." atributo="totalConLetra" />
    </ns4:InfoCFDi>
    </ns4:ResponseGeneraCFDi>
    </S:Body>
    </S:Envelope>
    TIA

    First of all you have to supply a value you want to search for and this has to be the complete path to the value. You're saying you already tried that, but can you paste the code which you used for that? I don't see the path mentioned in the code you posted.
    *FindNode*
    Syntax
    FindNode(Path)
    Description
    Use the FindNode method to return a reference to an XmlNode.
    The path is specified as the list of tag names, to the node that you want to find, each separated by a slash (/).
    Parameters
    Path
    Specify the tag names up to and including the name of the node that you want returned, starting with a slash and each separated by a slash (/). This is known as the XPath query language.>
    Another option would be this snippet of code:
    &InfoCFDiArray = GetElementsByTagName("ns4:InfoCFDi");
    &InfoCFDiNode = &InfoCFDiArray [1];
    &attValue = &InfoCFDiNode.GetAttributeValue("noCertificadoSAT")
    Warning(&attValue);
    It creates an array of XML Nodes which match the name "ns4:InfoCFDi". Since there's only one in the XML it's safe to assume it will be the one and only node in the array. I've assigned that node to the variable &InfoCFDiNode and use that to retrieve the attribute "noCertificadoSAT" value. The warning message should display the value supplied there.
    Concering the special characters; you will have to change the encoding of the XML. Peoplecode sets this to UTF-8 by default, but doesn't include this in the header. There's a little hack for that somewhere on the web, I'll see if I can find it.

  • Reading and writing to file , getting null when i try to  read file content

    i start by apologizing incase i have posted this question in the wrong forum
    i am trying to iterate through a directory tree and pick all the subdirectories and put them in an arraylist . on the other hand , i am picking all the files and putting them in a different arraylist . After that i iterate through the arraylist , pick a folder , create a file in it search for all the files of the same type in its subfolders and write them to the newly created file
    The problem i am running into is i i can't read the files and hence i can't write to the file .
    My directory tree is in the format
    c:\KPCData\\01\01\01\01\01\ file1_type1
    c:\KPCData\\01\01\01\01\02\ file2_type1
    where one one of the types is "covers" . i know this could be asking too much but i am at my tethers end , could someone please have a look at the code and tell me where i might be going wrong . you could zero in on the part where i have ************ before the a line of code thank you package directories;
    import java.io.*;
    import java.util.*;
    public class Directories {
    private static  ArrayList direcs= new ArrayList();
    private static  ArrayList census= new ArrayList();
    private static ArrayList vagrant= new ArrayList();
    private static ArrayList hotel= new ArrayList();
    private static ArrayList emigrant= new ArrayList();
    private static ArrayList traveller= new ArrayList();
    private static ArrayList longform= new ArrayList();
    private static ArrayList cover= new ArrayList();
    private static String parentPath = null;
    private static File mycover = null;
    private static File mytravel = null;
    private static File myemigrant = null;
    private static File mylong= null;
    private static File myinstitution = null;
    private static File myvagrant = null;
    private static BufferedReader in;
    private static BufferedWriter out;
    private static String read,toread;
    //function for listing the folder contents
    class compareDirs implements Comparator
    public int compare(Object one, Object two)
         int val=0;
         File file1 = (File)one;
         File file2= (File)two;
         String name1 = file1.toString();
         String name2= file2.toString();
         if (name1.length()==name2.length())
         val= name1.compareTo(name2);
         else
              if( name1.length()>name2.length())
                   val=-1;
              if (name1.length()<name2.length())
                   val=1;
         return val;
    private  ArrayList recurs(File dir,File file) throws IOException
         File []files=dir.listFiles();
         for(int index=0;index<files.length ;index++)
              if(files[index].isDirectory())
                   recurs(files[index],file);          
              }//if
              else
                  census.add(files[index]);     
         }//for index
         return census;
    } //recurs
    //function for determining the number and paths of the folders
    private ArrayList numDirs(File dirs)
         File []files=dirs.listFiles();
         for(int index=0;index<files.length ;index++)
              if(files[index].isDirectory())
                   if (direcs.contains(files[index])==false)
                   direcs.add(files[index]);
                   numDirs(files[index]);     
              }//if
         }//for index
         return direcs;
    public static void main(String[]args) throws IOException
              File myfile = new File("C:\\KPCData");
         File myfile2= new  File("C:\\KPCData\test.txt");
         Directories dir = new Directories();
         if (myfile.isDirectory())
         ArrayList myList=dir.recurs(myfile,myfile2);
         ArrayList mydir1 = dir.numDirs(myfile);
        ArrayList mydirs = new ArrayList();
        mydirs.add(mydir1.get(0));
         for (int x=0;x<mydir1.size();x++)
         {  int count=0;
              for (int y=0;y<mydirs.size();y++)
                   if (x==y)
                        count++;
              if (count<1)
                   mydirs.add(mydir1.get(x));
         Collections.sort( mydirs,dir.new compareDirs() );     
            for(int index1 =0 ;index1<mydirs.size();index1++)//print out directories
              File mydir=(File)mydirs.get(index1);
              File directory= (File)mydirs.get(index1);
              if(!mydir.getPath().contains("00"))//// if not leave node  create files for each file type
                   String name1 =mydir.getPath();
                   ArrayList ray=new ArrayList();
                   String name="K";
                 for (int index=0;index<name1.length();index++ )
                          if (name1.charAt(index)!='\\'&&name1.charAt(index)!='C'&&name1.charAt(index)!=':'&&name1.charAt(index)!='K'&&name1.charAt(index)!='P'&&name1.charAt(index)!='D'&&name1.charAt(index)!='a'&&name1.charAt(index)!='t')
                       name =name+(String.valueOf(name1.charAt(index)));
              // create a string
                  name= name.substring(1);
                   String trial = name+"_cover.dat";
                   mycover = new File ( mydir,trial);
                     if (mycover.exists()) {
                          mycover.delete();
                          mycover.createNewFile();
                      } else {
                           mycover.createNewFile();
                     String addit = mydir.getParent().toString();
                    mylong = new File (addit+"\\_long.dat");
                    if (mylong .exists()) {
                          mylong.delete();
                          //mylong.createNewFile();
                      } else {
                            //mylong.createNewFile();
                              myemigrant = new File (mydir.getParent()+"\\_emigrant.dat");
                              if (myemigrant.exists()) {
                                   myemigrant.delete();
                                  // myemigrant.canWrite();
                                } else {
                                     //  myemigrant.canWrite();
                   mytravel= new File (mydir.getParent().toString()+"\\_traveller.dat");
                    if (mytravel.exists()) {
                        mytravel.delete();
                       // mytravel.createNewFile();
                      } else {
                           //mytravel.createNewFile();
                    myinstitution = new File (mydir.getParent().toString()+"\\_institution.dat");
                    if (myinstitution.exists()) {
                          myinstitution.delete() ;
                         // myinstitution.createNewFile();
                      } else {
                           //myinstitution.createNewFile();
                    myvagrant = new File (mydir.getParent().toString()+"\\_vagrant.dat");
                    if (myvagrant .exists()) {
                         myvagrant.delete();
                        // myvagrant.createNewFile();
                      } else {
                           //myvagrant.createNewFile();
         //}//initial
              for( int index2 =0;index2<myList.size();index2++)//loop the second one for individual files
                   File file= (File)myList.get(index2);
                   if (file.getParent().contains("00"))//leave node
                        parentPath =file.getParent().substring(0, file.getParent().length()-4);
                   else
                        parentPath =file.getParent().substring(0, file.getParent().length()-3);
                   if (parentPath.toString().compareTo(directory.getParent())==0&file.getName().contains("cover"))
                        try {
                             in = new BufferedReader(new FileReader(file));
                             out = new BufferedWriter( new  FileWriter(mycover));
                        ************     while ((read =in.readLine())!=null)
                             System.out.println("testing");//test whether i ever get in this section !!!
                             out.write(read);               
                             out.close();
                             in.close();
                        catch(NullPointerException e)
                             System.out.println(e);
                        catch(IOException e)
                             System.out.println("There was a problem:" + e);
    }//class Directories

    kingspalace wrote:
    Dr Clap
    The problem i am having is that whereas i am very sure that there are contents in the files i am trying to read , this part of the code Print the Values of parentPath,directory.getParent() and file.getName() here .In the start of this if condition to get a idea what stuff is coming here.
    if (parentPath.toString().compareTo(directory.getParent())==0&file.getName().contains("cover"))
                   {Are you trying to compare parentPath and directory.getParent() as Strings ? How about using equals() ?
    Also are you aware that a single & and && are not one and the same ?
    & will check nevertheless even if the string comparison on the parentPath returns true or false.
    && will not check file.getName() part if the String comparison part fails.
                        try {
                             in = new BufferedReader(new FileReader(file));
                             out = new BufferedWriter( new FileWriter(mycover));
                        ************     while ((read =in.readLine())!=null)
                             System.out.println("testing");//test whether i ever get in this section !!!
                             out.write(read);               
                             out.close();
                             in.close();
                        catch(NullPointerException e)
                             System.out.println(e);
                        catch(IOException e)
                             System.out.println("There was a problem:" + e);
                             }How about adding a simple Exception catch block here ,in case you miss anything ?
    never gets executed executed (meaning ,according to the code, the files am reading have no content ). i am a bit new to files and directories in java . i am hence seeking advice on what i could be doing wrong .IN short,debugging your code will help you a lot.

  • GetDocumentBase returns null in Update 40

    The change to make getCodeBase() and getDocumentBase() return null has broken our FindinSite-CD signed applet which is out in the field on many data CDs and similar, ie running locally.  It doesn't provide any more security as our all-permissions applet can still access the same information (once it knows where it is).  The trouble is, the CD may be run from anywhere so I do not know the absolute path in advance. I have found that I can add code so that JavaScript is used to pass the current URL as a PARAM to the APPLET.  However this should not be necessary.
    Can you provide a better fix that does not break all our existing users who update to Update 25 or 40?
    I would be happy for our applet to have access restricted to its own directory or lower.
    Or for an all-permissions applet, make getCodeBase() and getDocumentBase() return the correct values.
    Please see the second link below for a further discussion.
    Bug ID: JDK-8019177 getdocument base should behave the same as getcodebase for file applets
    Oracle's Java Security Clusterfuck
    PS  There is a separate Firefox 23 issue stopping access to local Java applets - this should be fixed this week in version 24.
    Chris Cant
    PHD Computer Consultants Ltd
    http://www.phdcc.com/fiscd/

    Our company uses the above FindinSite-CD software to provide search functionality on our data CDs and we have done so successfully for many years.  These latest changes in Update 40 have now broken this vital component on our product and will cost us considerably in technical support time and replacing the discs when a fix comes out. Just an end user's perspective!

  • Request.getParameter() always returns null

    I have a html file and am trying to retrieve the values from a formin my servlet.
    here is the html code:
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <h1><b>Add DVD</b></h1>
    </head>
    <body>
    <form action="add_dvd.do" method="POST">
    Title:<input type="text" name="title" />
    Year:<input type="text" name="year" />
    Genre: <select name='gselected'>
    <option value='Sci-Fi'>Sci-Fi</option>
    </select>
    or enter new genre:<input type="text" name='gentered' value="" />
    <input type="submit" value="Add DVD" />
    </form>
    </body>
    </html>
    and here is the servlet code:
    public class AddDVDServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    // System.out.println("in AddDVDServlet post method");
    List errorMsgs = new LinkedList();
    //retrieve form parameters
    try{
    String title = request.getParameter("title").trim();
    String year = request.getParameter("year").trim();
    *String gentered = request.getParameter("gentered");
    String gselected = request.getParameter("gselected");
    String genre="";
    if("".equals(gentered))
    genre = gselected;
    else
    genre = gentered;
    // System.out.println("parameter retrieved");
    if(!year.matches("\\d\\d\\d\\d"))
    // System.out.println("year not 4 digit long");
    errorMsgs.add("Year must be four digit long");
    if("".equals(title))
    // System.out.println("title not entered");
    errorMsgs.add("Please enter the title of the dvd");
    if("".equals(genre))
    // System.out.println("genre not valid");zdf
    errorMsgs.add("Enter genre.");
    if(! errorMsgs.isEmpty())
    //System.out.println("errors in entry ");
    request.setAttribute("errors",errorMsgs);
    // System.out.println("error attribute set in request");
    RequestDispatcher rd = request.getRequestDispatcher("error.view");
    rd.forward(request, response);
    return;
    //create DVDItem instance
    DVDItem dvd = new DVDItem(title,year,genre);
    request.setAttribute("dvdItem",dvd);
    RequestDispatcher rd = request.getRequestDispatcher("success.view");
    rd.forward(request, response);
    catch(Exception e){
    errorMsgs.add(e.getMessage());
    request.setAttribute("errors",errorMsgs);
    RequestDispatcher rd = request.getRequestDispatcher("error.view");
    rd.forward(request, response);
    e.printStackTrace();
    System.out.println("exception:"+e);
    why does getParameter always return null??? whats wrong?

    I don't know. However, I suspect that because you have a tag with the same name as 'title', its causing a name conflict. Chnage the name to something else. If it works, then that's the likely explaination.

  • Problem while copying two files into same file

    Hi,
    I want to copy n number of files into the same file.I am using the below code for the purpose.
    private void testFiles(){
              FileOutputStream fos = null;
              String file1  = "C:"+File.separator+"test1.doc";
              String file2 = "C:"+File.separator+"test2.doc";
              String file = "C:"+File.separator+"test123.doc";
              File testFile = new File(file);
              ArrayList arrFiles = new ArrayList();
              arrFiles.add(file1);
              arrFiles.add(file2);
              try {
                    fos = new FileOutputStream(file,true);
                   for(int i = 0; i < arrFiles.size();i++){
                        int ReadBytes = 0;
                        int BUFSIZ = 4096;
                        long fileSize ;
                        long copiedBytes=0;
                        String curFileName = (String) arrFiles.get(i);
                        File srcFile = new File(curFileName);
                        FileInputStream fis = new FileInputStream(srcFile);
                         fileSize = srcFile.length();
                        byte Buf[] = new byte[BUFSIZ];
                        while(copiedBytes < fileSize)
                             ReadBytes = fis.read(Buf, 0, BUFSIZ);
                             fos.write(Buf,0,ReadBytes);
                             copiedBytes +=ReadBytes;
                        System.out.println("copied files::"+curFileName);
                   fis.close();
                   fos.flush();
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } finally{
                   try {
                        if(fos != null){
                             fos.flush();
                             fos.close();
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
         }Iam expecting that both the files will be copied sucessfully.But iam able to see only one file.But the file size of the destination file is the sum of both the source files copied.So that means the content is copied.Any ideas on possible causes/solutions.
    Thanks in advance.

    Hi,
    Just a thought, if you build a sequence of inputstream using SequenceInputStream something like that
                    String file1  = "C:"+File.separator+"test1.doc";
              String file2 = "C:"+File.separator+"test2.doc";
              FileInputStream s1 = new FileInputStream(file1); 
              FileInputStream s2 = new FileInputStream(file2);
              FileInputStream[] array = new FileInputStream[2];
              array[0] = s1;
              array[1] = s2;
              EnumerationImpl enumeration = new EnumerationImpl(array);
              SequenceInputStream sequence = new SequenceInputStream(enumeration);
                   //code here the read to go through the sequence of inputstream and write them  into FileOutputStream
    // and your Enumberation implementation class as below
    public class EnumerationImpl implements Enumeration<FileInputStream> {
        private FileInputStream[] array;
        private int index;
        public EnumerationImpl(FileInputStream[] array) {
            this.array = array;
        public boolean hasMoreElements() {
            return index < array.length;
        public FileInputStream nextElement() {
            if (index < array.length) {
                return array[index++];
            throw new NoSuchElementException();
    } Regards,
    Alan Mehio
    London, UK

  • CreateWordHiLite returns null on Arabic pdf document

    Greatly appreciated if someone in this forum can help to resolve the issue that I am facing. I am using Visual C# to do some stuff with a pdf document where I want to create a list of all words in a page. I am using InterOp Services to access the api exposed the the acrobat.tlb library. Here is the code snippet I am using:
                CAcroPDPage page = (CAcroPDPage)document.AcquirePage(pageNumber);
                CAcroHiliteList hitelite = new Acrobat.AcroHiliteListClass();
                hitelite.Add(0, 32767);     // create a hilite that includes all possible text on the page
                CAcroPDTextSelect selectedText = (Acrobat.CAcroPDTextSelect)page.CreateWordHilite(hitelite);
    On the last line the CreateWordHilite is returning null, meaning the method failed on an Arabic pdf file. If I run the same code on an English document, the code works fine.
    Regards.

    Hi there,
    Thanks for the response. I narrowed down the problem further. In fact a few of the pages are giving trouble. Now I'm concentrating on the pages that are giving me the word collection but I'm facing a separate issue.
    The CAcroPDTextSelect object is now having values but when I am using the GetText(iNum) method and examining the content of a particular word, it does not show the Arabic word. For example one of the word looks like this: "çáçñý: " . Do I have to use a different sdk for non-latin character sets?
    Regards.

Maybe you are looking for

  • Permanently removing part of an image from a transparent background png file

    Hello, I think I know the answer to this question, but I wanted to double check.  I am new to Photoshop and do not know all the functions.  I have a png transparent background file of a tree with a lot of branches.  I want to erase some of the branch

  • Maximum number of pages in D/W site?

    Hi, I'm wondering if there's a limit to the number of pages Dreamweaver can handle. I'm considering recommending Dreamweaver/Contribute to a client who has a very large number of pages that have so far been produced and managed by static HTML templat

  • Where we can find Short Text data type attachment

    Hi, file type attachements are store in fnd_lob. Where we can find Short Text data type attachment in oracle apps. Regards

  • G585 Video Streaming Problem

    Hello. I've got a Lenovo G585 that's about 4 months old. I've already had a few problems with it but they just seem to fix themselves.. But for about a month now, I go on youtube and try to stream a video, and my internet cuts off immediately! Litera

  • There's a cross in the battery-icon..;what does that mean?

    well,everything is in the subject...thank you for every little help,i'm new in using a mac,and i'm aware that maybe this question seems completely stupid to some of you!:) thx