RE: Redirect to 443

2005-08-23 Thread Peter Crowther
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Is posible to force redirect to 443 when a non-ssl request is 
 received (without having a security-constraint )?

You could, for example, write a filter for your webapp that checked
whether the protocol was secure on an icoming request and responded with
a redirect if not.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect HTTP to HTTPS

2005-08-01 Thread Martin Bromley

Just create a filter (mapping it to /* for example so it gets applied to all 
requests), test for a secure connection with request.isSecure(), and if it 
isn't, redirect using response.sendRedirect.

Martin

Faine, Mark wrote:

I know I can redirect HTTP to HTTPS by adding:
 
   user-data-constraint

transport-guarantee
 CONFIDENTIAL
   /transport-guarantee
  /user-data-constraint
 
to my web.xml but the problem is that this does not redirect when someone

just goes to a directory path.  I would like
 
http://servername/
 
to redirect to 
 
https://servername/
 
Thanks,

-Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect stdout on tomcat 5.5

2005-04-27 Thread Patrick Thomas
Use a batch file to start tomcat and use the plain old redirect symbol, like so:

redirect_tomcat.bat:
-
tomcat5.exe  whateverfileyouwant.log
-

The other thing you should probably check out is the Logging tab in
the tomcat5w.exe app, it seems to handle exactly what you're trying to
do.

~PST

On 4/27/05, Kanda Upendra [EMAIL PROTECTED] wrote:
 
 I am using Tomcat 5.5 and when I don't use the tomcat.exe, I can make it
 write to the stdout log. How can I redirect stdout to a specific file.
 Suggestions please.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect to https://

2005-04-14 Thread Phillip Qin
Can you do it in apache httpd.conf?

RewriteRule ^/host/application(.*) https://host/application [R]

-Original Message-
From: Darryl Wilburn [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2005 4:00 PM
To: tomcat-user@jakarta.apache.org
Subject: Redirect to https://


Where would I configure a context to automatically
redirect to https?  So when a user types http://host/application, it would
automatically redirect them to https://host/application where a index.jsp
may be a login form that I'd like to have the username and password
encrypted.  I assume it goes in web.xml, but is it in the web.xml of the
context itself?  What is the format of the entry?

Thanks in advance.
Darryl




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:425ecbb615383665362806!


RE: Redirect to https://

2005-04-14 Thread Lorenzo Jiménez
I have done that yesterday and it is pretty simple.

Just look this web.xml:

?xml version=1.0 encoding=UTF-8?

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4
session-config
session-timeout
30
/session-timeout
/session-config

!-- Automatic redirection to SSL 
Remember to have SSL active
 --

security-constraint
web-resource-collection
web-resource-nameAutomatic SLL Forwarding/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

welcome-file-list
welcome-file
index.jsp
/welcome-file
welcome-file
index.html
/welcome-file
welcome-file
index.htm
/welcome-file
/welcome-file-list
/web-app


Lorenzo


-Original Message-
From: Darryl Wilburn [mailto:[EMAIL PROTECTED] 
Sent: Jueves, 14 de Abril de 2005 02:00 p.m.
To: tomcat-user@jakarta.apache.org
Subject: Redirect to https://

Where would I configure a context to automatically
redirect to https?  So when a user types
http://host/application, it would automatically
redirect them to https://host/application where a
index.jsp may be a login form that I'd like to have
the username and password encrypted.  I assume it goes
in web.xml, but is it in the web.xml of the context
itself?  What is the format of the entry?

Thanks in advance.
Darryl




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-

Si usted no es el destinatario indicado en este mensaje o responsable como 
persona 
de la entrega del mensaje, no debe copiar o reenviar este mensaje, por favor 
notifique 
al correo [EMAIL PROTECTED] Para más referencia sobre términos importantes 
relacionados a este correo visite http://www.nacion.com/disclaimer/index_es2.htm

If you are not the addressee indicated in this message (or responsible for 
delivery of the 
message to such person), you may not copy or send this message to anyone, 
please notify
to [EMAIL PROTECTED] Click here for important additional terms relating to this 
e-mail. 
http://www.nacion.com/disclaimer/index_en2.htm

-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect to https://

2005-04-14 Thread Darryl Wilburn
Not using Apache as a front end.  Straight Tomcat
5.5.7 with Coyote HTTP.

Darryl



__ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from one SSL port to another

2005-03-25 Thread Jason Bainbridge
On Thu, 24 Mar 2005 23:54:21 -0500, Parsons Technical Services
[EMAIL PROTECTED] wrote:
 Jason,
 
 To get the port redirect to work requires a constraint on your transport for
 the requested material.
 
 See:
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html

Thanks, but I've already set that up fine for the port 80 to 443
redirect, I was just trying to see if there was a way to do something
similar to redirect from one https port (8443) to the one on 443 but
it doesn't look like there is a way to do that easily in Tomcat.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from one SSL port to another

2005-03-24 Thread Parsons Technical Services
This might work:
http://www.boutell.com/rinetd/
Ran across it on Google
Doug
- Original Message - 
From: Jason Bainbridge [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, March 24, 2005 12:11 PM
Subject: Redirect from one SSL port to another


Currently we are running a pilot of Tomcat (alongside Jrun+IIS) where
Tomcat is on port 8443 using https and IIS is on port 443. We are
getting close to moving Tomcat into Production use disabling IIS +
Jrun and are looking at ways to easily redirect users from 8443 to 443
so the users of the pilot don't have to change URL's within email
notifications they have received from the system.
At first I thought setting an additional Connector port for 8443 with
a redirectPort to 443 was a good idea but if you don't add in all the
addtional SSL stuff it won't respons to https requests and if you do
add in the SSL stuff then the redirectPort doesn't get used and it
just sticks to 8443.
Does anyone know of an easy way to do this within Tomcat? I'm thinking
I might have to setup a separate Tomcat instance listening on port
8443 and setup redirects there but then again I could be missing
something obvious.
Cheers,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect from one SSL port to another

2005-03-24 Thread Parsons Technical Services
Jason,
To get the port redirect to work requires a constraint on your transport for 
the requested material.

See:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/http.html
Doug
- Original Message - 
From: Parsons Technical Services [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org; Jason Bainbridge 
[EMAIL PROTECTED]
Sent: Thursday, March 24, 2005 11:40 PM
Subject: Re: Redirect from one SSL port to another


This might work:
http://www.boutell.com/rinetd/
Ran across it on Google
Doug
- Original Message - 
From: Jason Bainbridge [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, March 24, 2005 12:11 PM
Subject: Redirect from one SSL port to another


Currently we are running a pilot of Tomcat (alongside Jrun+IIS) where
Tomcat is on port 8443 using https and IIS is on port 443. We are
getting close to moving Tomcat into Production use disabling IIS +
Jrun and are looking at ways to easily redirect users from 8443 to 443
so the users of the pilot don't have to change URL's within email
notifications they have received from the system.
At first I thought setting an additional Connector port for 8443 with
a redirectPort to 443 was a good idea but if you don't add in all the
addtional SSL stuff it won't respons to https requests and if you do
add in the SSL stuff then the redirectPort doesn't get used and it
just sticks to 8443.
Does anyone know of an easy way to do this within Tomcat? I'm thinking
I might have to setup a separate Tomcat instance listening on port
8443 and setup redirects there but then again I could be missing
something obvious.
Cheers,
--
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect from http:// to https://

2005-03-09 Thread Peter Johnson
Or write a valve/filter to do the same thing
PJ
Antony Paul wrote:
You use Tomcat standalone or along with Apache. 
In Tomcat stand alone you can 
1, In index.jsp or whatever be the welcome page check
response.isSecure() then redirect.
2. There is an option in web.xml in security element
transport-guarantee which can be specified for certain resources. On
accessing these resources it will automatically redirect to the https.
You need to properly configure redirectport in Connector element in
server.xml for this to work.

   In Apache use mod_rewrite.
On Tue, 8 Mar 2005 23:27:54 + (GMT), Sanjeev Srivastava
[EMAIL PROTECTED] wrote:
 

Hi All!,
Can anone tell me how can I redirect http://
to https:// . I want as soon as the user type
http://abc.com it will go to https://abc.com
(SSL Config).
Please help..
Regards,
Sanjeev
Send instant messages to your online friends http://uk.messenger.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect from http:// to https://

2005-03-09 Thread Sanjeev Srivastava
Thanks a lot PJ !, It worked..

Regards,
Sanjeev
--- Peter Johnson [EMAIL PROTECTED] wrote:
 Or write a valve/filter to do the same thing
 
 PJ
 
 Antony Paul wrote:
 
 You use Tomcat standalone or along with Apache. 
 In Tomcat stand alone you can 
 1, In index.jsp or whatever be the welcome page
 check
 response.isSecure() then redirect.
 2. There is an option in web.xml in security
 element
 transport-guarantee which can be specified for
 certain resources. On
 accessing these resources it will automatically
 redirect to the https.
 You need to properly configure redirectport in
 Connector element in
 server.xml for this to work.
 
 In Apache use mod_rewrite.
 
 
 On Tue, 8 Mar 2005 23:27:54 + (GMT), Sanjeev
 Srivastava
 [EMAIL PROTECTED] wrote:
   
 
 Hi All!,
  Can anone tell me how can I redirect
 http://
 to https:// . I want as soon as the user type
 http://abc.com it will go to https://abc.com
 
 (SSL Config).
 
 Please help..
 
 Regards,
 Sanjeev
 
 Send instant messages to your online friends
 http://uk.messenger.yahoo.com
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 
 
   
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from http:// to https://

2005-03-09 Thread Sanjeev Srivastava
Thanks a lot Paul !!, It worked

Regards,
Sanjeev
--- Antony Paul [EMAIL PROTECTED] wrote:
 You use Tomcat standalone or along with Apache. 
 In Tomcat stand alone you can 
 1, In index.jsp or whatever be the welcome page
 check
 response.isSecure() then redirect.
 2. There is an option in web.xml in security element
 transport-guarantee which can be specified for
 certain resources. On
 accessing these resources it will automatically
 redirect to the https.
 You need to properly configure redirectport in
 Connector element in
 server.xml for this to work.
 
 In Apache use mod_rewrite.
 
 
 On Tue, 8 Mar 2005 23:27:54 + (GMT), Sanjeev
 Srivastava
 [EMAIL PROTECTED] wrote:
  Hi All!,
   Can anone tell me how can I redirect
 http://
  to https:// . I want as soon as the user type
  http://abc.com it will go to https://abc.com
  
  (SSL Config).
  
  Please help..
  
  Regards,
  Sanjeev
  
  Send instant messages to your online friends
 http://uk.messenger.yahoo.com
  
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  
  
 
 
 -- 
 rgds
 Antony Paul
 http://www.geocities.com/antonypaul24/
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect from http:// to https://

2005-03-08 Thread Antony Paul
You use Tomcat standalone or along with Apache. 
In Tomcat stand alone you can 
1, In index.jsp or whatever be the welcome page check
response.isSecure() then redirect.
2. There is an option in web.xml in security element
transport-guarantee which can be specified for certain resources. On
accessing these resources it will automatically redirect to the https.
You need to properly configure redirectport in Connector element in
server.xml for this to work.

In Apache use mod_rewrite.


On Tue, 8 Mar 2005 23:27:54 + (GMT), Sanjeev Srivastava
[EMAIL PROTECTED] wrote:
 Hi All!,
  Can anone tell me how can I redirect http://
 to https:// . I want as soon as the user type
 http://abc.com it will go to https://abc.com
 
 (SSL Config).
 
 Please help..
 
 Regards,
 Sanjeev
 
 Send instant messages to your online friends http://uk.messenger.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect with slash appended

2005-02-16 Thread Mark Thomas
This is by design. See 
http://issues.apache.org/bugzilla/show_bug.cgi?id=32424 for an explanation.

Mark
Felix Röthenbacher wrote:
Hi
I have the problem that every time I access a servlet with a
URL that is equal to a servlet's directory, Tomcat
redirects me to an URL with a slash appended. E.g. I want
to access /resources, and Tomcat redirects me to /resources/,
which my servlet does not match. It expects to match to /resources.
Is it possible to disable such redirects? I'm using Tomcat 5.5.7.
Maybe it has something to do with the default servlet?
Thanks
Felix
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Redirect with slash appended

2005-02-16 Thread Stephen Kestle
Hmm. Read that.  It the bug does not actually answer Oliver's questions - 
specifically, if it's for the default servlet, why does it always get applied - 
and why is it not easily changed (with a /* filter)?

It also doesn't help that Remy is needlessly rude and assumptive.

 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 17 February 2005 7:38 a.m.
 To: Tomcat Users List
 Subject: Re: Redirect with slash appended
 
 This is by design. See
 http://issues.apache.org/bugzilla/show_bug.cgi?id=32424 for an
 explanation.
 
 Mark
 
 Felix Röthenbacher wrote:
  Hi
 
  I have the problem that every time I access a servlet with a
  URL that is equal to a servlet's directory, Tomcat
  redirects me to an URL with a slash appended. E.g. I want
  to access /resources, and Tomcat redirects me to /resources/,
  which my servlet does not match. It expects to match to /resources.
  Is it possible to disable such redirects? I'm using Tomcat 5.5.7.
  Maybe it has something to do with the default servlet?
 
  Thanks
 
  Felix
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect catalina.out

2004-11-18 Thread Shapira, Yoav

Hi,
swallowOutput is not a Context attribute, it's a Logger attribute:
change your context.xml to fix that.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Scott Pippin [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 12:45 PM
To: [EMAIL PROTECTED]
Subject: redirect catalina.out

I am trying to redirect catalina.out to an application specific log
file.  I thought I had it set up but it is still writing to
catalina.out.

server.xml

Server port=8005 shutdown=SHUTDOWN debug=0
  Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer
value=30/
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name

valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources
  Service name=Catalina
Connector port=8080
   maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443
acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /
Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /
Engine name=Catalina defaultHost=localhost debug=0
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true swallowOutput=true /
 Realm className=org.apache.catalina.realm.JDBCRealm
connectionName=ims connectionPassword=ims
  connectionURL=jdbc:mysql://x.x.x.x:3306/ims
driverName=com.mysql.jdbc.Driver userTable=imsuser
  userNameCol=userid userCredCol=passwordid userRoleTable=imsrole
roleNameCol=userrole /
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log.
suffix=.txt
timestamp=true swallowOutput=true /
  /Host
/Engine
  /Service
/Server


context.xml

?xml version=1.0 encoding=utf-8 ?
Context path=/IMS reloadable=true debug=4 swallowOutput=true
 Logger className=org.apache.catalina.logger.FileLogger
prefix=ims_log. suffix=.txt timestamp=true verbosity=4 /
 Logger className=org.apache.catalina.logger.SystemErrLogger
prefix=ims_err. suffix=.txt timestamp=true verbosity=4 /
 Logger className=org.apache.catalina.logger.SystemOutLogger
prefix=ims_out. suffix=.txt timestamp=true verbosity=4 /
/Context

Thanks in advance,

Scott Pippin
[EMAIL PROTECTED]



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect catalina.out

2004-11-18 Thread Shankar Unni
Shapira, Yoav wrote:
swallowOutput is not a Context attribute, it's a Logger attribute:
change your context.xml to fix that.
Really? That's not what the doc says (or the source either). Just tested 
on 5.0.2x. (At least, I defined a

  DefaultContext swallowOutput=true/
in my Host, and standard output went to the log file configured for 
the webapps).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: redirect catalina.out

2004-11-18 Thread Shapira, Yoav


Hi,
Yup, my mistake, thank you for pointing that out.  (Although please
don't use DefaultContext as an example of anything, it's an
abomination).

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Shankar Unni
Sent: Thursday, November 18, 2004 3:23 PM
To: [EMAIL PROTECTED]
Subject: Re: redirect catalina.out

Shapira, Yoav wrote:

 swallowOutput is not a Context attribute, it's a Logger attribute:
 change your context.xml to fix that.

Really? That's not what the doc says (or the source either). Just
tested
on 5.0.2x. (At least, I defined a

   DefaultContext swallowOutput=true/

in my Host, and standard output went to the log file configured for
the webapps).


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect to insecure

2004-08-27 Thread Tim Funk
No. There is no way to say the transport must be http (and not https).
You'll need a filter or code it into each resource that has that issue.
-Tim
Michael Eastwood wrote:
Hi,
One part of a site I've done has automatic SSL redirection using the
transport-guarantee element in web.xml to ensure SSL communication
with the sensitive parts of site.
The other parts of the site I'd like not to be encrypted.  If I go to
the secure part, however, then back to a non-secure part,
the https:// remains (as I'm using relative URLs).  Is it possible to 
configure
these non secure sections to redirect to no encryption (so that a
request to https://.../nonsecureservlet/ is redirected to
http://.../nonsecureservlet/) without doing a protocol check all of my
servlets or making all of my links absolute?  I've tried

security-constraint
web-resource-collection
web-resource-nameAutomatic SLL
Unforwarding/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
user-data-constraint
transport-guaranteeNONE/transport-guarantee
/user-data-constraint
/security-constraint
to no effect.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: redirect output in win 2000 from comandline

2004-07-27 Thread Alberto Marino
yes, but comand line open other cmd with Tomcat and I don´t know how redirect this cmd 
because startup initialize automaticaly.

Jérôme_Duval [EMAIL PROTECTED] wrote:To redirect to a file put filename.extension 
System.err will still be in
your prompt window though. The only way you can redirect System.err is
programatically (look at the Java API in the System class (java.lang I
believe...))

-Original Message-
From: Alberto Marino [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 26, 2004 4:51 PM
To: Tomcat Users List
Subject: redirect output in win 2000 from comandline

I start Tomcat since comandline but how can I redirect this output from a
file in a comandline in win 2000?

Ruth, Brice 
wrote:How are you starting Tomcat? If
you're starting tomcat from the cmdline, then it will send STDOUT  STDERR
to the console. If you're starting it as a service, then it should create
stdout.log and stderr.log in the TOMCAT_HOME/logs directory. If you're
running Tomcat from Eclipse, or other IDEs, then STDOUT  STDERR typically
get redirected to the IDE's console.

Caveat - if the Host in server.xml and/or your Context definition contain a
logging element, then most logging will get redirected to that log file, I
believe.

Alberto Marino wrote:

Yes, I have files like localhost_log.2004-07-24.txt but this files don´t
show java output. For example, when you have in your code
System.out.println(.) I don´t know where must see for the output. In
linux I know that there are a file like catalina.out that show this output
but in Windows 2000 I dont´t know.

John Najarian wrote:I know mine is on XP but my friend runs on 2000.
You should have an stdout.log  localhost_log...
files in the Jakarta.../logs directory.

Try doing a search under Jakarta... for files modified today. Perhaps 
you inadvertently put it in some other directory a maybe under another 
name.

-Original Message-
From: Alberto Marino [mailto:[EMAIL PROTECTED]
Sent: Monday, July 26, 2004 12:52 PM
To: Tomcat Users List
Subject: Re: how I can to see the output in tomcat from windows 2000

Sorry, in mi /logs directory only there are
localhost_log.2004-XX-XX.txt
files but not anyone

Ruth, Brice 
wrote:There should be a logs directory in your TOMCAT_HOME directory 
... so, if you installed Tomcat to C:\Program Files\Apache Tomcat\ - 
then look for a logs directory there. You'll find the same 
catalina.out file and catalina.err file there.

Alberto Marino wrote:

 

Note: forwarded message attached.

--
--

Nuevo Yahoo! Búsquedas




--
--

Subject:
how I can to see the output in tomcat from windows 2000
From:
Alberto Marino
Date:
Mon, 26 Jul 2004 16:57:17 +0200 (CEST)
To:
[EMAIL PROTECTED]

To:
[EMAIL PROTECTED]


Hi, I would like to know how I can to see the output in tomcat for 
depure mi aplication. In linux I can see the catalina.out in /logs 
directory but in Windows 2000 I don´t know.

Please help me! Thanks.

--
--

Nuevo Yahoo! Búsquedas



--
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


 


--
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-



RE: redirect output in win 2000 from comandline

2004-07-26 Thread Jérôme Duval
To redirect to a file put filename.extension System.err will still be in
your prompt window though. The only way you can redirect System.err is
programatically (look at the Java API in the System class (java.lang I
believe...))

-Original Message-
From: Alberto Marino [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 26, 2004 4:51 PM
To: Tomcat Users List
Subject: redirect output in win 2000 from comandline

I start Tomcat since comandline but how can I redirect this output from a
file in a comandline in win 2000?

Ruth, Brice [EMAIL PROTECTED] wrote:How are you starting Tomcat? If
you're starting tomcat from the cmdline, then it will send STDOUT  STDERR
to the console. If you're starting it as a service, then it should create
stdout.log and stderr.log in the TOMCAT_HOME/logs directory. If you're
running Tomcat from Eclipse, or other IDEs, then STDOUT  STDERR typically
get redirected to the IDE's console.

Caveat - if the Host in server.xml and/or your Context definition contain a
logging element, then most logging will get redirected to that log file, I
believe.

Alberto Marino wrote:

Yes, I have files like localhost_log.2004-07-24.txt but this files don´t
show java output. For example, when you have in your code
System.out.println(.) I don´t know where must see for the output. In
linux I know that there are a file like catalina.out that show this output
but in Windows 2000 I dont´t know.

John Najarian wrote:I know mine is on XP but my friend runs on 2000.
You should have an stdout.log  localhost_log...
files in the Jakarta.../logs directory.

Try doing a search under Jakarta... for files modified today. Perhaps 
you inadvertently put it in some other directory a maybe under another 
name.

-Original Message-
From: Alberto Marino [mailto:[EMAIL PROTECTED]
Sent: Monday, July 26, 2004 12:52 PM
To: Tomcat Users List
Subject: Re: how I can to see the output in tomcat from windows 2000

Sorry, in mi /logs directory only there are
localhost_log.2004-XX-XX.txt
files but not anyone

Ruth, Brice 
wrote:There should be a logs directory in your TOMCAT_HOME directory 
... so, if you installed Tomcat to C:\Program Files\Apache Tomcat\ - 
then look for a logs directory there. You'll find the same 
catalina.out file and catalina.err file there.

Alberto Marino wrote:

 

Note: forwarded message attached.

--
--

Nuevo Yahoo! Búsquedas




--
--

Subject:
how I can to see the output in tomcat from windows 2000
From:
Alberto Marino
Date:
Mon, 26 Jul 2004 16:57:17 +0200 (CEST)
To:
[EMAIL PROTECTED]

To:
[EMAIL PROTECTED]


Hi, I would like to know how I can to see the output in tomcat for 
depure mi aplication. In linux I can see the catalina.out in /logs 
directory but in Windows 2000 I don´t know.

Please help me! Thanks.

--
--

Nuevo Yahoo! Búsquedas



--
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


 


--
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect from root context to other context

2004-03-16 Thread Shapira, Yoav

Hi,

What is required to redirect the root context to another context, with
a
relative path name rather than an absolute path name?
can I just response.sendRedirect(/webapps/othercontext/);
Or is there additional configuration

No additional configuration, just response.sendRedirect.  You don't want
the /webapps, just /othercontext/whatever.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect from root context to other context

2004-03-16 Thread Luc Foisy
We had originally removed the /ROOT context. I put it back in place with the 
administrator context. It has saved to the server.xml file. When I browse to the site, 
it reports HTTP 500 - No context loaded If I add webaddress/ROOT it returns report 
HTTP 503 - Servlet jsp is currently unavailable

1. Will the /ROOT context work right after tomcat is restarted?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:54 AM
To: Tomcat Users List
Subject: RE: Redirect from root context to other context



Hi,

What is required to redirect the root context to another context, with
a
relative path name rather than an absolute path name?
can I just response.sendRedirect(/webapps/othercontext/);
Or is there additional configuration

No additional configuration, just response.sendRedirect.  You don't want
the /webapps, just /othercontext/whatever.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect from root context to other context

2004-03-16 Thread Luc Foisy
I had configured the ROOT context to have a path of /ROOT when it should be nothing.
I still can't get the context to load without restarting the whole tomcat server (I 
wont).
I can get the context to load on a secondary server with a tomcat restart..

-Original Message-
From: Luc Foisy 
Sent: Tuesday, March 16, 2004 11:06 AM
To: Tomcat Users List
Subject: RE: Redirect from root context to other context


We had originally removed the /ROOT context. I put it back in place with the 
administrator context. It has saved to the server.xml file. When I browse to the site, 
it reports HTTP 500 - No context loaded If I add webaddress/ROOT it returns report 
HTTP 503 - Servlet jsp is currently unavailable

1. Will the /ROOT context work right after tomcat is restarted?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:54 AM
To: Tomcat Users List
Subject: RE: Redirect from root context to other context



Hi,

What is required to redirect the root context to another context, with
a
relative path name rather than an absolute path name?
can I just response.sendRedirect(/webapps/othercontext/);
Or is there additional configuration

No additional configuration, just response.sendRedirect.  You don't want
the /webapps, just /othercontext/whatever.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect from root context to other context

2004-03-16 Thread rsequeira

I bet you already know this, but nevertheless: ROOT is a keyword for /.
The URLs are http://domainname/contextname. In the case of ROOT, you don't
have a contextname in the URL. Setting the attribute of the context
reloadable=true helps in case you want your changes to reflect without
restarting tomcat.

Thanks,
RS


   
   
  Luc Foisy  
   
  [EMAIL PROTECTED]To:   Tomcat Users List  
 
  -magic.com  [EMAIL PROTECTED] 
  
  cc:  
   
  03/16/2004 10:55 AM Subject:  RE: Redirect from root 
context to other context   
  Please respond to
   
  Tomcat Users List  
   
   
   
   
   




I had configured the ROOT context to have a path of /ROOT when it should be
nothing.
I still can't get the context to load without restarting the whole tomcat
server (I wont).
I can get the context to load on a secondary server with a tomcat restart..

-Original Message-
From: Luc Foisy
Sent: Tuesday, March 16, 2004 11:06 AM
To: Tomcat Users List
Subject: RE: Redirect from root context to other context


We had originally removed the /ROOT context. I put it back in place with
the administrator context. It has saved to the server.xml file. When I
browse to the site, it reports HTTP 500 - No context loaded If I add
webaddress/ROOT it returns report HTTP 503 - Servlet jsp is currently
unavailable

1. Will the /ROOT context work right after tomcat is restarted?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:54 AM
To: Tomcat Users List
Subject: RE: Redirect from root context to other context



Hi,

What is required to redirect the root context to another context, with
a
relative path name rather than an absolute path name?
can I just response.sendRedirect(/webapps/othercontext/);
Or is there additional configuration

No additional configuration, just response.sendRedirect.  You don't want
the /webapps, just /othercontext/whatever.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an) intended
recipient, please immediately delete this e-mail from your computer system
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






This transmission is intended to be strictly confidential. If you are not
the intended recipient of this message, you may not disclose, print, copy
or disseminate this information. If you have received this in error, please
reply and notify the sender (only) and delete the message. Unauthorized
interception of this e-mail is a violation of federal criminal law.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect and request´s attributes doubts

2004-03-12 Thread Ronald Wildenberg
   Hello dudes, i´m trying to set some attributes to a 
 request in my
 servlet, that´s pretty easy as you know, but after i must use 
 redirect to a
 JSP page and when i try to recall those attributes created before they
 doesn´t appear in JSP´s request object. Even thought i set a request´s
 attribute and use redirect i cannot get it again, can i?
 


The attributes you add to the request are added on the server. There
is a request object on the server that you add attributes to.

If you use sendRedirect, the client (browser) receives a redirect
response from the server (status code 3xx), with the location to
redirect to. The client then creates a _new_ request for the new url
and sends it to the server. The server creates a new HttpServletRequest
object for you that has nothing to do with the old object.


Regards, Ronald.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect and request´s attributes doubts

2004-03-11 Thread Ralph Einfeldt

A redirect creates a new request.

If you want to pass informations across a redirect
you can use url parameters in the redirect url.

Maybe it's is an option to you to forward to the jsp, 
then no new request is created.

 -Original Message-
 From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 2:15 PM
 To: 'Tomcat-User List'
 Subject: redirect and request´s attributes doubts
 
 
   Hello dudes, i´m trying to set some attributes to a 
 request in my
 servlet, that´s pretty easy as you know, but after i must use 
 redirect to a
 JSP page and when i try to recall those attributes created before they
 doesn´t appear in JSP´s request object. Even thought i set a request´s
 attribute and use redirect i cannot get it again, can i?
 
   Regards,
   Edson
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect and request´s attributes doubts

2004-03-11 Thread Ralph Einfeldt
That has been answered 40 Minutes ago:

A redirect creates a new request.

If you want to pass informations across a redirect
you can use url parameters in the redirect url.

Maybe it's is an option to you to forward to the jsp, 
then no new request is created.

 -Original Message-
 From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 3:00 PM
 To: 'Tomcat-User List'
 Subject: redirect and request´s attributes doubts
 
 
   Hello dudes, i´m trying to set some attributes to a 
 request in my
 servlet, that´s pretty easy as you know, but after i must use 
 redirect to a
 JSP page and when i try to recall those attributes created before they
 doesn´t appear in JSP´s request object. Even thought i set a request´s
 attribute and use redirect i cannot get it again, can i?
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect from one servlet to one jsp page

2003-11-17 Thread Schalk
You can use the same method, just ensure that you call the
response.sendRedirect() before the response has been committed.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.CEO
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or diclosed to any other party without
the permission of the sender. If you received this message in error, please
notify me immediately so that I can correct and delete the original email.
Thank you. 

:: -Original Message-
:: From: Dionisio Ruiz de Zarate [mailto:[EMAIL PROTECTED]
:: Sent: Monday, November 17, 2003 11:39 AM
:: To: [EMAIL PROTECTED]
:: Subject: redirect from one servlet to one jsp page
:: 
:: In one servlet ihave this:
:: public HttpSession userSession;
:: 
:: if(!userSession.getAttribute(loginStatus).equals(OK)){
::  //redirection
:: }
:: 
:: my problem is howcan i redirect from one servlet to one jsp page if the
:: loginStatus attribute isnot equals to OK.
:: 
:: from one jsp page to other jsp page i make:
:: response.sendRedirect (destinationjsppage.jsp);
:: 
:: but fromone servlet?
:: 
:: thanks
:: 
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect from one servlet to one jsp page

2003-11-17 Thread Eric C
syntax issue ...
the name response is a JSP implicit object...  in your servlet you may
have called it resp or res or whatever

depending on your method declaration , example :

if :
public void doGet (HttpServletRequest req,
 HttpServletResponse res)

then you'd write :

res.sendRedirect(url)

hope this helps,
ERic

- Original Message -
From: Schalk [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, November 17, 2003 9:55 AM
Subject: RE: redirect from one servlet to one jsp page


You can use the same method, just ensure that you call the
response.sendRedirect() before the response has been committed.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.CEO
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za

This message contains information that is considered to be sensitive or
confidential and may not be forwarded or diclosed to any other party without
the permission of the sender. If you received this message in error, please
notify me immediately so that I can correct and delete the original email.
Thank you.

:: -Original Message-
:: From: Dionisio Ruiz de Zarate [mailto:[EMAIL PROTECTED]
:: Sent: Monday, November 17, 2003 11:39 AM
:: To: [EMAIL PROTECTED]
:: Subject: redirect from one servlet to one jsp page
::
:: In one servlet ihave this:
:: public HttpSession userSession;
::
:: if(!userSession.getAttribute(loginStatus).equals(OK)){
::  //redirection
:: }
::
:: my problem is howcan i redirect from one servlet to one jsp page if the
:: loginStatus attribute isnot equals to OK.
::
:: from one jsp page to other jsp page i make:
:: response.sendRedirect (destinationjsppage.jsp);
::
:: but fromone servlet?
::
:: thanks
::
::
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect?

2003-10-23 Thread Lee, Paul NYC
That's just the port number specified in server.xml.  Just change it from
8009 to 80.  Remember, if you are on a unix machine, you will need to start
the server as root after this change.

-Original Message-
From: Dean, Michael D. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 2:46 PM
To: '[EMAIL PROTECTED]'
Subject: redirect?


I have Apache 2.0.47, Tomcat 5.0 and mod_jk2/2.0.2 running

http://127.0.0.1:8009/jsp-examples/

http://127.0.0.1:8009/servlets-examples/

So how/what do I modify such that:

http://127.0.0.1/jsp-examples/

http://127.0.0.1/servlet-examples

return the same pages when the port number isn't specified in the URL...

I'm trying to set it so the user doesn't have to remember the ports

Best Regards,

Michael Dean
Sun Certified Programmer for the Java 2 Platform
Washington State Department of Corrections
ph: 360-664-8802
fx:  360-664-3985
mailto:[EMAIL PROTECTED]

I'm a sailor, of the waters and the sun,
I can fight the waves but have no weapons for the calm... 
 - The Ship


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect?

2003-10-23 Thread Filip Hanik
did you set ServerName in httpd.conf?

I've had this problem before. and I think mod_jk should read your ServerName
from apache

Filip

- Original Message -
From: Dean, Michael D. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 11:46 AM
Subject: redirect?


I have Apache 2.0.47, Tomcat 5.0 and mod_jk2/2.0.2 running

http://127.0.0.1:8009/jsp-examples/

http://127.0.0.1:8009/servlets-examples/

So how/what do I modify such that:

http://127.0.0.1/jsp-examples/

http://127.0.0.1/servlet-examples

return the same pages when the port number isn't specified in the URL...

I'm trying to set it so the user doesn't have to remember the ports

Best Regards,

Michael Dean
Sun Certified Programmer for the Java 2 Platform
Washington State Department of Corrections
ph: 360-664-8802
fx:  360-664-3985
mailto:[EMAIL PROTECTED]

I'm a sailor, of the waters and the sun,
I can fight the waves but have no weapons for the calm...
- The Ship


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect?

2003-10-23 Thread Asif Chowdhary
Hi Michael,

If you installed this on a windows environment
can you tell me how to set up or where can I find more info.

I have tested various builds etc. I get the localhost/jkstatus page but not the 
examples.

Your help is greatly appreciated.

Thanks
Asif

-Original Message-
From: Dean, Michael D. [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 2:46 PM
To: '[EMAIL PROTECTED]'
Subject: redirect?


I have Apache 2.0.47, Tomcat 5.0 and mod_jk2/2.0.2 running

http://127.0.0.1:8009/jsp-examples/

http://127.0.0.1:8009/servlets-examples/

So how/what do I modify such that:

http://127.0.0.1/jsp-examples/

http://127.0.0.1/servlet-examples

return the same pages when the port number isn't specified in the URL...

I'm trying to set it so the user doesn't have to remember the ports

Best Regards,

Michael Dean
Sun Certified Programmer for the Java 2 Platform
Washington State Department of Corrections
ph: 360-664-8802
fx:  360-664-3985
mailto:[EMAIL PROTECTED]

I'm a sailor, of the waters and the sun,
I can fight the waves but have no weapons for the calm... 
 - The Ship


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect?

2003-10-23 Thread Lee, Paul NYC
I'm sorry.  I didn't see that you also had apache running.  Please disregard
my previous response.

-Original Message-
From: Dean, Michael D. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 2:46 PM
To: '[EMAIL PROTECTED]'
Subject: redirect?


I have Apache 2.0.47, Tomcat 5.0 and mod_jk2/2.0.2 running

http://127.0.0.1:8009/jsp-examples/

http://127.0.0.1:8009/servlets-examples/

So how/what do I modify such that:

http://127.0.0.1/jsp-examples/

http://127.0.0.1/servlet-examples

return the same pages when the port number isn't specified in the URL...

I'm trying to set it so the user doesn't have to remember the ports

Best Regards,

Michael Dean
Sun Certified Programmer for the Java 2 Platform
Washington State Department of Corrections
ph: 360-664-8802
fx:  360-664-3985
mailto:[EMAIL PROTECTED]

I'm a sailor, of the waters and the sun,
I can fight the waves but have no weapons for the calm... 
 - The Ship


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect?

2003-10-23 Thread Filip Hanik
well. this is kind of a hack isn't it?
- Original Message - 
From: Lee, Paul NYC [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 11:50 AM
Subject: RE: redirect?


That's just the port number specified in server.xml.  Just change it from
8009 to 80.  Remember, if you are on a unix machine, you will need to start
the server as root after this change.

-Original Message-
From: Dean, Michael D. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 2:46 PM
To: '[EMAIL PROTECTED]'
Subject: redirect?


I have Apache 2.0.47, Tomcat 5.0 and mod_jk2/2.0.2 running

http://127.0.0.1:8009/jsp-examples/

http://127.0.0.1:8009/servlets-examples/

So how/what do I modify such that:

http://127.0.0.1/jsp-examples/

http://127.0.0.1/servlet-examples

return the same pages when the port number isn't specified in the URL...

I'm trying to set it so the user doesn't have to remember the ports

Best Regards,

Michael Dean
Sun Certified Programmer for the Java 2 Platform
Washington State Department of Corrections
ph: 360-664-8802
fx:  360-664-3985
mailto:[EMAIL PROTECTED]

I'm a sailor, of the waters and the sun,
I can fight the waves but have no weapons for the calm... 
- The Ship


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect port 8080 to 443

2003-10-14 Thread Twan Munster
I got it working,

thnx
now i have to get my client authentication working. Its very difficult under
tomcat.

- Original Message - 
From: Steph Richardson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; Twan Munster
[EMAIL PROTECTED]
Sent: Monday, October 13, 2003 10:56 PM
Subject: RE: redirect port 8080 to 443


 Can't think why this is still a problem ( it definitely works for me ) ,
other than a simple one of URL patterns.
 Does the URI /secure match the pattern /secure/*, is there a default
document there which would cause a redirect that is
 affecting this.
 What happens when you try going to http://localhost/secure/somethingelse


  -Original Message-
  From: Twan Munster [mailto:[EMAIL PROTECTED]
  Sent: Monday, October 13, 2003 6:17 AM
  To: Tomcat Users List
  Subject: Re: redirect port 8080 to 443
 
 
  thnx for comment, but it didn't work
  I still can connect to http://localhost:8080/secure/
 
  Twan
  - Original Message -
  From: Steph Richardson [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Sunday, October 12, 2003 5:17 PM
  Subject: RE: redirect port 8080 to 443
 
 
  
   You can have tomcat automatically make redirects to https ( and
whatever
  port is configured in the redirectPort attribute of your
   http Connecter - 443 usually ), you can add some constraints in
web.xml.
  Try this altered for whatever directories you want to be
   https only :
   security-constraint
   web-resource-collection
   web-resource-nameSome Directories/web-resource-name
   url-pattern/secure/*/url-pattern
   url-pattern/checkout/*/url-pattern
   /web-resource-collection
   user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
   /user-data-constraint
   /security-constraint
  
   Beware now of issues with welcome-file-list redirects happening at the
  same time as this one. You can end up with situations where
   tomcat sends you to https on the http port. e.g. :
  https://myserver.com:8080/secure.index.jsp
  
  
  
   Steph
  
  
  
  
-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 11, 2003 12:39 AM
To: [EMAIL PROTECTED]
Subject: Re: redirect port 8080 to 443
   
   
It's in the FAQ:
http://jakarta.apache.org/tomcat/faq/security.html#https
   
Twan Munster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,
   
I'm using apache+mod_ssl+mod_jk to make a secure connection.
But every time I call a page in cocoon it is called through port
8080.
  Is it
possible to redirect a call to port 8080  to port 443? And not for
the
entire server, but only for a certain directory?How is this done?
   
thnx
   
Twan
   
   
   
   
  
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect port 8080 to 443

2003-10-13 Thread Twan Munster
thnx for comment, but it didn't work
I still can connect to http://localhost/secure/

Twan
- Original Message - 
From: Bill Barker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 11, 2003 6:38 AM
Subject: Re: redirect port 8080 to 443


 It's in the FAQ:
 http://jakarta.apache.org/tomcat/faq/security.html#https

 Twan Munster [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hello,

 I'm using apache+mod_ssl+mod_jk to make a secure connection.
 But every time I call a page in cocoon it is called through port 8080. Is
it
 possible to redirect a call to port 8080  to port 443? And not for the
 entire server, but only for a certain directory?How is this done?

 thnx

 Twan




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect port 8080 to 443

2003-10-13 Thread Twan Munster
thnx for comment, but it didn't work
I still can connect to http://localhost:8080/secure/

Twan
- Original Message - 
From: Steph Richardson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, October 12, 2003 5:17 PM
Subject: RE: redirect port 8080 to 443



 You can have tomcat automatically make redirects to https ( and whatever
port is configured in the redirectPort attribute of your
 http Connecter - 443 usually ), you can add some constraints in web.xml.
Try this altered for whatever directories you want to be
 https only :
 security-constraint
 web-resource-collection
 web-resource-nameSome Directories/web-resource-name
 url-pattern/secure/*/url-pattern
 url-pattern/checkout/*/url-pattern
 /web-resource-collection
 user-data-constraint
 transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
 /security-constraint

 Beware now of issues with welcome-file-list redirects happening at the
same time as this one. You can end up with situations where
 tomcat sends you to https on the http port. e.g. :
https://myserver.com:8080/secure.index.jsp



 Steph




  -Original Message-
  From: Bill Barker [mailto:[EMAIL PROTECTED]
  Sent: Saturday, October 11, 2003 12:39 AM
  To: [EMAIL PROTECTED]
  Subject: Re: redirect port 8080 to 443
 
 
  It's in the FAQ:
  http://jakarta.apache.org/tomcat/faq/security.html#https
 
  Twan Munster [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  Hello,
 
  I'm using apache+mod_ssl+mod_jk to make a secure connection.
  But every time I call a page in cocoon it is called through port 8080.
Is it
  possible to redirect a call to port 8080  to port 443? And not for the
  entire server, but only for a certain directory?How is this done?
 
  thnx
 
  Twan
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect port 8080 to 443

2003-10-13 Thread Steph Richardson
Can't think why this is still a problem ( it definitely works for me ) , other than a 
simple one of URL patterns.
Does the URI /secure match the pattern /secure/*, is there a default document 
there which would cause a redirect that is
affecting this.
What happens when you try going to http://localhost/secure/somethingelse


 -Original Message-
 From: Twan Munster [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 13, 2003 6:17 AM
 To: Tomcat Users List
 Subject: Re: redirect port 8080 to 443


 thnx for comment, but it didn't work
 I still can connect to http://localhost:8080/secure/

 Twan
 - Original Message -
 From: Steph Richardson [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Sunday, October 12, 2003 5:17 PM
 Subject: RE: redirect port 8080 to 443


 
  You can have tomcat automatically make redirects to https ( and whatever
 port is configured in the redirectPort attribute of your
  http Connecter - 443 usually ), you can add some constraints in web.xml.
 Try this altered for whatever directories you want to be
  https only :
  security-constraint
  web-resource-collection
  web-resource-nameSome Directories/web-resource-name
  url-pattern/secure/*/url-pattern
  url-pattern/checkout/*/url-pattern
  /web-resource-collection
  user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
  /user-data-constraint
  /security-constraint
 
  Beware now of issues with welcome-file-list redirects happening at the
 same time as this one. You can end up with situations where
  tomcat sends you to https on the http port. e.g. :
 https://myserver.com:8080/secure.index.jsp
 
 
 
  Steph
 
 
 
 
   -Original Message-
   From: Bill Barker [mailto:[EMAIL PROTECTED]
   Sent: Saturday, October 11, 2003 12:39 AM
   To: [EMAIL PROTECTED]
   Subject: Re: redirect port 8080 to 443
  
  
   It's in the FAQ:
   http://jakarta.apache.org/tomcat/faq/security.html#https
  
   Twan Munster [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
   Hello,
  
   I'm using apache+mod_ssl+mod_jk to make a secure connection.
   But every time I call a page in cocoon it is called through port 8080.
 Is it
   possible to redirect a call to port 8080  to port 443? And not for the
   entire server, but only for a certain directory?How is this done?
  
   thnx
  
   Twan
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: redirect port 8080 to 443

2003-10-12 Thread Steph Richardson

You can have tomcat automatically make redirects to https ( and whatever port is 
configured in the redirectPort attribute of your
http Connecter - 443 usually ), you can add some constraints in web.xml. Try this 
altered for whatever directories you want to be
https only :
security-constraint
web-resource-collection
web-resource-nameSome Directories/web-resource-name
url-pattern/secure/*/url-pattern
url-pattern/checkout/*/url-pattern
/web-resource-collection
user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

Beware now of issues with welcome-file-list redirects happening at the same time as 
this one. You can end up with situations where
tomcat sends you to https on the http port. e.g. : 
https://myserver.com:8080/secure.index.jsp



Steph




 -Original Message-
 From: Bill Barker [mailto:[EMAIL PROTECTED]
 Sent: Saturday, October 11, 2003 12:39 AM
 To: [EMAIL PROTECTED]
 Subject: Re: redirect port 8080 to 443


 It's in the FAQ:
 http://jakarta.apache.org/tomcat/faq/security.html#https

 Twan Munster [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hello,

 I'm using apache+mod_ssl+mod_jk to make a secure connection.
 But every time I call a page in cocoon it is called through port 8080. Is it
 possible to redirect a call to port 8080  to port 443? And not for the
 entire server, but only for a certain directory?How is this done?

 thnx

 Twan




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect port 8080 to 443

2003-10-11 Thread Peter Harrison
On Sat, 11 Oct 2003 17:38, Bill Barker wrote:
 It's in the FAQ:
 http://jakarta.apache.org/tomcat/faq/security.html#https

 Twan Munster [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hello,

 I'm using apache+mod_ssl+mod_jk to make a secure connection.
 But every time I call a page in cocoon it is called through port 8080. Is
 it possible to redirect a call to port 8080  to port 443? And not for the
 entire server, but only for a certain directory?How is this done?

Assuming you have configured tomcat correctly to handle SSL its simply a 
matter of using https:// rather than http:// in you URL's.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect port 8080 to 443

2003-10-10 Thread Bill Barker
It's in the FAQ:
http://jakarta.apache.org/tomcat/faq/security.html#https

Twan Munster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,

I'm using apache+mod_ssl+mod_jk to make a secure connection.
But every time I call a page in cocoon it is called through port 8080. Is it
possible to redirect a call to port 8080  to port 443? And not for the
entire server, but only for a certain directory?How is this done?

thnx

Twan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Redirect to home page on logon

2003-07-21 Thread Tarek M. Nabil
Thanks, I got the idea. But I imagine that since my application is protected, any 
request I make will be redirected to the login page. And since telnet doesn't support 
sessions, I don't I'll every get rid of that, or can I?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 20, 2003 11:52 AM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon


Hi, this is what I do smetimes (nly to look at my own things, of
course...):
$ telnet 192.168.1.200 80
...
It might respose by telling me :
..
Trying 192.16.1.200.. 
Connected to 12.168.1.200
...
Then you type in something like this :
GET /help.txt HTTP/1.0
...
It will probably give you a log winded response like this :
HTTP/1.1 20 OK
Date: balbla
Server: Apache/1.3.26 (Unix) blbla
Conetent -Type: text/plain
..
You ca a lot of info from it. You look at your own things of course.
And so forth. Hope that helps.

Tarek M. Nabil wrote:
 
 Thanks Tim. Could you please elaborate more on how to use telnet to do this.
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 17, 2003 10:49 PM
 To: Tomcat Users List
 Subject: Re: Redirect to home page on logon
 
 I recommend posting to the struts list and hope they don't respond by saying
 please post to the tomcat list
 
 Also telnet is nice for debugging requests too so you can see the headers
 begin returned in case some wacky redirect logic is being invoked that you
 might not be detecting.
 
 -Tim
 
 Tarek M. Nabil wrote:
  Tim, the Filter thing is a great idea, and it worked just fine. Thanks a million.
 
  Now, I have another problem that I just can't figure out. After the session 
  expires and the user makes a request, he's sent to the login page by Tomcat. After 
  he logs in, he's still sent to the error page. Of course the filter intercepts 
  this and redirects to the home page.
 
  I still can't figure out, though, why the request is sent to the error page. It 
  really doesn't make sense.
 
  I have my error pages configured as follows:
 
  !-- error pages --
  error-page
error-code500/error-code
location/error.do/location
  /error-page
  error-page
error-code404/error-code
location/error.do/location
  /error-page
  error-page
exception-typejava.lang.Exception/exception-type
location/error.do/location
  /error-page
 
  In error.do I do some logging, then forward to error.jsp. What's really driving me 
  crazy, is that in the case I was just describing, the request is sent directly to 
  error.jsp and it doesn't even go to error.do. I tried adding some debugging info 
  in error.jsp to see what error is happening, but, although the isErrorPage is 
  set to true, there's no exception object.
 
  I went into the Tomcat server.xml and raised the debug level to 4 for both the 
  host and the engine, and still the Tomcat logs does not mention anything about the 
  error that causes the forwarding to error.jsp. I even checked stdout and stderr, 
  nothing.
 
  What I can't understand is how the container knows about error.jsp, it's not 
  mentioned anywhere in my web.xml. The only place it's mentioned in is in the 
  struts-config.xml file. I even changed it's name to something else, thinking that 
  maybe error.jsp is some default value or something like index.jsp, but it didn't 
  help.
 
  Please, someone help me out here.
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 16, 2003 8:24 PM
  To: Tomcat Users List
  Subject: Re: Redirect to home page on logon
 
 
  Use a filter. Its container independent.
 
  The filter runs on the appropriate (or all) requests and would check if the
  beans are in the session. If not - redirect.
 
  OR
 
  If all the pages set an error condition - you might be able to use an error
  mapping directive in web.xml
 
  -Tim
 
  Tarek M. Nabil wrote:
 
 Hi everyone,
 
 I have an application that uses beans stored in the session context. If the user's 
 session times out, he's asked to re-login on his next request. For this, I'm using 
 J2EE security; I'm not doing it myself.
 After the user is finished with the re-login, he's supposed to complete his 
 request, but the fact that the beans are not in the session anymore produces an 
 error.
 Unfortunately, those beans are specific to the last request the user made, so I 
 cannot re-initialize them in a listener for session creation.
 
 I was wondering if there's a way to configure security so that after the user logs 
 in he's redirected to a certain page instead of being able to continue his last 
 request.
 
 I know this can be done manually, but I would have to do it in every web component 
 I have which is really tiresome. Any quick solutions?
 
 Any help is appreciated.
 
 I'm sorry that this question is not Tomcat specific, but I tried the 
 servlet-interest list and got no responses.
 
 Thanks,
 Tarek M. Nabil

Re: Redirect to home page on logon

2003-07-21 Thread Tim Funk
Telnet should support the full HTTP Spec. ;)

The tricky part is knowing the headers to send with your request and 
remembering any special headers you get back  for your next request. For example:

=
[EMAIL PROTECTED]: telnet jenny 80
Trying 10.0.1.20 ...
Connected to jenny
Escape character is '^]'.
GET / HTTP/1.1
Host: jenny
Connection: close
Cookie: JSESSIONID=8675309.jenny
=
-Tim

Tarek M. Nabil wrote:
Thanks, I got the idea. But I imagine that since my application is protected, any request I make will be redirected to the login page. And since telnet doesn't support sessions, I don't I'll every get rid of that, or can I?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 20, 2003 11:52 AM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon
Hi, this is what I do smetimes (nly to look at my own things, of
course...):
$ telnet 192.168.1.200 80
...
It might respose by telling me :
..
Trying 192.16.1.200.. 
Connected to 12.168.1.200
...
Then you type in something like this :
GET /help.txt HTTP/1.0
...
It will probably give you a log winded response like this :
HTTP/1.1 20 OK
Date: balbla
Server: Apache/1.3.26 (Unix) blbla
Conetent -Type: text/plain
..
You ca a lot of info from it. You look at your own things of course.
And so forth. Hope that helps.

Tarek M. Nabil wrote:

Thanks Tim. Could you please elaborate more on how to use telnet to do this.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 10:49 PM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon
I recommend posting to the struts list and hope they don't respond by saying
please post to the tomcat list
Also telnet is nice for debugging requests too so you can see the headers
begin returned in case some wacky redirect logic is being invoked that you
might not be detecting.
-Tim

Tarek M. Nabil wrote:

Tim, the Filter thing is a great idea, and it worked just fine. Thanks a million.

Now, I have another problem that I just can't figure out. After the session expires and the user makes a request, he's sent to the login page by Tomcat. After he logs in, he's still sent to the error page. Of course the filter intercepts this and redirects to the home page.

I still can't figure out, though, why the request is sent to the error page. It really doesn't make sense.

I have my error pages configured as follows:

   !-- error pages --
   error-page
 error-code500/error-code
 location/error.do/location
   /error-page
   error-page
 error-code404/error-code
 location/error.do/location
   /error-page
   error-page
 exception-typejava.lang.Exception/exception-type
 location/error.do/location
   /error-page
In error.do I do some logging, then forward to error.jsp. What's really driving me crazy, is that in the case I was just describing, the request is sent directly to error.jsp and it doesn't even go to error.do. I tried adding some debugging info in error.jsp to see what error is happening, but, although the isErrorPage is set to true, there's no exception object.

I went into the Tomcat server.xml and raised the debug level to 4 for both the host and the engine, and still the Tomcat logs does not mention anything about the error that causes the forwarding to error.jsp. I even checked stdout and stderr, nothing.

What I can't understand is how the container knows about error.jsp, it's not mentioned anywhere in my web.xml. The only place it's mentioned in is in the struts-config.xml file. I even changed it's name to something else, thinking that maybe error.jsp is some default value or something like index.jsp, but it didn't help.

Please, someone help me out here.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 8:24 PM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon
Use a filter. Its container independent.

The filter runs on the appropriate (or all) requests and would check if the
beans are in the session. If not - redirect.
OR

If all the pages set an error condition - you might be able to use an error
mapping directive in web.xml
-Tim

Tarek M. Nabil wrote:


Hi everyone,

I have an application that uses beans stored in the session context. If the user's 
session times out, he's asked to re-login on his next request. For this, I'm using 
J2EE security; I'm not doing it myself.
After the user is finished with the re-login, he's supposed to complete his request, 
but the fact that the beans are not in the session anymore produces an error.
Unfortunately, those beans are specific to the last request the user made, so I cannot 
re-initialize them in a listener for session creation.
I was wondering if there's a way to configure security so that after the user logs in he's redirected to a certain page instead of being able to continue his last request.

I know this can be done manually, but I would have to do it in every web

RE: Redirect to home page on logon

2003-07-20 Thread Tarek M. Nabil
Thanks Tim. Could you please elaborate more on how to use telnet to do this.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 10:49 PM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon


I recommend posting to the struts list and hope they don't respond by saying 
please post to the tomcat list

Also telnet is nice for debugging requests too so you can see the headers 
begin returned in case some wacky redirect logic is being invoked that you 
might not be detecting.

-Tim

Tarek M. Nabil wrote:
 Tim, the Filter thing is a great idea, and it worked just fine. Thanks a million.
 
 Now, I have another problem that I just can't figure out. After the session expires 
 and the user makes a request, he's sent to the login page by Tomcat. After he logs 
 in, he's still sent to the error page. Of course the filter intercepts this and 
 redirects to the home page.
 
 I still can't figure out, though, why the request is sent to the error page. It 
 really doesn't make sense.
 
 I have my error pages configured as follows:
 
 !-- error pages --
 error-page 
   error-code500/error-code
   location/error.do/location
 /error-page
 error-page 
   error-code404/error-code
   location/error.do/location
 /error-page
 error-page 
   exception-typejava.lang.Exception/exception-type
   location/error.do/location
 /error-page
 
 In error.do I do some logging, then forward to error.jsp. What's really driving me 
 crazy, is that in the case I was just describing, the request is sent directly to 
 error.jsp and it doesn't even go to error.do. I tried adding some debugging info in 
 error.jsp to see what error is happening, but, although the isErrorPage is set to 
 true, there's no exception object.
 
 I went into the Tomcat server.xml and raised the debug level to 4 for both the host 
 and the engine, and still the Tomcat logs does not mention anything about the error 
 that causes the forwarding to error.jsp. I even checked stdout and stderr, nothing.
 
 What I can't understand is how the container knows about error.jsp, it's not 
 mentioned anywhere in my web.xml. The only place it's mentioned in is in the 
 struts-config.xml file. I even changed it's name to something else, thinking that 
 maybe error.jsp is some default value or something like index.jsp, but it didn't 
 help.
 
 Please, someone help me out here.
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 16, 2003 8:24 PM
 To: Tomcat Users List
 Subject: Re: Redirect to home page on logon
 
 
 Use a filter. Its container independent.
 
 The filter runs on the appropriate (or all) requests and would check if the 
 beans are in the session. If not - redirect.
 
 OR
 
 If all the pages set an error condition - you might be able to use an error 
 mapping directive in web.xml
 
 -Tim
 
 Tarek M. Nabil wrote:
 
Hi everyone,

I have an application that uses beans stored in the session context. If the user's 
session times out, he's asked to re-login on his next request. For this, I'm using 
J2EE security; I'm not doing it myself.
After the user is finished with the re-login, he's supposed to complete his request, 
but the fact that the beans are not in the session anymore produces an error.
Unfortunately, those beans are specific to the last request the user made, so I 
cannot re-initialize them in a listener for session creation.

I was wondering if there's a way to configure security so that after the user logs 
in he's redirected to a certain page instead of being able to continue his last 
request.

I know this can be done manually, but I would have to do it in every web component I 
have which is really tiresome. Any quick solutions?

Any help is appreciated.

I'm sorry that this question is not Tomcat specific, but I tried the 
servlet-interest list and got no responses.

Thanks,
Tarek M. Nabil
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to home page on logon

2003-07-20 Thread achana
Hi, this is what I do smetimes (nly to look at my own things, of
course...):
$ telnet 192.168.1.200 80
...
It might respose by telling me :
..
Trying 192.16.1.200.. 
Connected to 12.168.1.200
...
Then you type in something like this :
GET /help.txt HTTP/1.0
...
It will probably give you a log winded response like this :
HTTP/1.1 20 OK
Date: balbla
Server: Apache/1.3.26 (Unix) blbla
Conetent -Type: text/plain
..
You ca a lot of info from it. You look at your own things of course.
And so forth. Hope that helps.

Tarek M. Nabil wrote:
 
 Thanks Tim. Could you please elaborate more on how to use telnet to do this.
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 17, 2003 10:49 PM
 To: Tomcat Users List
 Subject: Re: Redirect to home page on logon
 
 I recommend posting to the struts list and hope they don't respond by saying
 please post to the tomcat list
 
 Also telnet is nice for debugging requests too so you can see the headers
 begin returned in case some wacky redirect logic is being invoked that you
 might not be detecting.
 
 -Tim
 
 Tarek M. Nabil wrote:
  Tim, the Filter thing is a great idea, and it worked just fine. Thanks a million.
 
  Now, I have another problem that I just can't figure out. After the session 
  expires and the user makes a request, he's sent to the login page by Tomcat. After 
  he logs in, he's still sent to the error page. Of course the filter intercepts 
  this and redirects to the home page.
 
  I still can't figure out, though, why the request is sent to the error page. It 
  really doesn't make sense.
 
  I have my error pages configured as follows:
 
  !-- error pages --
  error-page
error-code500/error-code
location/error.do/location
  /error-page
  error-page
error-code404/error-code
location/error.do/location
  /error-page
  error-page
exception-typejava.lang.Exception/exception-type
location/error.do/location
  /error-page
 
  In error.do I do some logging, then forward to error.jsp. What's really driving me 
  crazy, is that in the case I was just describing, the request is sent directly to 
  error.jsp and it doesn't even go to error.do. I tried adding some debugging info 
  in error.jsp to see what error is happening, but, although the isErrorPage is 
  set to true, there's no exception object.
 
  I went into the Tomcat server.xml and raised the debug level to 4 for both the 
  host and the engine, and still the Tomcat logs does not mention anything about the 
  error that causes the forwarding to error.jsp. I even checked stdout and stderr, 
  nothing.
 
  What I can't understand is how the container knows about error.jsp, it's not 
  mentioned anywhere in my web.xml. The only place it's mentioned in is in the 
  struts-config.xml file. I even changed it's name to something else, thinking that 
  maybe error.jsp is some default value or something like index.jsp, but it didn't 
  help.
 
  Please, someone help me out here.
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 16, 2003 8:24 PM
  To: Tomcat Users List
  Subject: Re: Redirect to home page on logon
 
 
  Use a filter. Its container independent.
 
  The filter runs on the appropriate (or all) requests and would check if the
  beans are in the session. If not - redirect.
 
  OR
 
  If all the pages set an error condition - you might be able to use an error
  mapping directive in web.xml
 
  -Tim
 
  Tarek M. Nabil wrote:
 
 Hi everyone,
 
 I have an application that uses beans stored in the session context. If the user's 
 session times out, he's asked to re-login on his next request. For this, I'm using 
 J2EE security; I'm not doing it myself.
 After the user is finished with the re-login, he's supposed to complete his 
 request, but the fact that the beans are not in the session anymore produces an 
 error.
 Unfortunately, those beans are specific to the last request the user made, so I 
 cannot re-initialize them in a listener for session creation.
 
 I was wondering if there's a way to configure security so that after the user logs 
 in he's redirected to a certain page instead of being able to continue his last 
 request.
 
 I know this can be done manually, but I would have to do it in every web component 
 I have which is really tiresome. Any quick solutions?
 
 Any help is appreciated.
 
 I'm sorry that this question is not Tomcat specific, but I tried the 
 servlet-interest list and got no responses.
 
 Thanks,
 Tarek M. Nabil
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED

RE: Redirect to home page on logon

2003-07-17 Thread Tarek M. Nabil

Tim, the Filter thing is a great idea, and it worked just fine. Thanks a million.

Now, I have another problem that I just can't figure out. After the session expires 
and the user makes a request, he's sent to the login page by Tomcat. After he logs in, 
he's still sent to the error page. Of course the filter intercepts this and redirects 
to the home page.

I still can't figure out, though, why the request is sent to the error page. It really 
doesn't make sense.

I have my error pages configured as follows:

!-- error pages --
error-page 
  error-code500/error-code
  location/error.do/location
/error-page
error-page 
  error-code404/error-code
  location/error.do/location
/error-page
error-page 
  exception-typejava.lang.Exception/exception-type
  location/error.do/location
/error-page

In error.do I do some logging, then forward to error.jsp. What's really driving me 
crazy, is that in the case I was just describing, the request is sent directly to 
error.jsp and it doesn't even go to error.do. I tried adding some debugging info in 
error.jsp to see what error is happening, but, although the isErrorPage is set to 
true, there's no exception object.

I went into the Tomcat server.xml and raised the debug level to 4 for both the host 
and the engine, and still the Tomcat logs does not mention anything about the error 
that causes the forwarding to error.jsp. I even checked stdout and stderr, nothing.

What I can't understand is how the container knows about error.jsp, it's not mentioned 
anywhere in my web.xml. The only place it's mentioned in is in the struts-config.xml 
file. I even changed it's name to something else, thinking that maybe error.jsp is 
some default value or something like index.jsp, but it didn't help.

Please, someone help me out here.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 8:24 PM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon


Use a filter. Its container independent.

The filter runs on the appropriate (or all) requests and would check if the 
beans are in the session. If not - redirect.

OR

If all the pages set an error condition - you might be able to use an error 
mapping directive in web.xml

-Tim

Tarek M. Nabil wrote:
 Hi everyone,
 
 I have an application that uses beans stored in the session context. If the user's 
 session times out, he's asked to re-login on his next request. For this, I'm using 
 J2EE security; I'm not doing it myself.
 After the user is finished with the re-login, he's supposed to complete his request, 
 but the fact that the beans are not in the session anymore produces an error.
 Unfortunately, those beans are specific to the last request the user made, so I 
 cannot re-initialize them in a listener for session creation.
 
 I was wondering if there's a way to configure security so that after the user logs 
 in he's redirected to a certain page instead of being able to continue his last 
 request.
 
 I know this can be done manually, but I would have to do it in every web component I 
 have which is really tiresome. Any quick solutions?
 
 Any help is appreciated.
 
 I'm sorry that this question is not Tomcat specific, but I tried the 
 servlet-interest list and got no responses.
 
 Thanks,
 Tarek M. Nabil


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to home page on logon

2003-07-17 Thread Tim Funk
I recommend posting to the struts list and hope they don't respond by saying 
please post to the tomcat list

Also telnet is nice for debugging requests too so you can see the headers 
begin returned in case some wacky redirect logic is being invoked that you 
might not be detecting.

-Tim

Tarek M. Nabil wrote:
Tim, the Filter thing is a great idea, and it worked just fine. Thanks a million.

Now, I have another problem that I just can't figure out. After the session expires and the user makes a request, he's sent to the login page by Tomcat. After he logs in, he's still sent to the error page. Of course the filter intercepts this and redirects to the home page.

I still can't figure out, though, why the request is sent to the error page. It really doesn't make sense.

I have my error pages configured as follows:

!-- error pages --
error-page 
  error-code500/error-code
  location/error.do/location
/error-page
error-page 
  error-code404/error-code
  location/error.do/location
/error-page
error-page 
  exception-typejava.lang.Exception/exception-type
  location/error.do/location
/error-page

In error.do I do some logging, then forward to error.jsp. What's really driving me crazy, is that in the case I was just describing, the request is sent directly to error.jsp and it doesn't even go to error.do. I tried adding some debugging info in error.jsp to see what error is happening, but, although the isErrorPage is set to true, there's no exception object.

I went into the Tomcat server.xml and raised the debug level to 4 for both the host and the engine, and still the Tomcat logs does not mention anything about the error that causes the forwarding to error.jsp. I even checked stdout and stderr, nothing.

What I can't understand is how the container knows about error.jsp, it's not mentioned anywhere in my web.xml. The only place it's mentioned in is in the struts-config.xml file. I even changed it's name to something else, thinking that maybe error.jsp is some default value or something like index.jsp, but it didn't help.

Please, someone help me out here.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 8:24 PM
To: Tomcat Users List
Subject: Re: Redirect to home page on logon
Use a filter. Its container independent.

The filter runs on the appropriate (or all) requests and would check if the 
beans are in the session. If not - redirect.

OR

If all the pages set an error condition - you might be able to use an error 
mapping directive in web.xml

-Tim

Tarek M. Nabil wrote:

Hi everyone,

I have an application that uses beans stored in the session context. If the user's 
session times out, he's asked to re-login on his next request. For this, I'm using 
J2EE security; I'm not doing it myself.
After the user is finished with the re-login, he's supposed to complete his request, 
but the fact that the beans are not in the session anymore produces an error.
Unfortunately, those beans are specific to the last request the user made, so I cannot 
re-initialize them in a listener for session creation.
I was wondering if there's a way to configure security so that after the user logs in he's redirected to a certain page instead of being able to continue his last request.

I know this can be done manually, but I would have to do it in every web component I have which is really tiresome. Any quick solutions?

Any help is appreciated.

I'm sorry that this question is not Tomcat specific, but I tried the servlet-interest list and got no responses.

Thanks,
Tarek M. Nabil


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Redirect to home page on logon

2003-07-16 Thread Tim Funk
Use a filter. Its container independent.

The filter runs on the appropriate (or all) requests and would check if the 
beans are in the session. If not - redirect.

OR

If all the pages set an error condition - you might be able to use an error 
mapping directive in web.xml

-Tim

Tarek M. Nabil wrote:
Hi everyone,

I have an application that uses beans stored in the session context. If the user's 
session times out, he's asked to re-login on his next request. For this, I'm using 
J2EE security; I'm not doing it myself.
After the user is finished with the re-login, he's supposed to complete his request, 
but the fact that the beans are not in the session anymore produces an error.
Unfortunately, those beans are specific to the last request the user made, so I cannot 
re-initialize them in a listener for session creation.
I was wondering if there's a way to configure security so that after the user logs in he's redirected to a certain page instead of being able to continue his last request.

I know this can be done manually, but I would have to do it in every web component I have which is really tiresome. Any quick solutions?

Any help is appreciated.

I'm sorry that this question is not Tomcat specific, but I tried the servlet-interest list and got no responses.

Thanks,
Tarek M. Nabil


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Redirect HTTP to HTTPS?

2003-06-27 Thread Shapira, Yoav

Howdy,
A webapp must have a WEB-INF folder.  It's a good idea to put a
web.xml file there, even if it only has the webapp / element in it.

You'd like all port 80 requests (both HTTP and HTTPS) routed to port
8443?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Latesha Williams [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 11:26 AM
To: Tomcat Users List
Subject: Redirect HTTP to HTTPS?
Importance: High

How do you redirect HTTP to HTTPS in a Tomcat Standalone configuration
(no
Apache WS)? This configuration serves static web content on port 80 and
JSP/Java Servlets on port 8080.  I would like requests coming in on
port 80
to be routed to HTTPS automatically.  Although the HTTP connectors are
configured to redirect to port 8443, it's not working.  I tried adding
a
security-constraint parameter to $CATALINA_HOME/conf/web.xml and set
the
transport to CONFIDENTIAL, but that didn't work.  Any ideas?

(P.S.)  Could the directory structure for the web app be the cause of
the
problem (i.e. there is no /WEB-INF folder)?

Latesha Williams
Applications Support, Information Technology
American Museum of Natural History
[EMAIL PROTECTED]
(W) 212.769.5947
(C) 917.837.2460



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect http to https???

2003-05-28 Thread Tim Funk
http://tomcatfaq.sourceforge.net/security.html

-Tim

tomcat wrote:
Hi
I implemented SSL . If i brows particular http, it shold redirect to https 
page. How to do this.How to redirect http page to https page??

Regards
Tomcat


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Redirect and Tomcat

2003-01-30 Thread Daniel Brown
This was news to me too. But, from the horse's mouth:

RFC 2616HTTP/1.1   June 1999


   If the 302 status code is received in response to a request other
   than GET or HEAD, the user agent MUST NOT automatically redirect the
   request unless it can be confirmed by the user, since this might
   change the conditions under which the request was issued.

  Note: RFC 1945 and RFC 2068 specify that the client is not allowed
  to change the method on the redirected request.  However, most
  existing user agent implementations treat 302 as if it were a 303
  response, performing a GET on the Location field-value regardless
  of the original request method. The status codes 303 and 307 have
  been added for servers that wish to make unambiguously clear which
  kind of reaction is expected of the client.

So, in theory, you should generate a 303 response if the request method was
POST, and the web page you're redirecting to should be retrieved with a GET.
But in practice, the web browser will do just what you expect it to do if a
302 response is received.

Dan.

 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED]]
 Sent: 30 January 2003 16:01
 To: Tomcat Users List
 Subject: Re: Redirect and Tomcat




 Paul Yunusov wrote:

  Roman,
 
  The HTTP1.1 spec says the client should follow the redirect
 only if the method
  is GET or HEAD, so check that.

 Pardon for butting in, but does this mean that my login servlet which
 accepts and processes a POST request, then uses response.sendRedirect()
 to send the user to a different resource (another servlet), is invalid?



 Erik


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Redirect and Tomcat

2003-01-30 Thread Erik Price


Daniel Brown wrote:

This was news to me too. But, from the horse's mouth:


[...]


So, in theory, you should generate a 303 response if the request method was
POST, and the web page you're redirecting to should be retrieved with a GET.
But in practice, the web browser will do just what you expect it to do if a
302 response is received.


Hm... yes, in practice it works (currently that is how my app handles 
logins and it works in all browsers AFAIK), but at some point someone 
might implement the spec.  I always try to write in compliance of the 
spec, so what I'm wondering is how I can specify that the sendRedirect 
should use GET instead of the original method, which was POST.  (I seem 
to recall reading somewhere that sendRedirect uses the original method.)


Erik


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect and Tomcat

2003-01-30 Thread Paul Yunusov
On Thursday 30 January 2003 11:34 am, Erik Price wrote:
 Daniel Brown wrote:
  This was news to me too. But, from the horse's mouth:

 [...]

  So, in theory, you should generate a 303 response if the request method
  was POST, and the web page you're redirecting to should be retrieved with
  a GET. But in practice, the web browser will do just what you expect it
  to do if a 302 response is received.

 Hm... yes, in practice it works (currently that is how my app handles
 logins and it works in all browsers AFAIK), but at some point someone
 might implement the spec.  I always try to write in compliance of the
 spec, so what I'm wondering is how I can specify that the sendRedirect
 should use GET instead of the original method, which was POST.  (I seem
 to recall reading somewhere that sendRedirect uses the original method.)


 Erik

Section 10.3.4 of RFC 2616 (HTTP/1.1) addresses your problem:

quote
10.3.4 303 See Other

The response to the request can be found under a different URI and SHOULD be 
retrieved using a GET method on that resource. This method exists primarily 
to allow the output of a POST-activated script to redirect the user agent to 
a selected resource. The new URI is not a substitute reference for the 
originally requested resource. The 303 response MUST NOT be cached, but the 
response to the second (redirected) request might be cacheable.

The different URI SHOULD be given by the Location field in the response. 
Unless the request method was HEAD, the entity of the response SHOULD contain 
a short hypertext note with a hyperlink to the new URI(s).

Note: Many pre-HTTP/1.1 user agents do not understand the 303 status. When 
interoperability with such clients is a concern, the 302 status code may be 
used instead, since most user agents react to a 302 response as described 
here for 303.
/quote

Again, setStatus() and sendRedirect() in HttpServletRequest are your friends 
here.
I pulled the information above from rfc-editor.org.

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Redirect and Tomcat

2003-01-30 Thread Jon Eaves
Hi all,

And just to follow up on that, you should always serve your login page under
SSL as otherwise the bad guys can change the FORM action parameter and use it
to grab your usernames and passwords.

So, the initial GET to grab the login page can trigger the http-https
redirect rather than doing it under the POST of the FORM.  Which is the
best course of action anyway.

Cheers,
	-- jon

Daniel Brown wrote:

This was news to me too. But, from the horse's mouth:

RFC 2616HTTP/1.1   June 1999


   If the 302 status code is received in response to a request other
   than GET or HEAD, the user agent MUST NOT automatically redirect the
   request unless it can be confirmed by the user, since this might
   change the conditions under which the request was issued.


[ snip ]

--
Jon Eaves [EMAIL PROTECTED]
http://www.eaves.org/jon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Redirect and Tomcat

2003-01-29 Thread Filip Hanik
not really sure what you are asking,
but 
response.sendRedirect(...) in HttpServletResponse 

will do that


-Original Message-
From: Roman Shpak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 3:41 PM
To: [EMAIL PROTECTED]
Subject: Redirect and Tomcat


How can I resolve problem such as  redirect from one url to another help 
with tomcat same as option Redirect in Apache?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Redirect and Tomcat

2003-01-29 Thread Roman Shpak
30 ñÎ×ÁÒØ 2003 01:49, Filip Hanik ÎÁÐÉÓÁÌ:
 not really sure what you are asking,
 but
 response.sendRedirect(...) in HttpServletResponse

 will do that

Yes, of course, I know it. But problem is in redirect one url to another 
without any program code in servlet or jsp. Why? It needs for forward all 
request from https://www to https://... so if try to do this with  
response.sendRedirect(...)  catchs warning box. But if using Apache which has 
directive redirect in conf file warning box never shows. So has Tomcat 
similar directive?
Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Redirect and Tomcat

2003-01-29 Thread Paul Yunusov
On Wednesday 29 January 2003 07:52 pm, Roman Shpak wrote:
 30 ñÎ×ÁÒØ 2003 01:49, Filip Hanik ÎÁÐÉÓÁÌ:
  not really sure what you are asking,
  but
  response.sendRedirect(...) in HttpServletResponse
 
  will do that

 Yes, of course, I know it. But problem is in redirect one url to another
 without any program code in servlet or jsp. Why? It needs for forward all
 request from https://www to https://... so if try to do this with  
 response.sendRedirect(...)  catchs warning box. But if using Apache which
 has directive redirect in conf file warning box never shows. So has
 Tomcat similar directive?
 Thanks.

Roman,

The HTTP1.1 spec says the client should follow the redirect only if the method 
is GET or HEAD, so check that.

Also, check the status code for the response. Apache 1.3.27 uses HTTP status 
302 with its Redirect directive by default. It's not clear what status Tomcat 
uses for sendRedirect() from the servlet specs, which only say Sends a 
temporary redirect response to the client using the specified redirect 
location URL.

You can try different 3xx status codes using setStatus() from 
HttpServletResponse.

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Redirect Valve - contribution

2002-10-09 Thread Jean-Francois Arcand

Hi,

read : http://jakarta.apache.org/site/getinvolved.html

-- Jeanfrancois

Jens Andersen wrote:

 Hi all,

 I would like to contribute a Redirct Valve to Tomcat for the next 
 release or so - but how do I do that? Whom do I contact?

 Best regards,

 Jens Andersen



 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Redirect not working

2002-09-18 Thread Jonathan Soons

Are you sure that is a Redirect? Redirect requires  /path  -  URL.
Yours looks like an Alias.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 7:12 AM
To: [EMAIL PROTECTED]
Subject: Redirect not working


Hi all.
My configuration is: Apache 2.0.35 and Tomcat 4.0.3 (or 4.0.4, same
behaviour), with mod_webapp and warp connector. Solaris 8, jdk 1.4.0.
If I deploy examples webapp and access it through Tomcat's standalone
listener (port 8080) everything works ok.
When I access it through Apache, it works well until I find some kind of
redirection (ie /examples/ - /examples/index.html), then I get a page with
the message:
Apache Tomcat/4.0.3 -HTTP Status 302 - Moved Temporarily
but redirection is NOT followed by the browser (I've tried various versions
of IE, Netscape, Mozilla...).
If I try to connect using telnet, the response with port 8080 is:
HTTP/1.1 302 Moved Temporarily
while through Apache is:
HTTP/1.1 Moved Temporarily
Nevertheless, in access.log of Apache the status code for my request is
correctly set to 302.
Same behaviour if I do a sendRedirect from within a servlet or jsp,
redirecting to another servlet (no static content at all).

Can anybody help me?

TIA, Carlo



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Redirect not working

2002-09-18 Thread carlo . montanari


I'm quite sure: in one case I explicitly do a sendRedirect(newurl) from
within a servlet.
Furthermore, the response code is 302, which is a temporary redirection.






Jonathan Soons [EMAIL PROTECTED] on 18/09/2002 15.45.03

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:Tomcat Users List [EMAIL PROTECTED]
cc:

Subject:RE: Redirect not working


Are you sure that is a Redirect? Redirect requires  /path  -  URL.
Yours looks like an Alias.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 7:12 AM
To: [EMAIL PROTECTED]
Subject: Redirect not working


Hi all.
My configuration is: Apache 2.0.35 and Tomcat 4.0.3 (or 4.0.4, same
behaviour), with mod_webapp and warp connector. Solaris 8, jdk 1.4.0.
If I deploy examples webapp and access it through Tomcat's standalone
listener (port 8080) everything works ok.
When I access it through Apache, it works well until I find some kind of
redirection (ie /examples/ - /examples/index.html), then I get a page with
the message:
Apache Tomcat/4.0.3 -HTTP Status 302 - Moved Temporarily
but redirection is NOT followed by the browser (I've tried various versions
of IE, Netscape, Mozilla...).
If I try to connect using telnet, the response with port 8080 is:
HTTP/1.1 302 Moved Temporarily
while through Apache is:
HTTP/1.1 Moved Temporarily
Nevertheless, in access.log of Apache the status code for my request is
correctly set to 302.
Same behaviour if I do a sendRedirect from within a servlet or jsp,
redirecting to another servlet (no static content at all).

Can anybody help me?

TIA, Carlo



--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]






   Carlo Montanari
   Sysadm
   Unix office
   T-Systems Italia
   debis IT Services Italia S.p.A.
   Via degli Ontani, 25
   36100 - Vicenza
   Phone: +39 0444 558355
   Fax: +39 0444 558352
   Mobile: +39 348 4530249
   e-mail: [EMAIL PROTECTED]
   Internet: http://www.t-systems.it




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: redirect bug?

2002-09-05 Thread Andrew Conrad

Can you make this feature work from other JSP/Servlet containers or
other languages (ASP, PHP)?

It just seems like this would be an issue of the browser.  Have you
tried other browsers to see if they react differently?

- Andrew

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Leos Literak
 Sent: Thursday, September 05, 2002 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: redirect bug?
 
 
 Hi,
 
 I try to increase protection of my users
 with such servlet:
 
   String url = mailto:+user.getEmail();
   response.sendRedirect(url);
 
 e.g. on normal site there is no email, just
 link to servlet which redirects to email.
 
 Well, it partially works. It really
 opens email client. Unfortunatelly
 TO field is not filled.
 
 After some debugging I realized, that
 tomcat somewhere cuts off email address
 from url. String url is OK, but final
 URL is not:
 
 HTTP/1.1 302 Moved Temporarily
 Content-Type: text/html
 Connection: close
 Date: Thu, 05 Sep 2002 12:58:38 GMT
 Location: mailto:
 Server: Apache Tomcat/4.0.4 (HTTP/1.1 Connector)
 
 
 Any idea, why it doesn't work? Or other
 solution for this task?
 
 Thanks!
 
   Leos
 
 -- 
 Leos Literak
 http://AbcLinuxu.cz - tady je tucnakum hej!
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: redirect bug?

2002-09-05 Thread Leos Literak

Andrew Conrad wrote:
 Can you make this feature work from other JSP/Servlet containers or
 other languages (ASP, PHP)?

I haven't tried, but mail-archive.com utilizes this feature:

http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg07998.html

 It just seems like this would be an issue of the browser.  Have you
 tried other browsers to see if they react differently?

no, this is not browser specific issue. I used command line
telnet utility too:

[literakl@localhost literakl]$ telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /Profile?userId=1action=sendEmail HTTP1.0

HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Connection: close
Date: Thu, 05 Sep 2002 12:57:04 GMT
Location: mailto:
Server: Apache Tomcat/4.0.4 (HTTP/1.1 Connector)


It seems to me, that tomcat for some reason
discards

response.redirect(mailto:[EMAIL PROTECTED];)
to
response.redirect(mailto:;)

Why?

Leos

-Original Message-
From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Leos Literak
Sent: Thursday, September 05, 2002 9:21 AM
To: [EMAIL PROTECTED]
Subject: redirect bug?


Hi,

I try to increase protection of my users
with such servlet:

  String url = mailto:+user.getEmail();
  response.sendRedirect(url);

e.g. on normal site there is no email, just
link to servlet which redirects to email.

Well, it partially works. It really
opens email client. Unfortunatelly
TO field is not filled.

After some debugging I realized, that
tomcat somewhere cuts off email address
from url. String url is OK, but final
URL is not:

HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Connection: close
Date: Thu, 05 Sep 2002 12:58:38 GMT
Location: mailto:
Server: Apache Tomcat/4.0.4 (HTTP/1.1 Connector)


Any idea, why it doesn't work? Or other
solution for this task?


-- 
Leos Literak
http://AbcLinuxu.cz - tady je tucnakum hej!




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Redirect!

2002-08-22 Thread Barney Hamish

There are a couple of ways you can do this:
-Add a redirect header to your page 3XX (see rfc2616)
-Use jsp:forward tag
-Client side with javascript

But it really depends what you want to do exactly.
Hamish

-Original Message-
From: Alexander Schmidt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 22, 2002 11:05 AM
To: Tomcat Users List
Subject: Redirect!


Hello !
I want to redirect an URL, but I don´t know how! Has anyone an idea? I use
Tomcat4.0.1.

Thanks
 A. Schmidt


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Redirect!

2002-08-22 Thread Øyvind Vestavik


Create a url and redirect:

URL url = new Url(http:\\myserver.com);
response.sendRedirect(url.toString());

Øyvind

Øyvind Vestavik
Øvre Møllenberggt 44b
7014 Trondheim
[EMAIL PROTECTED]
41422911

On Thu, 22 Aug 2002, Alexander Schmidt wrote:

 Hello !
 I want to redirect an URL, but I don´t know how! Has anyone an idea? I use
 Tomcat4.0.1.

 Thanks
  A. Schmidt


 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Redirect port 80 requests to 443

2002-06-10 Thread Sefton, Adam

John,

I'm not sure if I am missing your point, but it sounds like I wanted to achieve the 
same thing as you (that is all requests to a standalone instance of Tomcat via https) 
and I did this by placing the following snippet of code in the /conf/web.xml, which 
applies to all applications:

  security-constraint
web-resource-collection
web-resource-nameAll Servlets/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
user-data-constraint
 transport-guarantee
CONFIDENTIAL
 /transport-guarantee
/user-data-constraint
  /security-constraint

This goes at the very end of web.xml, just before /web-app. This causes all requests 
on that Tomcat instance to use https.

Does this help at all?

Adam

-Original Message-
From: John Roth [mailto:[EMAIL PROTECTED]]
Sent: 07 June 2002 20:59
To: 'Tomcat Users List'
Subject: RE: Redirect port 80 requests to 443


Actually, I took it a step further:  I wanted to be sure that anyone who
goes to http: gets redirected.  With just a simple redirection page, someone
could still go http://oursite/ourapp and get by without using SSL.

Here's what I did:
1. added a new Service with the http connector (port 80) and a single app
with 1 page (index.html) and web.xml.
2. The index.html redirects them to https:
3. Snippets of code from server.xml:

Service name=Tomcat-(Redirector)
   Connector className=org.apache.catalina.connector.http.HttpConnector
address=x.x.x.x port=80 {remainder removed for ease}/
Engine name=Redirector defaultHost=localhost
Host name=localhost debug=4 appBase=webapps
unpackWARs=true
Context path= docBase=e:/staging/wwwroot/Redirector
reloadable=false/
/Host
/Engine
/Service
  Service name=Tomcat-(Staging)
Connector className=org.apache.catalina.connector.http.HttpConnector
address=x.x.x.x port=443 {remainder removed}
Factory className=org.apache.catalina.net.SSLServerSocketFactory
{remaining SSL Factory stuff}/
  /Connector
Engine name=Standalone defaultHost=localhost
... remainder of server.xml ...

Thanks,
John

-Original Message-
From: Richard S. Huntrods [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: RE: Redirect port 80 requests to 443


John Roth said:

This seems simple, but ...

I am running Tomcat 4.0.3, standalone on w2k.  I would like all requests
to
http://oursite/ to be automatically redirected to https://oursite/ but
am
not finding an elegant/simple solution.  Below is a snippet from
server.xml:


Why not simply create a web page that automatically redirects the
request to the https page?  That is what I did and it works fine.

-Richard


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


**
This message may contain information which is confidential or privileged.
If you are not the intended recipient, please advise the sender immediately
by reply e-mail and delete this message and any attachments
without retaining a copy.  

**


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Redirect port 80 requests to 443

2002-06-07 Thread Rick Fincher

Hi John,

Tomcat will do this automatically with your app but it has to know that it
is meant for the secure port only.  You tell it this by including something
like the following in your web.xml for the app.

security-constraint
web-resource-collection
  web-resource-nameappName/web-resource-name
  url-pattern/*/url-pattern
/web-resource-collection
user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
 /security-constraint

Rick

- Original Message -
From: John Roth [EMAIL PROTECTED]

 This seems simple, but ...

 I am running Tomcat 4.0.3, standalone on w2k.  I would like all requests
to
 http://oursite/ to be automatically redirected to https://oursite/ but am
 not finding an elegant/simple solution.  Below is a snippet from
server.xml:

 Connector className=org.apache.catalina.connector.http.HttpConnector
 port=80 minProcessors=2 redirectPort=443 maxProcessors=15
 enableLookups=false acceptCount=10/
 Connector className=org.apache.catalina.connector.http.HttpConnector
 port=443 minProcessors=2 maxProcessors=15 enableLookups=false
 acceptCount=10 scheme=https secure=true
   Factory className=org.apache.catalina.net.SSLServerSocketFactory
 keystoreFile=***.keystore keystorePass=*
 clientAuth=false protocol=TLS/
   /Connector

 Any ideas/pointers?

 Thanks,
 John Roth, Director net.Media
 Provider Solutions Corp.



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Redirect port 80 requests to 443

2002-06-07 Thread Richard S. Huntrods

John Roth said:

This seems simple, but ...

I am running Tomcat 4.0.3, standalone on w2k.  I would like all requests
to
http://oursite/ to be automatically redirected to https://oursite/ but
am
not finding an elegant/simple solution.  Below is a snippet from
server.xml:


Why not simply create a web page that automatically redirects the
request to the https page?  That is what I did and it works fine.

-Richard


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Redirect port 80 requests to 443

2002-06-07 Thread John Roth

Actually, I took it a step further:  I wanted to be sure that anyone who
goes to http: gets redirected.  With just a simple redirection page, someone
could still go http://oursite/ourapp and get by without using SSL.

Here's what I did:
1. added a new Service with the http connector (port 80) and a single app
with 1 page (index.html) and web.xml.
2. The index.html redirects them to https:
3. Snippets of code from server.xml:

Service name=Tomcat-(Redirector)
   Connector className=org.apache.catalina.connector.http.HttpConnector
address=x.x.x.x port=80 {remainder removed for ease}/
Engine name=Redirector defaultHost=localhost
Host name=localhost debug=4 appBase=webapps
unpackWARs=true
Context path= docBase=e:/staging/wwwroot/Redirector
reloadable=false/
/Host
/Engine
/Service
  Service name=Tomcat-(Staging)
Connector className=org.apache.catalina.connector.http.HttpConnector
address=x.x.x.x port=443 {remainder removed}
Factory className=org.apache.catalina.net.SSLServerSocketFactory
{remaining SSL Factory stuff}/
  /Connector
Engine name=Standalone defaultHost=localhost
... remainder of server.xml ...

Thanks,
John

-Original Message-
From: Richard S. Huntrods [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: RE: Redirect port 80 requests to 443


John Roth said:

This seems simple, but ...

I am running Tomcat 4.0.3, standalone on w2k.  I would like all requests
to
http://oursite/ to be automatically redirected to https://oursite/ but
am
not finding an elegant/simple solution.  Below is a snippet from
server.xml:


Why not simply create a web page that automatically redirects the
request to the https page?  That is what I did and it works fine.

-Richard


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread David Cassidy

is there a session.isInvalid() method ?

If so ... :)

D



Michael Molloy wrote:

 I've got an application that builds menus when a user logs in and sticks the menus 
in an object which I then put inside the session. All subsequent jsps get their menu 
from that object in the session.

 However, when their session expires and they try to access a jsp, they get a 
NullPointerException, as expected.

 How can I catch that error and redirect them to the logon page? Or is their some 
other way to handle it? Is there a better way than putting some if else statements in 
the jsp to check the session for the menu object?

 Thanks
 --Michael

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread Michael Molloy

Well, we're trying to keep as much logic out of the jsps as possible, so if there is a 
setting for web.xml or something to foward all pages that throw exceptions to a 
certain url, that's what I'm looking for.

I appreciate your suggestion, and if that's what we need to do, we'll do it, but I'd 
like to know about any other possibilities, also.

Thanks
--Michael

On Wed, 13 Feb 2002 15:37:53 +
David Cassidy [EMAIL PROTECTED] wrote:

 is there a session.isInvalid() method ?
 
 If so ... :)
 
 D
 
 
 
 Michael Molloy wrote:
 
  I've got an application that builds menus when a user logs in and sticks the menus 
