[opencms-dev] How can download module export?

Deiverson Silveira deiverson at solutioncms.com
Wed Feb 8 20:40:27 CET 2012


Hi,

I use the code, for help:
<%@ page  import="java.io.FileInputStream" %>
<%@ page  import="java.io.BufferedInputStream"  %>
<%@ page  import="java.io.File"  %>
<%@ page import="java.io.IOException" %>


<%

   String filepath="/data/
jboss-4.2.3.GA/server/default/deploy/opencms.war/WEB-INF/packages/modules/br.com.myproject_0.1.zip
 ";

BufferedInputStream buf=null;
   ServletOutputStream myOut=null;

try{

myOut = response.getOutputStream( );
     File myfile = new File(filepath);

     //set response headers
     response.setContentType("text/plain");

     response.addHeader("Content-Disposition","attachment;
filename=br.com.myproject_0.1.zip");
     response.setContentLength( (int) myfile.length( ) );

     FileInputStream input = new FileInputStream(myfile);
     buf = new BufferedInputStream(input);
     int readBytes = 0;

     //read from the file; write to the ServletOutputStream
     while((readBytes = buf.read( )) != -1)
       myOut.write(readBytes);

} catch (IOException ioe){

        throw new ServletException(ioe.getMessage( ));

     } finally {

     //close the input/output streams
         if (myOut != null)
             myOut.close( );
          if (buf != null)
          buf.close( );
     }

%>

2012/2/8 Christian Steinert <christian_steinert at web.de>

> On 08.02.2012 17:43, Deiverson Silveira wrote:
>
>> Hi List,
>>
>> How can download module exported?
>>
>> Similar download logfile in Administration>Workplace tools....
>>
>>  I don't think you can download the module directly. Modules are only
> exported into the file system, into the folder WEB-INF/packages/modules of
> the opencms webapp. You have to grab the file from there, I think
>
> Kind regards
> Christian
> ______________________________**_________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-**bin/mailman/listinfo/opencms-**dev<http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev>
>
>
>
>


-- 
*
www.solutioncms.com
The Brazilian
Official Provider OpenCms
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120208/bd5ce8aa/attachment.htm>


More information about the opencms-dev mailing list