You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Dan Milstein <da...@shore.net> on 2001/01/20 01:18:08 UTC

Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Filip,

Which connection protocol are you using?  ajp12?  ajp13?  jserv?

-Dan

Filip Hanik wrote:
> 
> neither of the above functions work properly when I am using a non standard
> port for https (ex: 445 instead of 443)
> 
> Apache 1.3.14
> Tomcat 3.2.1 + mod_jk.so
> Open SSL 0.9.6
> mod_ssl 2.7.?-1.3.14
> 
> any idea why this is happening?
> 
> Filip
> ~
> Namaste - I bow to the divine in you.
> ~
> Filip Hanik
> Technical Architect
> filip@filip.net

-- 

Dan Milstein // danmil@shore.net

Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Filip Hanik wrote:
> 
> Even in Ajp13 there is still a bug.
> 
> In the API docs for javax.servlet.ServletRequest.getRequestDispatcher it
> says
> "The pathname specified may be relative, although it cannot extend outside
> the current servlet context. If the path begins with a "/" it is interpreted
> as relative to the current context root. This method returns null if the
> servlet container cannot return a RequestDispatcher."
> 
> but it turns out that I can't say
> getRequestDispatcher("myhtml.html"); because it throws an array index out of
> bounds exception.
> 
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1503)
>         at org.apache.tomcat.util.FileUtil.catPath(FileUtil.java:109)
> [...]
> getRequestDispatcher("/myhtml.html");  works fine however.
> 
> should I file the bug report, if so where?

Yes, at this URL: <http://jakarta.apache.org/site/bugs.html>

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Posted by Filip Hanik <fi...@filip.net>.
Even in Ajp13 there is still a bug.

In the API docs for javax.servlet.ServletRequest.getRequestDispatcher it
says
"The pathname specified may be relative, although it cannot extend outside
the current servlet context. If the path begins with a "/" it is interpreted
as relative to the current context root. This method returns null if the
servlet container cannot return a RequestDispatcher."

but it turns out that I can't say
getRequestDispatcher("myhtml.html"); because it throws an array index out of
bounds exception.

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1503)
        at org.apache.tomcat.util.FileUtil.catPath(FileUtil.java:109)
        at
org.apache.tomcat.facade.HttpServletRequestFacade.getRequestDispatcher(HttpS
ervletRequestFacade.java:322)
        at com.ratexchange.presentation.FilipTest.doGet(FilipTest.java:37)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372

getRequestDispatcher("/myhtml.html");  works fine however.

should I file the bug report, if so where?

Filip

~
Namaste - I bow to the divine in you.
~
Filip Hanik
Technical Architect
filip@filip.net

----- Original Message -----
From: "Filip Hanik" <fi...@filip.net>
To: <to...@jakarta.apache.org>; <da...@shore.net>
Sent: Friday, January 19, 2001 4:58 PM
Subject: Re: sendRedirect, include and forward don't work with mod_jk and
non standard ssl port


Good catch,
it works fine with the Ajp13 protocol.
so now we know where the problem is. thanks a lot for your help
Filip

~
Namaste - I bow to the divine in you.
~
Filip Hanik
Technical Architect
filip@filip.net

----- Original Message -----
From: "Dan Milstein" <da...@shore.net>
To: <to...@jakarta.apache.org>
Sent: Friday, January 19, 2001 4:46 PM
Subject: Re: sendRedirect, include and forward don't work with mod_jk and
non standard ssl port


I don't know if that will fix the problem, but if you could try that (i.e.
using ajp13 and seeing if you still have this problem), that would
definitely help me narrow this down (and since there seem to be some basic
redirect problems in TC 3.2 / mod_jk, that would be very, very helpful).

Thanks.

-Dan

p.s. What browser are you using?

Filip Hanik wrote:
>
> ajp12
>
> should I try ajp13?
>
> Filip
>
> ~
> Namaste - I bow to the divine in you.
> ~
> Filip Hanik
> Technical Architect
> filip@filip.net
>
> ----- Original Message -----
> From: "Dan Milstein" <da...@shore.net>
> To: <to...@jakarta.apache.org>
> Sent: Friday, January 19, 2001 4:18 PM
> Subject: Re: sendRedirect, include and forward don't work with mod_jk and
> non standard ssl port
>
> Filip,
>
> Which connection protocol are you using?  ajp12?  ajp13?  jserv?
>
> -Dan
>

--

Dan Milstein // danmil@shore.net

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Posted by Filip Hanik <fi...@filip.net>.
Good catch,
it works fine with the Ajp13 protocol.
so now we know where the problem is. thanks a lot for your help
Filip

~
Namaste - I bow to the divine in you.
~
Filip Hanik
Technical Architect
filip@filip.net