in an object which I then put inside the session. All subsequent jsps get their menu 
from that object in the session.
 
  However, when their session expires and they try to access a jsp, they get a 
NullPointerException, as expected.
 
  How can I catch that error and redirect them to the logon page? Or is their some 
other way to handle it? Is there a better way than putting some if else statements in 
the jsp to check the session for the menu object?
 
  Thanks
  --Michael
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread Christopher K. St. John

Michael Molloy wrote:
 
 ... if there is a setting for web.xml or something
 to foward all pages that throw exceptions to a certain
 url, that's what I'm looking for.
 

 In web.xml:

 error-page
exception-type MyException /exception-type
location /myexception.html /location
  /error-page

 the servlet spec[1] has a complete description in
section SRV.9.9.2.


[1] http://java.sun.com/products/servlet/download.html
 

-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread Michael Molloy

I will check it out. Thanks very much for the information.

--Michael

On Wed, 13 Feb 2002 10:57:09 -0600
Christopher K. St. John [EMAIL PROTECTED] wrote:

 Michael Molloy wrote:
  
  ... if there is a setting for web.xml or something
  to foward all pages that throw exceptions to a certain
  url, that's what I'm looking for.
  
 
  In web.xml:
 
  error-page
 exception-type MyException /exception-type
 location /myexception.html /location
   /error-page
 
  the servlet spec[1] has a complete description in
 section SRV.9.9.2.
 
 
 [1] http://java.sun.com/products/servlet/download.html
  
 
 -- 
 Christopher St. John [EMAIL PROTECTED]
 DistribuTopia http://www.distributopia.com
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread jeff . guttadauro


