Maciel eh um prazer saber que mais alguem utliza Servlets no Lotus.
Qual e a versão do Domino que voce esta usando.





"Marcel" <[EMAIL PROTECTED]> on 06/04/2001 12:46:06

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Admin FrotaL/LATAM/Admin/WLB)
Subject:  [java-list] Erro Lotus Domino



A classe seguinte faz o download do arquivo especificado, no diretorio
especificado. Ela funciona normalmente no Apache/Jserv, mas no meu servidor
com Win Nt/Lotus Domino ele tambem faz o download do arquivo mas qdo tento
executa-lo ele informa que nao eh um aplicativo win32 valido.

Alguem sabe explicar pq?


import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class Download extends HttpServlet {

public void doGet(HttpServletRequest req ,HttpServletResponse res) throws
IOException,ServletException {
  doPost(req,res);
}
public void doPost(HttpServletRequest req ,HttpServletResponse res) throws
IOException,ServletException {

  String arquivo   = req.getParameter("arquivo");
  String diretorio = req.getParameter("diretorio");
  String tipo      = req.getParameter("tipo");

  String caminho = "d:/"+ diretorio +"\\" + arquivo;
  File F = new File(caminho);
  if (tipo.equalsIgnoreCase("exe")) {
res.setContentType("application/x-msdownload;name=\"" + arquivo + "\""); }
  if (tipo.equalsIgnoreCase("zip")) {
res.setContentType("application/x-zip-compressed;name=\"" + arquivo +
"\""); }
  res.setHeader("Content-Disposition", "attachment;filename=\"" + arquivo
+"\";");

  ServletOutputStream out = res.getOutputStream();
  InputStream in = null;
  try {
    in = new BufferedInputStream(new FileInputStream(F));
    int ch;
    while ((ch = in.read()) !=-1){
      out.print((char)ch);
    }
  }
  catch(Exception e){
    System.out.println(e.toString());
  }

  finally {
    if (in != null) in.close();
    out.close();
  }
}
}



------------------------------ LISTA SOUJAVA ----------------------------
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
para sair da lista: envie email para [EMAIL PROTECTED]
-------------------------------------------------------------------------












Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer
den im Adressfeld ausgewiesenen Adressaten bestimmt.
Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir um eine kurze Nachricht. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die
Echtheit oder Vollstaendigkeit der in dieser Nachricht
enthaltenen Informationen garantieren koennen, schliessen wir
die rechtliche Verbindlichkeit der vorstehenden Erklaerungen
und Aeusserungen aus. Wir verweisen in diesem Zusammenhang
auch auf die  fuer die Bank geltenden Regelungen ueber die
Verbindlichkeit von Willenserklaerungen mit verpflichtendem
Inhalt, die in den bankueblichen Unterschriftenverzeichnissen
bekannt gemacht werden.

This message is confidential and may be privileged. It is
intended solely for the named  addressee. If you are not the
intended recipient please inform us. Any unauthorised
dissemination, distribution or copying hereof is prohibited.
As we cannot guarantee the  genuineness or completeness of
the information contained in this message, the statements
set forth above are not legally binding. In connection
therewith, we also refer to the governing regulations of
WestLB concerning signatory authority published in the
standard bank signature lists with regard to the legally
binding effect of statements made with the intent to
obligate WestLB.

------------------------------ LISTA SOUJAVA ----------------------------
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
para sair da lista: envie email para [EMAIL PROTECTED]
-------------------------------------------------------------------------

Responder a