You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by bj...@accenture.com on 2007/11/23 10:39:14 UTC

Problem with redirection

We have a weird problem with Tomcat.  We have an application that is accessible on 2 URL's.  Let's say www.domain.com/subdomain/applicationname and www.domain.com/othername.  Configuration of Tomcat looks like this:

 

<Context path="/subdomain/applicationname " docBase="applicationFolder" crossContext="false" debug="0" reloadable="true" trusted="false"/>

<Context path="/othername" docBase="applicationFolder" crossContext="false" debug="0" reloadable="true" trusted="false"/> 

 

So far so good, these things work.  The problem is, when we perform a redirect in our application, there's always a :80 added to the url.  For instance, we use SAML to authenticate people and Acegi to parse the reponse.  When everything is fine, the user is redirected to the page he has requested.  When the response is parsed, Acegi performs a redirect to the page, but then www.domain.com:80 <http://www.domain.com/>  pops up. 

 

Is there a way to alter the configuration of Tomcat, so it doesn't add the port 80.  At least, we think it's Tomcat who adds that port number, but we're not very sure.

 

Thanks for the help guys.



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

RE: Problem with redirection

Posted by bj...@accenture.com.
What do you mean by that?  I have a property, which is just the name of a JSP, but for some reason, port 80 is added to the complete URL.  We don't know why, it's probably a Tomcat error, but the question is how to solve this.  

It's not a software or programmatic error, because I created a webapp with 2 simpel JSP's, where the first JSP redirects to a second (<% response.sendRedirect("second.jsp"); %>) and the port is added to the URL.  So it has nothing to do with Spring or any other framework (unfortunately).  

Björn De Bakker 

Mobile: +32 (0)499 67 37 22
Email: bjorn.de.bakker@accenture.com

Accenture Technology Solutions 
Medialaan 38
B-1800 Vilvoorde

P Before printing, think about the environment

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Friday, 23 November, 2007 17:55
To: Tomcat Users List
Subject: RE: Problem with redirection


Bjorn-
 
Do you have any Filters defined such as FilterChainProxy configured in applicationContext-acegi-security.xml...?There should be a property with a name which you should redirect to which will invoke the value (usually a jsp) which is assigned to the property


Martin


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problem with redirection

Posted by Martin Gainty <mg...@hotmail.com>.
Bjorn-
 
Do you have any Filters defined such as FilterChainProxy configured in applicationContext-acegi-security.xml...?There should be a property with a name which you should redirect to which will invoke the value (usually a jsp) which is assigned to the propertyMartin______________________________________________Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.> Subject: RE: Problem with redirection> Date: Fri, 23 Nov 2007 16:34:45 +0100> From: bjorn.de.bakker@accenture.com> To: users@tomcat.apache.org> > Version Tomcat: 5.5> > What part of the configuration do you want to see? The complete file, or any specific part?> > The version of Acegi we use is 1.0.0 and for Spring it is 2.0.1.> > There's an Iplanet in front of it, but I don't know if that's similar (I don't know much about network configuration :p).> > I just created a small application, with 2 JSP pages. 1 redirects to the other, and the port 80 pops up.> > This is the code in the JSP:> <%> response.sendRedirect("redirect.jsp");> %>> > I hope this helps.> > > -----Original Message-----> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] > Sent: Friday, 23 November, 2007 13:21> To: Tomcat Users List> Subject: Re: Problem with redirection> > What is your configuration?> What version of Tomcat?!> Is there Apache HTTPD in front of it?> What versions of Acegi, Spring do you use?> > Can you reproduce your problem with a simple example? E.g. explicitly> sending the redirect, using response.sendRedirect().> > Please look at this message> http://www.nabble.com/problem-with-https-and-apache%2Bhttpd%2Btomcat-tf4474321.html#a12756933> > Is it similar to your case?> > > > > Is there a way to alter the configuration of Tomcat, so it doesn't add the port 80. At least, we think it's Tomcat who adds that port number, but we're not very sure.> >> > ---------------------------------------------------------------------> To start a new topic, e-mail: users@tomcat.apache.org> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org> For additional commands, e-mail: users-help@tomcat.apache.org> > > > This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.> > ---------------------------------------------------------------------> To start a new topic, e-mail: users@tomcat.apache.org> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org> For additional commands, e-mail: users-help@tomcat.apache.org> 
_________________________________________________________________
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_102007

RE: Problem with redirection

Posted by bj...@accenture.com.
Version Tomcat: 5.5

What part of the configuration do you want to see?  The complete file, or any specific part?

The version of Acegi we use is 1.0.0 and for Spring it is 2.0.1.

There's an Iplanet in front of it, but I don't know if that's similar (I don't know much about network configuration :p).

I just created a small application, with 2 JSP pages.  1 redirects to the other, and the port 80 pops up.

This is the code in the JSP:
<%
	response.sendRedirect("redirect.jsp");
%>

I hope this helps.


-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] 
Sent: Friday, 23 November, 2007 13:21
To: Tomcat Users List
Subject: Re: Problem with redirection

What is your configuration?
What version of Tomcat?!
Is there Apache HTTPD in front of it?
What versions of Acegi, Spring do you use?

Can you reproduce your problem with a simple example? E.g. explicitly
sending the redirect, using response.sendRedirect().

Please look at this message
http://www.nabble.com/problem-with-https-and-apache%2Bhttpd%2Btomcat-tf4474321.html#a12756933

Is it similar to your case?



> Is there a way to alter the configuration of Tomcat, so it doesn't add the port 80.  At least, we think it's Tomcat who adds that port number, but we're not very sure.
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with redirection

Posted by Konstantin Kolinko <kn...@gmail.com>.
What is your configuration?
What version of Tomcat?!
Is there Apache HTTPD in front of it?
What versions of Acegi, Spring do you use?

Can you reproduce your problem with a simple example? E.g. explicitly
sending the redirect, using response.sendRedirect().

Please look at this message
http://www.nabble.com/problem-with-https-and-apache%2Bhttpd%2Btomcat-tf4474321.html#a12756933

Is it similar to your case?



> Is there a way to alter the configuration of Tomcat, so it doesn't add the port 80.  At least, we think it's Tomcat who adds that port number, but we're not very sure.
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org