There is no session.isInvalid() method - that wouldn't make any sense anyway.
If you have an actual session to ask if it's valid or not, how could it ever
be invalid?  There is an isNew() method, and I have not used this, but from
reading the spec it doesn't sound like it will do the trick.

There is a way to define an errorPage, a page that your JSP will forward to if
it throws an Exception.  %@ page errorPage=relativeURL %  You'll have to
put this in each of your pages though, so it might not be what you're looking
for, although then all the logic to handle the exception would just be in the
errorPage.

You could also look into binding the session by creating an object that
implements HttpSessionBindingListener.  Then when the session expires, the
valueUnbound( event ) method will be called by the servlet engine.  You could
put code in that method to handle this case.

Hope this helps.
-Jeff



   

Michael

Molloy   To: Tomcat Users List 
[EMAIL PROTECTED]  
mmolloy@ncyccc:   

les.com Subject: Re: Redirect after session 
expires?  
   

02/13/02   

09:54 AM   

Please 

respond to 

Tomcat Users  

List  

   

   





Well, we're trying to keep as much logic out of the jsps as possible, so if
there is a setting for web.xml or something to foward all pages that throw
exceptions to a certain url, that's what I'm looking for.

I appreciate your suggestion, and if that's what we need to do, we'll do it,
but I'd like to know about any other possibilities, also.

