What's the rest of the environment like on both platforms (servlet runner /
web server)?

> From: Jose Miguel Rodriguez <[EMAIL PROTECTED]>
> Reply-To: "A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology." <[EMAIL PROTECTED]>
> Date: Thu, 16 Mar 2000 17:20:02 +0100
> To: [EMAIL PROTECTED]
> Subject: sendRedirect on Linux. Please help!!
>
> Hello all,
>
> I'm having a big trouble and I'm sure it must be something stupid.
>
> The following code runs OK on Solaris 5.7, JDK_1.2.1_03 and Win/NT 4.0,
> JDK-1.2-V, but it doesn't on Linux RedHat 6.1,  JDK 1.2.2 (build
> Linux_JDK_RC3)
> ... As usual, the final deploy plataform will be Linux :-(
>
> The problem ocurrs when trying to redirect to a new page. The servlet doesn't
> break, but I get and error on client (all cases, a Netscape 4.7 on WNT 4)
> about
> 'the server has closed the connection.. tcp error.. '. All other
> functionalities
> seems to run quite right, and fast.
>
> I have the following code:
>
> // --------------------------------------------------
>
> public class myServlet extends HttpServlet{
> ...
> ...
>
> protected void doPost(HttpServletRequest .....) throws ServletException{
>
> Class myClass = Class.forName(vsPage);
> module = (VSModuloLwas)myClass.newInstance() ;
> ...
> ... (setParameters.. etc)
> ...
> module.go() ;
> // --------------------------------------------------
>
> And on class VSModuloLwas (in fact this class it's an interface... doesn't
> matter)
>
> // --------------------------------------------------
> public int onInit() {
> [...]
>
> HttpServletResponse res = getHttpOutput().getHttpServletResponse() ;
> sUrl = "/lwas/frames.htm" ;
>
> // res.setStatus(HttpServletResponse.SC_RESET_CONTENT);
> try  {
> res.sendRedirect(sUrl);
> lRet = true ;
> } catch (Exception e) {
> getLog().write("Error redirecting to URL: "+sUrl) ;
> }
> }
>
> //---------------------------------------------------------
> In the meantime, while creating this structure of classes I've got the
> getWriter() from given HttpServletResponse (if this could affect in some way.
>
> I've tried to go thru encodeRedirectURL(), encodeURL(), non relative URLs..
> and
> I cannot get it run. It ever works well on Windows or Solaris, and never under
> Linux.
>
> Thank you everyone.
>
> --
>
> saludos,
> jmiguel
>
> Virtual Software,
> http://www.virtualsw.es/
> ICQ 13550064
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to