----- Original Message -----
From: "Dan Milstein" <da...@shore.net>
To: <to...@jakarta.apache.org>
Sent: Friday, January 19, 2001 4:46 PM
Subject: Re: sendRedirect, include and forward don't work with mod_jk and
non standard ssl port


I don't know if that will fix the problem, but if you could try that (i.e.
using ajp13 and seeing if you still have this problem), that would
definitely help me narrow this down (and since there seem to be some basic
redirect problems in TC 3.2 / mod_jk, that would be very, very helpful).

Thanks.

-Dan

p.s. What browser are you using?

Filip Hanik wrote:
>
> ajp12
>
> should I try ajp13?
>
> Filip
>
> ~
> Namaste - I bow to the divine in you.
> ~
> Filip Hanik
> Technical Architect
> filip@filip.net
>
> ----- Original Message -----
> From: "Dan Milstein" <da...@shore.net>
> To: <to...@jakarta.apache.org>
> Sent: Friday, January 19, 2001 4:18 PM
> Subject: Re: sendRedirect, include and forward don't work with mod_jk and
> non standard ssl port
>
> Filip,
>
> Which connection protocol are you using?  ajp12?  ajp13?  jserv?
>
> -Dan
>

--

Dan Milstein // danmil@shore.net

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Posted by Dan Milstein <da...@shore.net>.
I don't know if that will fix the problem, but if you could try that (i.e. using ajp13 and seeing if you still have this problem), that would definitely help me narrow this down (and since there seem to be some basic redirect problems in TC 3.2 / mod_jk, that would be very, very helpful).

Thanks.

-Dan

p.s. What browser are you using?

Filip Hanik wrote:
> 
> ajp12
> 
> should I try ajp13?
> 
> Filip
> 
> ~
> Namaste - I bow to the divine in you.
> ~
> Filip Hanik
> Technical Architect
> filip@filip.net
> 
> ----- Original Message -----
> From: "Dan Milstein" <da...@shore.net>
> To: <to...@jakarta.apache.org>
> Sent: Friday, January 19, 2001 4:18 PM
> Subject: Re: sendRedirect, include and forward don't work with mod_jk and
> non standard ssl port
> 
> Filip,
> 
> Which connection protocol are you using?  ajp12?  ajp13?  jserv?
> 
> -Dan
> 

-- 

Dan Milstein // danmil@shore.net

Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Posted by Filip Hanik <fi...@filip.net>.
ajp12

should I try ajp13?

Filip

~
Namaste - I bow to the divine in you.
~
Filip Hanik
Technical Architect
filip@filip.net

----- Original Message -----
From: "Dan Milstein" <da...@shore.net>
To: <to...@jakarta.apache.org>
Sent: Friday, January 19, 2001 4:18 PM
Subject: Re: sendRedirect, include and forward don't work with mod_jk and
non standard ssl port


Filip,

Which connection protocol are you using?  ajp12?  ajp13?  jserv?

-Dan

Filip Hanik wrote:
>
> neither of the above functions work properly when I am using a non
standard
> port for https (ex: 445 instead of 443)
>
> Apache 1.3.14
> Tomcat 3.2.1 + mod_jk.so
> Open SSL 0.9.6
> mod_ssl 2.7.?-1.3.14
>
> any idea why this is happening?
>
> Filip
> ~
> Namaste - I bow to the divine in you.
> ~
> Filip Hanik
> Technical Architect
> filip@filip.net

--

Dan Milstein // danmil@shore.net

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Re: sendRedirect, include and forward don't work with mod_jk and non standard ssl port

Posted by Filip Hanik <fi...@filip.net>.
this is what happens, the sendRedirect or include or forward switches the
url from saying https to say http even though the port is http

/Filip

Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.


Hint: https://rpit.ratexchange.net:9701/


----------------------------------------------------------------------------
----

Apache/1.3.14 Server at rpit.ratexchange.net Port 9701
~
Namaste - I bow to the divine in you.
~
Filip Hanik
Technical Architect
filip@filip.net

----- Original Message -----
From: "Dan Milstein" <da...@shore.net>
To: <to...@jakarta.apache.org>
Sent: Friday, January 19, 2001 4:18 PM
Subject: Re: sendRedirect, include and forward don't work with mod_jk and
non standard ssl port


Filip,

Which connection protocol are you using?  ajp12?  ajp13?  jserv?

-Dan

Filip Hanik wrote:
>
> neither of the above functions work properly when I am using a non
standard
> port for https (ex: 445 instead of 443)
>
> Apache 1.3.14
> Tomcat 3.2.1 + mod_jk.so
> Open SSL 0.9.6
> mod_ssl 2.7.?-1.3.14
>
> any idea why this is happening?
>
> Filip
> ~
> Namaste - I bow to the divine in you.
> ~
> Filip Hanik
> Technical Architect
> filip@filip.net

--

Dan Milstein // danmil@shore.net

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org