Thanks
--Michael

On Wed, 13 Feb 2002 15:37:53 +
David Cassidy [EMAIL PROTECTED] wrote:

 is there a session.isInvalid() method ?

 If so ... :)

 D



 Michael Molloy wrote:

  I've got an application that builds menus when a user logs in and sticks
the menus in an object which I then put inside the session. All subsequent
jsps get their menu from that object in the session.
 
  However, when their session expires and they try to access a jsp, they get
a NullPointerException, as expected.
 
  How can I catch that error and redirect them to the logon page? Or is
their some other way to handle it? Is there a better way than putting some if
else statements in the jsp to check the session for the menu object?
 
  Thanks
  --Michael
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect after session expires?

2002-02-13 Thread jeff . guttadauro


Or you could just do that...  :/

Very cool!  Thanks for that nugget, Christopher.



   

Christopher   

K. St. John To: Tomcat Users List 
[EMAIL PROTECTED]
cks@distribucc:   

topia.com   Subject: Re: Redirect after session 
expires?  
   

02/13/02   

10:57 AM   

Please 

respond to 

Tomcat Users  

List  

   

   





Michael Molloy wrote:

 ... if there is a setting for web.xml or something
 to foward all pages that throw exceptions to a certain
 url, that's what I'm looking for.


 In web.xml:

 error-page
