3 Replies Latest reply on Dec 22, 2011 6:01 AM by justin_at_adobe

    read rendition in servlet. java.io.FileNotFoundException:

    mb1177

      Hi All

       

      I have some problem with reading content from some rendition. I created some servlet

      in which I try to read a content from sample rendition. Below I present some part of code from my servlet

       

       

      String inputLine;

      URL parseUrl = new URL("http://localhost:4502/content/myapps/en/test.xhtml.html");    // url to sample xhtml rendition

      BufferedReader in = new BufferedReader(new InputStreamReader(parseUrl.openStream()));   // here I get java.io.FileNotFoundException: http://localhost:4502/content/myapps/en/test.xhtml.html

                                                                                                                                                                                                                                                        //at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

                                                                                                                                             //at java.net.URL.openStream(Unknown Source)

                                                               

      while ((inputLine = in.readLine()) != null)

      {

                textContent += inputLine+"\n";

      }

       

      System.out.println("******************ii"+textContent+"ii*******************************") ;

       

       

      Probably this problem occure, beacuse this file does not exist in content, is generate dynamically.

       

       

      Anyone knows how to reslove this problem

       

       

      Thanks in advance for any ideas.