5 Replies Latest reply on Jan 26, 2014 1:18 AM by arronlee

    pdf files is created in jboss bin folder.

    amolbhandwale

      Hi,

       

      I have a web application which created some pdf reports and under jboss default fiolder we created BOL folder.

      whenever the report pdf is created in BOL folder it also created in jboss bin folder.

       

      Why this is happing?I am not getting exact reason for this.

       

      Thanks.

        • 1. Re: pdf files is created in jboss bin folder.
          rsprasad

          Probably in your codes you provided only the file name like
          File file = new File("filenameWithoutCompletePhysicalPath.extension");
          and as java process for jboss is started by run.bat for windows or run.sh in case of linux

          both from the bin folder of jboss,

          the java process from jboss creates the file from where the process was called, which is bin.

          • 2. Re: pdf files is created in jboss bin folder.
            rsprasad

            In case of windows environment, with path environment variable set to
            say, c:\jbosshome\bin and if jboss is run or started from say c:\desktop\
            without any code changes your pdf file will be created in c:\desktop.
            Because, in this case the jboss java process is called from c:\desktop.
            In your case, probably, you started jboss by run command

            in command prompt from jbosshome\bin location

            or double-clicked on the run.bat

            • 3. Re: pdf files is created in jboss bin folder.
              amolbhandwale

              Hi Prasad,

               

              Thanks for reply.

               

              I have tried to start the jboss from different folder now it creating the files in that folder.

              In my case I am creating a pdf file using the jasper report as

               

              dataSource =  new JRBeanArrayDataSource(reportRows);
              JasperDesign jasperDesign = JRXmlLoader.load(strJRXMLPath);
              JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
              JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, map  , dataSource );


              JasperExportManager.exportReportToPdfFile(jasperPrint, strPDFPath );

               

              Here i am specifying the complete path of file ie. strPDFPath

               

              i am starting the jboss on linux machine from jboss bin folder as

               

              ./run.sh &

               

              Still it creating the file in bin folder.

               

              Thanks,

              • 4. Re: pdf files is created in jboss bin folder.
                rsprasad

                What is the value of strPDFPath. 

                Try to log the value of strPDFPath.

                • 5. Re: pdf files is created in jboss bin folder.
                  arronlee

                  I have to admit that choosing a fine tool is so important because only the one whose way of processing is simple and fast can make the work much more convenient to operate. Checking its free trial page according to its tutorials about how to create, manipulate PDF documents using C#.NET is also very neccesary. I hope you good luck all the time.

                   

                   

                   

                  Best regards,

                  Arron