exception-type MyException /exception-type
location /myexception.html /location
  /error-page

 the servlet spec[1] has a complete description in
section SRV.9.9.2.


[1] http://java.sun.com/products/servlet/download.html


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Redirect after session expires?

2002-02-13 Thread Jim Urban

According to the servlet spec, when calling
HttpServletRequest.getSession(boolean) with a parameter of false will tell
you if the session is valid:  If create is false and the request has no
valid HttpSession, this method returns null.

So, one way of telling if a session is valid is:
HttpSession session = httpServletRequest.getSession(false);
if (session == null) {
invalid session code...
}

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 13, 2002 10:14 AM
 To: Tomcat Users List
 Subject: Re: Redirect after session expires?



 There is no session.isInvalid() method - that wouldn't make any
 sense anyway.
 If you have an actual session to ask if it's valid or not, how
 could it ever
 be invalid?  There is an isNew() method, and I have not used
 this, but from
 reading the spec it doesn't sound like it will do the trick.

 There is a way to define an errorPage, a page that your JSP will
 forward to if
 it throws an Exception.  %@ page errorPage=relativeURL %
 You'll have to
 put this in each of your pages though, so it might not be what
 you're looking
 for, although then all the logic to handle the exception would
 just be in the
 errorPage.

 You could also look into binding the session by creating an object that
 implements HttpSessionBindingListener.  Then when the session expires, the
 valueUnbound( event ) method will be called by the servlet
 engine.  You could
 put code in that method to handle this case.

 Hope this helps.
 -Jeff





 Michael

 Molloy   To: Tomcat Users
 List [EMAIL PROTECTED]
 mmolloy@ncyccc:

 les.com Subject: Re:
 Redirect after session expires?


 02/13/02

 09:54 AM

 Please

 respond to

 Tomcat Users

 List









 Well, we're trying to keep as much logic out of the jsps as
 possible, so if
 there is a setting for web.xml or something to foward all pages that throw
 exceptions to a certain url, that's what I'm looking for.

 I appreciate your suggestion, and if that's what we need to do,
 we'll do it,
 but I'd like to know about any other possibilities, also.

 Thanks
 --Michael

 On Wed, 13 Feb 2002 15:37:53 +
 David Cassidy [EMAIL PROTECTED] wrote:

  is there a session.isInvalid() method ?
 
  If so ... :)
 
  D
 
 
 
  Michael Molloy wrote:
 
   I've got an application that builds menus when a user logs in
 and sticks
 the menus in an object which I then put inside the session. All subsequent
 jsps get their menu from that object in the session.
  
   However, when their session expires and they try to access a
 jsp, they get
 a NullPointerException, as expected.
  
   How can I catch that error and redirect them to the logon page? Or is
 their some other way to handle it? Is there a better way than
 putting some if
 else statements in the jsp to check the session for the menu object?
  
   Thanks
   --Michael
  
   --
   To unsubscribe:   mailto:[EMAIL PROTECTED]
   For additional commands: mailto:[EMAIL PROTECTED]
   Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]






 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Redirect page after catching exception

