Re: Java Servlet on Sun server

From: William Brogden (wbrogden_at_bga.com)
Date: 10/19/04


Date: Tue, 19 Oct 2004 06:44:24 -0500

On 18 Oct 2004 22:04:21 -0700, WERNOTKIN <wernotkin-google@yahoo.com>
wrote:

> In my servlet code I call response.sendRedirct("www.google.com");

Try a full URL ie "http://www.google.com/"
www.google.com is just a host, not a URL

>
> First I compile the source file with javac -classfile
> "j2ee-directory/j2ee.jar"
>
> Add the class file into the newly created .war file with deyploy tool
> and specify the one and only class file as the servlet class.
>
> Then I deploy the .war file using the admin console.
>
> However once I go to the directory that should be mapped to the servlet
> it does not redirect to www.google.com instead it shows a empty
> directory listing.

You "go to the directory" using what?

>
> I tryed placing the redirect in both service methods, and the doGet
> method. However it never works correctly.
>
> I know the servlet is deployed correctly because it does not return a
> 404 error or any other http/1.1 error code.
>

Bill

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


Relevant Pages

  • Re: New to JSP world
    ... via a supplied java based API that was written by my company. ... If the e-mail address is not found I need to redirect to an eror page. ... I personally prefer Servlet over Scriptlet because I want to keep java code separate from the jsp. ...
    (comp.lang.java.programmer)
  • IE6 macht Probleme mit multipart/form-data Formularen und folgendem Redirect
    ... Man könnte sich aber auch ein INPUT ... mit Typ FILE denken -> Formular zum Upload von Dateien. ... Das Servlet erhält die korrekte POST-Transaktion, ... Nur IE6 ignoriert das Redirect. ...
    (microsoft.public.de.german.inetexplorer.ie6)
  • Re: Client side waiting & timeout
    ... When the servlet completes, it informs the waiting jsp to redirect to ... i.e. the server-side script generating client-side code. ...
    (comp.lang.javascript)
  • Re: Thread safety in Tomcat
    ... >I think for the narrow purpose of our application, the SingleThreadModel ... >marker with the ensuing creation of multiple servlet objects is just fine. ... write a spearate class and enapsulate the remote access functionality ... request service methods; ...
    (comp.lang.java.programmer)
  • Re: JAVA on iSeries
    ... If not you could redirect to a ... I think you may be stuck with the default behaviour. ... class file I think. ... > prior to the reset. ...
    (comp.sys.ibm.as400.misc)