2001-08-23 Thread Craig R. McClanahan



On Thu, 23 Aug 2001, Yuval wrote:

 Date: Thu, 23 Aug 2001 23:39:05 +0200
 From: Yuval [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 To: Tomcat-User (E-mail) [EMAIL PROTECTED]
 Subject: Redirect page after catching exception

 Hi,

 can someone help we with how to stop the servlet after catching exception
 and redirect the page to error page?


It's not clear exactly what you mean.

If your servlet *catches* an exception, then the error page mechanism
provided by the container does not get involved at all.  You can use the
usual technique (RequestDispatcher.forward()) to forward control to an
error reporting page if you want.

The error-page declaration in web.xml is only invoked when your servlet
or JSP page *throws* an uncaught exception.

 Regards,

 Yuval

Craig




RE: Redirect page after catching exception

2001-08-23 Thread Yuval

Can you please explain to me how to use RequestDispatcher.forward()

Regards,

Yuval
Domain The Net Technologies Ltd.
6 Weitzman Blvd.
Ramat-Hasharon
Israel 47211
Tel: 972-3-5474443
Fax: 972-3-5474446
www.DomainTheNet.com

This email message and any attachments hereto are intended only for use by
the addressee(s) named above, and may contain legally privileged and/or
confidential information. If you are not the intended addressee, you are
hereby kindly notified that any dissemination, distribution or copying of
this email and any attachments hereto is strictly prohibited. If you have
received this email in error, kindly delete it from your computer system,
and notify us at the telephone number or email address appearing above.
Thank you



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Craig R. McClanahan
Sent: Thursday, August 23, 2001 22:47
To: Tomcat-User (E-mail); [EMAIL PROTECTED]
Subject: Re: Redirect page after catching exception




On Thu, 23 Aug 2001, Yuval wrote:

 Date: Thu, 23 Aug 2001 23:39:05 +0200
 From: Yuval [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 To: Tomcat-User (E-mail) [EMAIL PROTECTED]
 Subject: Redirect page after catching exception

 Hi,

 can someone help we with how to stop the servlet after catching exception
 and redirect the page to error page?


It's not clear exactly what you mean.

If your servlet *catches* an exception, then the error page mechanism
provided by the container does not get involved at all.  You can use the
usual technique (RequestDispatcher.forward()) to forward control to an
error reporting page if you want.

The error-page declaration in web.xml is only invoked when your servlet
or JSP page *throws* an uncaught exception.

 Regards,

 Yuval

Craig





RE: Redirect System.setOut() to response.out

2001-04-02 Thread William Kaufman

 -Original Message-
 From: Mike Slinn [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, March 31, 2001 7:51 PM
 To: Tomcat Users
 Subject: Redirect System.setOut() to response.out
 
 
 Can anyone give me the magic incantation (if there is one) to redirect
 System.out to response.out?
 
 Something along the lines of:
 System.setOut([magic dust goes here] out);

By "response.out", you mean the ServletResponse's output?

Then, "magic dust" = "new java.io.PrintStream(response.getOutputStream())".

Note, though, that System.setOut() may be disallowed by the security
manager: you should try to avoid calling it, by using (and exposing) methods
which allow the caller to specify the output, wherever possible.

-- Bill K.



RE: Redirect question

2001-01-22 Thread David Oxley

Ok. I knew that I could do it with a cookie. Thanks anyway. But is there
anyway of putting onto the request and doing an HTTP POST much like a form
submit?

Dave.
[EMAIL PROTECTED]

-Original Message-
From: Andy Nuss [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2001 22:43
To: '[EMAIL PROTECTED]'
Subject: RE: Redirect question



1)original jsp

HttpSession session = req.getSession(false);
MyParams params = new MyParams("a", "b", "c");
String retrieveid = "QUICK_RETRIEVE" + "/myredirect.jsp" + new
Object().hashCode();
session.setAttribute(retrieveid, params);
Cookie ck = new Cookie("QUICK_RETRIEVE", retrieveid);
ck.setPath("/myredirect.jsp");
resp.addCookie(ck);
resp.sendRedirect("/myredirect.jsp");

2)  redirected jsp

HttpSession session = req.getSession(false);
Cookie[] cks = req.getCookies();
Cookie ck = findCookieByNamePath(cks, "QUICK_RETRIEVE",
"/myredirect.jsp");
MyParams params = (MyParams)session.getAttribute(ck.getValue());


-Original Message-
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 21, 2001 6:02 AM
To: [EMAIL PROTECTED]
Subject: Redirect question


When sending a HttpServletResponse resp.sendRedirect how can I specify
parameters without having them appear on the URL in the browser address bar?

Thanks.
Dave.
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Redirect question

2001-01-22 Thread Michael Wentzel

I don't know how the flow of your webapp is working in this
situation but if you put the following in the referrer to 
the first jsp or possibly on your first jsp and ACTION="redirect.jsp"
depending on you work flow:

FORM ... ACTION="page1.jsp"
INPUT TYPE="hidden" NAME="var1" VALUE="value1"
INPUT TYPE="hidden" NAME="var2" VALUE="value2"
INPUT TYPE="hidden" NAME="var3" VALUE="value3"
...
/FORM

The values will be in the request if you handle navigation
by submitting the form.

The only reason this would be programmatically better than the
previous solution is if it can not be assumed that the user
has cookies enabled or if cookies are not even an option per
project specs.


---
Michael Wentzel
Software Developer
A HREF="http://www.aswethink.com"Software As We Think/A
A HREF="mailto:[EMAIL PROTECTED]"Michael Wentzel/A

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Redirect question

2001-01-21 Thread Andy Nuss


1)original jsp

HttpSession session = req.getSession(false);
MyParams params = new MyParams("a", "b", "c");
String retrieveid = "QUICK_RETRIEVE" + "/myredirect.jsp" + new
Object().hashCode();
session.setAttribute(retrieveid, params);
Cookie ck = new Cookie("QUICK_RETRIEVE", retrieveid);
ck.setPath("/myredirect.jsp");
resp.addCookie(ck);
resp.sendRedirect("/myredirect.jsp");

2)  redirected jsp

HttpSession session = req.getSession(false);
Cookie[] cks = req.getCookies();
Cookie ck = findCookieByNamePath(cks, "QUICK_RETRIEVE",
"/myredirect.jsp");
MyParams params = (MyParams)session.getAttribute(ck.getValue());


-Original Message-
From: David Oxley [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 21, 2001 6:02 AM
To: [EMAIL PROTECTED]
Subject: Redirect question


When sending a HttpServletResponse resp.sendRedirect how can I specify
parameters without having them appear on the URL in the browser address bar?

Thanks.
Dave.
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: redirect to a static page from tomcat to apache

2001-01-03 Thread Boaz Shaham

It means that the client should look for the requested page in the alternate
location (url) given in the response ONLY for this request, i.e. next
requests should be for the original URL.

From the HTTP 1.1 spec:

10.3.8 307 Temporary Redirect

The requested resource resides temporarily under a different URI. Since the
redirection MAY be altered on occasion,
the client SHOULD continue to use the Request-URI for future requests. This
response is only cacheable if
indicated by a Cache-Control or Expires header field.
The temporary URI SHOULD be given by the Location field in the response.
Unless the request method was
HEAD, the entity of the response SHOULD contain a short hypertext note with
a hyperlink to the new URI(s) , since
many pre-HTTP/1.1 user agents do not understand the 307 status. Therefore,
the note SHOULD contain the
information necessary for a user to repeat the original request on the new
URI.
If the 307 status code is received in response to a request other than GET
or HEAD, the user agent MUST NOT
automatically redirect the request unless it can be confirmed by the user,
since this might change the conditions
under which the request was issued.


-Original Message-
From: Dario Novakovic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 02, 2001 18:06
To: [EMAIL PROTECTED]
Subject: Re: redirect to a static page from tomcat to apache


why does it say in api docs that sendRedirect() "Sends a temporary redirect
response"? what is temporary in this case?



- Original Message -
From: "Boaz Shaham" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, 02 January, 2001 08:53
Subject: RE: redirect to a static page from tomcat to apache


 how about

 // response is HttpServletResponse
 response.sendRedirect("/foo/x.html");



 -Original Message-
 From: Randy Paries [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 02, 2001 02:25
 To: [EMAIL PROTECTED]
 Subject: redirect to a static page from tomcat to apache


 Hello,

 Is there anyway to do a forward from a servlet in tomcat to a static page
 that apache only knows.
 ie.
 apache knows that /foo is /home/foo.

 but when the servlet executes and does the following(see snippet below),
 Tomcat does not know where /foo is mapped to. If I set up a context in
 server.xml it will work. But then for my app it gets more complicated ,
 because x.html is a frame that calls two cgi programs. And of course
tomcat
 doesn't know about these guys.

 So what are my options?

 IS there way to set up a cgi-bin directory under tomcat?

 Thanks

 From within a servlet.
 -
 String URL = "/foo/x.html";
 RequestDispatcher disp =
 getServletConfig().getServletContext().getRequestDispatcher(jspURL);
 disp.forward(req,res);
 -


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: redirect to a static page from tomcat to apache

2001-01-02 Thread Lacerda, Wellington (AFIS)

I'm not sure if it matters having Apache as webserver, but I believe you'll
have to use sendRedirect for this...essentially you are pointing to a
resource Tomcat can't locate inside the target context (because only Apache
knows about it). So I believe that's why you're getting this error message.

Of course paste the URL to the browser it will work, because Apache will be
serving it.

Wellington

-Original Message-
From:   Randy Paries [mailto:[EMAIL PROTECTED]]
Sent:   02 January 2001 04:37
To: COLE,GLENN (Non-HP-SantaClara,ex2)
Cc: [EMAIL PROTECTED]
Subject:RE: redirect to a static page from tomcat to
apache

Thats what I thought.

but when I call::

RequestDispatcher disp =

getServletConfig().getServletContext().getRequestDispatcher(URL);
and URL = http://www.mydomain.com/consultant/index.html

disp returns a null.

I can cut and paste the URL from the error message to the
browser and it
works ok.

Randy




-Original Message-
From: COLE,GLENN (Non-HP-SantaClara,ex2)
[mailto:[EMAIL PROTECTED]]
Sent: Monday, January 01, 2001 7:48 PM
To: '[EMAIL PROTECTED]'
Subject: RE: redirect to a static page from tomcat to apache


Hi, Randy --

Offhand, I'd suggest fully-qualifying the URL, e.g.,

   String URL = "http://localhost/foo/x.html";

My recollection (such as it is) is that Tomcat takes
/name as relative to the current webapp; I *think* that
fully-qualifying the URL will get around this.

--Glenn


-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 01, 2001 4:25 PM
To: [EMAIL PROTECTED]
Subject: redirect to a static page from tomcat to apache


Hello,

Is there anyway to do a forward from a servlet in tomcat to
a static page
that apache only knows.
ie.
apache knows that /foo is /home/foo.

but when the servlet executes and does the following(see
snippet below),
Tomcat does not know where /foo is mapped to. If I set up a
context in
server.xml it will work. But then for my app it gets more
complicated ,
because x.html is a frame that calls two cgi programs. And
of course tomcat
doesn't know about these guys.

So what are my options?

IS there way to set up a cgi-bin directory under tomcat?

Thanks

From within a servlet.

-
String URL = "/foo/x.html";
RequestDispatcher disp =

getServletConfig().getServletContext().getRequestDispatcher(jspURL);
disp.forward(req,res);

-



-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, email:
[EMAIL PROTECTED]



-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, email:
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: redirect to a static page from tomcat to apache

2001-01-02 Thread Boaz Shaham

how about

// response is HttpServletResponse
response.sendRedirect("/foo/x.html");



-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 02, 2001 02:25
To: [EMAIL PROTECTED]
Subject: redirect to a static page from tomcat to apache


Hello,

Is there anyway to do a forward from a servlet in tomcat to a static page
that apache only knows.
ie.
apache knows that /foo is /home/foo.

but when the servlet executes and does the following(see snippet below),
Tomcat does not know where /foo is mapped to. If I set up a context in
server.xml it will work. But then for my app it gets more complicated ,
because x.html is a frame that calls two cgi programs. And of course tomcat
doesn't know about these guys.

So what are my options?

IS there way to set up a cgi-bin directory under tomcat?

Thanks

From within a servlet.
-
String URL = "/foo/x.html";
RequestDispatcher disp =
getServletConfig().getServletContext().getRequestDispatcher(jspURL);
disp.forward(req,res);
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: redirect to a static page from tomcat to apache

2001-01-02 Thread Dario Novakovic

why does it say in api docs that sendRedirect() "Sends a temporary redirect
response"? what is temporary in this case?



- Original Message -
From: "Boaz Shaham" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, 02 January, 2001 08:53
Subject: RE: redirect to a static page from tomcat to apache


 how about

 // response is HttpServletResponse
 response.sendRedirect("/foo/x.html");



 -Original Message-
 From: Randy Paries [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 02, 2001 02:25
 To: [EMAIL PROTECTED]
 Subject: redirect to a static page from tomcat to apache


 Hello,

 Is there anyway to do a forward from a servlet in tomcat to a static page
 that apache only knows.
 ie.
 apache knows that /foo is /home/foo.

 but when the servlet executes and does the following(see snippet below),
 Tomcat does not know where /foo is mapped to. If I set up a context in
 server.xml it will work. But then for my app it gets more complicated ,
 because x.html is a frame that calls two cgi programs. And of course
tomcat
 doesn't know about these guys.

 So what are my options?

 IS there way to set up a cgi-bin directory under tomcat?

 Thanks

 From within a servlet.
 -
 String URL = "/foo/x.html";
 RequestDispatcher disp =
 getServletConfig().getServletContext().getRequestDispatcher(jspURL);
 disp.forward(req,res);
 -


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: redirect to a static page from tomcat to apache

2001-01-01 Thread Randy Paries

Thats what I thought.

but when I call::

RequestDispatcher disp =
getServletConfig().getServletContext().getRequestDispatcher(URL);
and URL = http://www.mydomain.com/consultant/index.html

disp returns a null.

I can cut and paste the URL from the error message to the browser and it
works ok.

Randy




-Original Message-
From: COLE,GLENN (Non-HP-SantaClara,ex2) [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 01, 2001 7:48 PM
To: '[EMAIL PROTECTED]'
Subject: RE: redirect to a static page from tomcat to apache


Hi, Randy --

Offhand, I'd suggest fully-qualifying the URL, e.g.,

   String URL = "http://localhost/foo/x.html";

My recollection (such as it is) is that Tomcat takes
/name as relative to the current webapp; I *think* that
fully-qualifying the URL will get around this.

--Glenn


-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 01, 2001 4:25 PM
To: [EMAIL PROTECTED]
Subject: redirect to a static page from tomcat to apache


Hello,

Is there anyway to do a forward from a servlet in tomcat to a static page
that apache only knows.
ie.
apache knows that /foo is /home/foo.

but when the servlet executes and does the following(see snippet below),
Tomcat does not know where /foo is mapped to. If I set up a context in
server.xml it will work. But then for my app it gets more complicated ,
because x.html is a frame that calls two cgi programs. And of course tomcat
doesn't know about these guys.

So what are my options?

IS there way to set up a cgi-bin directory under tomcat?

Thanks

From within a servlet.
-
String URL = "/foo/x.html";
RequestDispatcher disp =
getServletConfig().getServletContext().getRequestDispatcher(jspURL);
disp.forward(req,res);
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Redirect Tomcat System.out/System.err to logfile?

2000-11-01 Thread Amandeep Jawa

here is what i use:

/usr/local/jakarta-tomcat/bin/startup.sh tomcat.log 21



- Original Message - 
From: "Jason Pell" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 01, 2000 7:25 PM
Subject: Redirect Tomcat System.out/System.err to logfile?


 Hello,
 
 Is there a way I can redirect System.out/System.err to logfile.
 
 Someone said that these go to the console where tomcat was started, but
 I use the "daemon tomcat start" command, so I am not sure that there is
 any
 output generated at all in daemon mode.
 
 I would therefore like to redirect to logfile instead.
 
 Thanks
 Jason
 
 --
 Jason Pell
 Senior Analyst/Programmer
 Deakin Software Services Pty Ltd
 12 Gheringhap St, Geelong Victoria 3220 Australia
 Phone: 03 5227 8858 International: +61 3 5227 8858
 Fax: 03 5227 8907 International: +61 3 5227 8907
 E-mail [EMAIL PROTECTED]
 http://www.dssonline.com.au
 Customer Support Hotline: 1800 620 497
 
 "Callista - the brightest solution in university management"
 
 ---
 Important Notice: The contents of this email transmission,
 including attachments, may be privileged and confidential.
 Any unauthorised use of the contents is expressly prohibited.
 If you have received this transmission in error, please advise
 the sender by return email or telephone immediately and
 destroy all versions.
 ---