Re: response.sendRedirect()

2004-10-07 Thread Pablo Carretero Sánchez
Sorry, I did more test about the problem. I have one JSP(jspa) and (jspb) from jsp I do an include of jspb and from jspb I have a sendRedirect(www.google.com). If I invoke to http:///../jspa.jsp it doesn't work, but If I invoke directly to http://..//jspb.jsp It works ok. best

Re: response.sendRedirect()

2004-10-07 Thread Ben Souther
Are you getting any error messages in your log files? In your browser window? It sounds like your trying to call sendRedirect after you've already started sending output to the browser. Try moving the include to the very top of the jspa page. On Thu, 2004-10-07 at 03:04, Pablo Carretero Snchez

Re: response.sendRedirect()

2004-10-06 Thread QM
On Wed, Oct 06, 2004 at 04:38:54PM +0200, Pablo Carretero S?nchez wrote: : I have a urgent problem response.sendRedirect() in Tomcat 5.0.27. : : It doesn't work in my appl. What, specifically, doesn't work? Did this same code work in a previous version of Tomcat 5.0.x? etc, etc. We're all

Re: response.sendRedirect()

2004-10-06 Thread Pablo Carretero Sánchez
Hi, I don't test in other Tomcat version. I'm trying a sendRedirect() in one JSP. And it doesn't work. The code is: response.sendRediredt(/jknopkn/prueba.jsp); QM ([EMAIL PROTECTED]) escribió: On Wed, Oct 06, 2004 at 04:38:54PM +0200, Pablo Carretero S?nchez wrote: : I have a urgent problem

RE: response.sendRedirect()

2004-10-06 Thread Dale, Matt
example below. Ta Matt -Original Message- From: Pablo Carretero Sánchez [mailto:[EMAIL PROTECTED] Sent: 06 October 2004 16:11 To: Tomcat Users List Subject: Re: response.sendRedirect() Hi, I don't test in other Tomcat version. I'm trying a sendRedirect() in one JSP. And it doesn't work

RE: response.sendRedirect()

2004-10-06 Thread Filip Hanik \(lists\)
works for me -Original Message- From: Pablo Carretero Sánchez [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 9:39 AM To: [EMAIL PROTECTED] Subject: response.sendRedirect() Hi, I have a urgent problem response.sendRedirect() in Tomcat 5.0.27. It doesn't work in my appl.

Re: response.sendRedirect()

2004-10-06 Thread Ben Souther
Without seeing the rest of your code, I'll guess that the problem is that you've started the relative link with a /. Try without it. If you have to back up a directory use ../jknopkn/prueba.jsp. On Wed, 2004-10-06 at 11:11, Pablo Carretero Snchez wrote: Hi, I don't test in other Tomcat

Re: response.sendredirect failig from an included .jsp

2004-08-04 Thread Jon Beyer
Tim, Thanks for the info. The redirect that I'm trying to achieve is actually internal to my site. So I started looking at requestdispatcher.forward( ), but it appears to me that you have to simply pass the same 'request' and 'response' variables into it. I need to be able to clear the

RE: response.sendredirect failig from an included .jsp

2004-08-04 Thread Shapira, Yoav
Users List Subject: Re: response.sendredirect failig from an included .jsp Tim, Thanks for the info. The redirect that I'm trying to achieve is actually internal to my site. So I started looking at requestdispatcher.forward( ), but it appears to me that you have to simply pass the same 'request

Re: response.sendredirect failig from an included .jsp

2004-08-03 Thread Tim Funk
Yes it should be failing. You cannot set headers or issue redirects from an include. (Its a rule in the spec) -Tim Jon Beyer wrote: The code 'response.sendRedirect( http://www.yahoo.com; )' fails when the containing jsp is included from another jsp. Should this be failing? What am I doing

Re: response.sendRedirect problem in Tomcat 5.0.18

2004-02-01 Thread Ben Souther
? Thanks for your time, Regards Anthony From: Ben Souther [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: response.sendRedirect problem in Tomcat 5.0.18 Date: Sat, 31 Jan 2004 23:53:41 -0500 On Saturday 31 January 2004 11:32 pm, you

Re: response.sendRedirect problem in Tomcat 5.0.18

2004-01-31 Thread Ben Souther
On Saturday 31 January 2004 11:32 pm, you wrote: at org.apache.jsp.product_jsp._jspService(product_jsp.java:283) If you go into your work directory, and look at product_jsp.java line 283, you will see exactly what's causing the problem. Without seeing your code, I can't be sure what the

RE: response.sendRedirect() finite loop?!

2003-12-03 Thread Stuart Stephen
Hi, On further investigation it would appear that this is not a Tomcat issue. It seems to be something to do with mod_jk. When a response.sendRedirect occurs it does not apply it properly. Or at least something is not executing properly. The setup we have is Apache 2.0.48, Tomcat 4.1.29, and

RE: response.sendRedirect() finite loop?!

2003-12-03 Thread Shapira, Yoav
, December 03, 2003 7:37 AM To: Tomcat Users List Subject: RE: response.sendRedirect() finite loop?! Hi, On further investigation it would appear that this is not a Tomcat issue. It seems to be something to do with mod_jk. When a response.sendRedirect occurs it does not apply it properly. Or at least

RE: response.sendRedirect() finite loop?!

2003-12-03 Thread Jeff Tulley
intelligently. If you don't need Apache, don't use it ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Stuart Stephen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 7:37 AM To: Tomcat Users List Subject: RE: response.sendRedirect() finite loop?! Hi, On further

RE: response.sendRedirect() finite loop?!

2003-12-03 Thread srevilak
On further investigation it would appear that this is not a Tomcat issue. It seems to be something to do with mod_jk. When a response.sendRedirect occurs it does not apply it properly. Or at least something is not executing properly. The setup we have is Apache 2.0.48, Tomcat 4.1.29, and

RE: response.sendRedirect()

2003-11-07 Thread Anton Modaresi
you do not lose your session, but you create a new request. /anton -Original Message- From: Duncan [mailto:[EMAIL PROTECTED] Sent: den 7 november 2003 17:36 To: Tomcat User List Subject: response.sendRedirect() Is it normal to loose your session when using the response.sendRedirect()

Re: response.sendRedirect()

2003-11-07 Thread Jean-Francois Arcand
Duncan wrote: Is it normal to loose your session when using the response.sendRedirect() command? If so is there a way to redirect without loosing the session? Yes, do a RequestDispatcher.forward(...) instead. -- Jeanfrancois Cheers, Duncan. Decker Telecom Ltd

Re: response.sendRedirect()

2003-11-07 Thread Duncan
Oops. Just realised that my app was switching between contexts on my server, which is why I was loosing session info. Thanks for the replies thought. - Duncan. Jean-Francois Arcand wrote: Duncan wrote: Is it normal to loose your session when using the response.sendRedirect() command? If

Re: response.sendRedirect()

2003-11-07 Thread Rodrigo Ruiz
You should only loose your session if session cookies support is disabled, and - the redirected URL has not been rewritten to add the session id, or - you redirect to another context / server in the second case the passed session id will be invalid, or ignored, depending on the case.

Re: response.sendRedirect()

2003-11-07 Thread Ben Souther
Are you redirecting from an http to an https url or vice versa? Are you redirecting to a different domain? On Friday 07 November 2003 11:35 am, Duncan wrote: Is it normal to loose your session when using the response.sendRedirect() command? If so is there a way to redirect without loosing

Re: response.sendRedirect

2003-09-05 Thread Christopher Williams
Say you're accessing pages on localhost, so your URLs take the form http://localhost:8080/war-file/jsp-file then the servlet container root is http://localhost:8080/ and a redirect to /another-war-file/another.jsp would be a redirect to: http://localhost:8080/another-war-file/another.jsp

Re: response.sendRedirect

2003-09-05 Thread Ben Souther
The easiest way to understand this is to think about how a browser sees a relative link. Browsers don't know that they're dealing with a servlet app. A sendRedirect simply puts the following header in the response: Location: url Let's take the following url:

RE: response.sendRedirect

2003-09-05 Thread Allen Hadden
: Re: response.sendRedirect Say you're accessing pages on localhost, so your URLs take the form http://localhost:8080/war-file/jsp-file then the servlet container root is http://localhost:8080/ and a redirect to /another-war-file/another.jsp would be a redirect to: http

Re: response.sendRedirect

2003-09-05 Thread Ben Souther
The one thing you want to watch out for with relative redirects is that they're converted by the servlet container to absolute URLs (this is in the servlet spec). This is, by the letter of the HTTP spec, the correct thing to do. Unfortunately, it can cause problems in deployments where an

Re: response.sendRedirect() and the servlet path?

2003-05-30 Thread Bill Barker
My reading of section 5.3 of the servlet-spec (version=2.3), says that you are wrong. Paths to sendRedirect are normal URL patterns, and are *not* based on the calling Context. joe user [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, if I have a context path such as /mycontext and

RE: response.sendRedirect( .. )

2003-03-05 Thread Ralph Einfeldt
PROTECTED] Sent: Wednesday, March 05, 2003 12:49 AM To: Tomcat Users List Subject: Re: response.sendRedirect( .. ) Does anybody know the reason for this limitation? Does anybody have a better way to accomplish what I'm describing

Re: response.sendRedirect( .. )

2003-03-05 Thread Geoff Coffey
After a redirect the servlet that issues the redirect will continue to run unless you stop the processing with a return statement directly after the redirect. Now consider this example: [...] This will stop Servlet B from processing doMoreOtherThings() after the redirect, but Servlet A will

Re: response.sendRedirect( .. )

2003-03-05 Thread Tim Funk
Section 4.4 of the Jsp spec: An included page only has access to the JspWriter object and it cannot set headers. This precludes invoking methods like setCookie(). Attempts to invoke these methods will be ignored. The constraint is equivalent to the one imposed on the include() method of the

Re: response.sendRedirect( .. )

2003-03-05 Thread Geoff Coffey
On Wednesday, March 5, 2003, at 08:32 AM, Tim Funk wrote: I paraphrase as its nice to present some body content in your page since browsers/agents do have the option of displaying/parsing the body for some context before following the redirect. I stand corrected on that point, although I've

Re: response.sendRedirect( .. )

2003-03-05 Thread Erik Price
Geoff Coffey wrote: On Wednesday, March 5, 2003, at 08:32 AM, Tim Funk wrote: I paraphrase as its nice to present some body content in your page since browsers/agents do have the option of displaying/parsing the body for some context before following the redirect. I stand corrected on that

Re: response.sendRedirect( .. )

2003-03-05 Thread Erik Price
Geoff Coffey wrote: It seems like we need our authentication check and redirect (or forward) on the content page itself and not in an include, so Muffi created a taglib to encapsulate this check and that seems to be working. Is this a typical solution? It seems like a frustrating restriction

RE: response.sendRedirect( .. )

2003-03-05 Thread Mike Jackson
] -Original Message- From: Geoff Coffey [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 7:39 AM To: Tomcat Users List Subject: Re: response.sendRedirect( .. ) On Wednesday, March 5, 2003, at 08:32 AM, Tim Funk wrote: I paraphrase as its nice to present some body content

Re: response.sendRedirect( .. )

2003-03-05 Thread Geoff Coffey
On Wednesday, March 5, 2003, at 09:41 AM, Mike Jackson wrote: I have 3 machines that I support with broken browsers that don't follow redirects immediately. In fact if the page includes any content, any at all, the ignore the redirect. I'm not 100% sure, but I even thing they ignore meta tag

Re: response.sendRedirect( ); question

2003-03-04 Thread Erik Price
Mufaddal Khumri wrote: Now if the USER_AUTHORIZED attribute is not set, it will enter the if block and get redirected to the login.jsp page. The browser shows me the content of the body page after the if block instead. Does after getting redirected the call returns to this page and

Re: response.sendRedirect( ); question

2003-03-04 Thread Mufaddal Khumri
Adding a return does not work. Infact I tried to add this to the top of my page %@ page buffer=32KB autoFlush=true % This throws the following error: 2003-03-04 14:19:07 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException:

Re: response.sendRedirect( ); question

2003-03-04 Thread Erik Price
Mufaddal Khumri wrote: Adding a return does not work. Well, it was worth a try. Sorry it didn't work out. My own approach (modeled after the conventional wisdom tossed about on this list and in some tutorials I have read) is to refrain from using decision logic in JSPs wherever possible.

Re: response.sendRedirect( .. )

2003-03-04 Thread Tim Funk
If this page is being called via a jsp:include - your out of luck. You cannot perform a sendRedirect() inside of an include. It's not tomcat's fault - it specified by the JSP spec. -Tim Mufaddal Khumri wrote: I have a .jsp page which has the following contents: /

Re: response.sendRedirect( .. )

2003-03-04 Thread Mufaddal Khumri
Yes This is used from within an include. so how would I redirect ? Thanks. On Wednesday, March 5, 2003, at 03:20 AM, Tim Funk wrote: If this page is being called via a jsp:include - your out of luck. You cannot perform a sendRedirect() inside of an include. It's not tomcat's fault - it

Re: response.sendRedirect( .. )

2003-03-04 Thread Tim Funk
You can do a compile time include instead of a run-time include. -Tim Mufaddal Khumri wrote: Yes This is used from within an include. so how would I redirect ? Thanks. On Wednesday, March 5, 2003, at 03:20 AM, Tim Funk wrote: If this page is being called via a jsp:include - your out of

Re: response.sendRedirect( .. )

2003-03-04 Thread Geoff Coffey
You can do a compile time include instead of a run-time include. Tim: We wanted to avoid that because we're including quite a lot of stuff, and it is being included on every page. Naively, I felt that duplicating all that header and footer logic and HTML in every generated servlet would be

Re: response.sendRedirect( .. )

2003-03-04 Thread Tim Funk
(Sorry for the ramblings ...) Yes - creating a taglib is much, much better than a compile time include. My only reason of recommendation for a compile time include was because that was the easiest and quickest fix - but also the worst. There are a few ways to perform authentication. Each has

Re: response.sendRedirect() - is this allowed?

2003-02-07 Thread Neale
if ( POST.equalsIgnoreCase( request.getMethod() ) ) { StringBuffer buf = new StringBuffer(); buf.append( request.getRequestURI() ); buf.append( ? ); buf.append( request.getQueryString() ); response.sendRedirect( buf.toString() ); return; } You need to be careful

RE: response.sendRedirect() - is this allowed?

2003-02-07 Thread Daniel Brown
to debug :( Dan. -Original Message- From: Neale [mailto:[EMAIL PROTECTED]] Sent: 07 February 2003 09:01 To: Tomcat Users List Subject: Re: response.sendRedirect() - is this allowed? if ( POST.equalsIgnoreCase( request.getMethod() ) ) { StringBuffer buf = new StringBuffer

Re: response.sendRedirect() - is this allowed?

2003-02-06 Thread Bill Barker
It isn't against the HTTP specification to sendRedirect (which in Tomcat will result in a 302 response). It's just that very few (if any) browsers actually implement the spec in this area. Most of them will respond by doing a GET to the new URL, instead of a POST (which is what the RFC says to

Re: response.sendRedirect() - is this allowed?

2003-02-06 Thread rf
// This is common trick I use after a form submission to // help make navigation easier for the user, and to help // avoid dual-submission of the same form. // Not clear - how is the second submission avoided? if ( POST.equalsIgnoreCase( request.getMethod() ) ) { StringBuffer buf

Re: response.sendRedirect() - is this allowed?

2003-02-06 Thread Bill Barker
rf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... // This is common trick I use after a form submission to // help make navigation easier for the user, and to help // avoid dual-submission of the same form. // Not clear - how is the second

Re: response.sendRedirect() - is this allowed?

2003-02-06 Thread Sean Dockery
Further to this, the W3 recognized the fact that many clients did not adhere to the specification for 302 and 303, so they introduced 307 in HTTP 1.1--which was intended to be followed more strictly. The original method must be used when following a re-direct, but when a non-idempotent method

RE: response.sendRedirect not redirecting

2002-03-30 Thread Mostafa Al-Mallawani
Thanks a lot, it worked! What does return do? -Original Message- From: Brian Adams [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 8:05 PM To: Tomcat Users List Subject: RE: response.sendRedirect not redirecting add return; just after response.sendR. -Original Message

Re: response.sendRedirect not redirecting

2002-03-19 Thread Christopher Bare
--- Mostafa Al-Mallawani [EMAIL PROTECTED] wrote: Hi, I have a problem with redirecting. In my JSP page I keep checking for errors, whenever I catch one, I set a variable on the session object and then forward to an error page; this could happen up to 5 times in one page. The weird

RE: response.sendRedirect not redirecting

2002-03-17 Thread Brian Adams
add return; just after response.sendR. -Original Message- From: Mostafa Al-Mallawani [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 7:12 AM To: 'Tomcat Users List' Subject: response.sendRedirect not redirecting Hi, I have a problem with redirecting. In my JSP page I keep

RE: response.sendRedirect

2002-01-17 Thread Brian Adams
Poking fun have you // your session.invalidate and tried it? :) sorry it begged the question! my answer is dunno, try commenting it out and then try it or swapping the two lines /Poking fun -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17,

RE: response.sendRedirect

2002-01-17 Thread Jerry Jalenak
List' Subject: RE: response.sendRedirect Poking fun have you // your session.invalidate and tried it? :) sorry it begged the question! my answer is dunno, try commenting it out and then try it or swapping the two lines /Poking fun -Original Message- From: Jerry Jalenak [mailto:[EMAIL

RE: response.sendRedirect

2002-01-17 Thread Jeff Prideaux
Do you have any html tags in your jsp file before the logic you mention? Also, what jsp spec are you using? -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 3:26 PM To: '[EMAIL PROTECTED]' Subject: response.sendRedirect I have the

RE: response.sendRedirect problems with IE5.5

2001-08-24 Thread Randy Layman
Calling response.sendRedirect does not stop the execution of a JSP page. You are responsible for returning from the _jspService method after calling sendRedirect (by placing a return statement in your JSP). What is actually happening is that Netscape is thinking that its

RE: response.sendRedirect vs. requestDispatcher.forward

2001-05-31 Thread Brandon Cruz
30, 2001 6:38 PM To: [EMAIL PROTECTED] Subject: RE: response.sendRedirect vs. requestDispatcher.forward If you webserver is serving in /usr/local/apache/htdocs, you are redirecting to /usr/local/apache/htdocs/login.jsp, which is handled in this example by apache, who doesn't know anything about

Re: response.sendRedirect vs. requestDispatcher.forward

2001-05-31 Thread Alex Fernández
Hi Andy! Just a fine point here. A Yang wrote: RequestDispatch.forward takes a URL that is a RELATIVE path but also requires a leading slash. From the javadoc of ServletRequest.getRequestDispatcher(String): 'The pathname specified may be relative, although it cannot extend outside the

RE: response.sendRedirect vs. requestDispatcher.forward

2001-05-31 Thread Martin van den Bemt
:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 3:26 PM To: [EMAIL PROTECTED] Subject: RE: response.sendRedirect vs. requestDispatcher.forward So what is the correct way to redirect? I have started using relative links to redirect and it seems to fix the problem. Is this just coincidence

RE: response.sendRedirect vs. requestDispatcher.forward

2001-05-30 Thread A Yang
Message- From: Alex Fernandez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 29, 2001 4:57 PM To: [EMAIL PROTECTED] Subject: Re: response.sendRedirect vs. requestDispatcher.forward Conceptually, requestDispatcher.forward() is different from response.sendRedirect(). In forward

RE: response.sendRedirect vs. requestDispatcher.forward

2001-05-30 Thread Brandon Cruz
Message- From: A Yang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 30, 2001 1:13 PM To: [EMAIL PROTECTED] Subject: RE: response.sendRedirect vs. requestDispatcher.forward Hi, Thanks for the help. As it turns out, switching between requestDispath.forward and response.redirect will trip you

RE: response.sendRedirect vs. requestDispatcher.forward

2001-05-30 Thread Martin van den Bemt
- From: Brandon Cruz [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 1:31 AM To: [EMAIL PROTECTED] Subject: RE: response.sendRedirect vs. requestDispatcher.forward Has anyone figured out why response.sendRedirect(/login.jsp) will not work when using apache-tomcat with mod_jk? It gets

Re: response.sendRedirect vs. requestDispatcher.forward

2001-05-29 Thread Alex Fernández
Conceptually, requestDispatcher.forward() is different from response.sendRedirect(). In forward(), you are moving inside the same webapp, and as such it doesn't even reach the client browser. The session is maintained. In sendRedirect(), you're instead moving across webapps, and it's the

RE: response.sendRedirect vs. requestDispatcher.forward

2001-05-29 Thread Martin van den Bemt
: Tuesday, May 29, 2001 4:57 PM To: [EMAIL PROTECTED] Subject: Re: response.sendRedirect vs. requestDispatcher.forward Conceptually, requestDispatcher.forward() is different from response.sendRedirect(). In forward(), you are moving inside the same webapp, and as such it doesn't even reach

Re: response.sendRedirect and target

2001-01-29 Thread Wyn Easton
Here is a little JavaScript function you can call from the "onload" of the body tag that will assure your page is the topmost page: /*/ function setAsTop() { if (top.location != self.location) top.location = self.location; }

RE: response.sendRedirect() and NSAPI redirection...

2001-01-24 Thread Danganan, Clyde
I ran into this problem with NTWorkstation4.0 running Apache Web server and Tomcat 3.2.1 Apache has a config file,httpd.conf, which references a Servername variable. I set this variable name to what is defined in the host file, which is "localhost". Perhaps the iplanet web server has a similar

RE: response.sendRedirect bug or feature

2000-12-07 Thread David Rees
Add a return statement: if (a b) { response.sendRedirect(url1); return; } // Do something else! response.sendRedirect(url1); -Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Zsolt Koppany Sent: Thursday, December 07, 2000 12:30

Re: response.sendRedirect stops working in Apache/Tomcat setup

2000-10-30 Thread Leon Palermo
Instead of redirecting, try forwarding like this: getServletConfig().getServletContext().getRequestDispatcher("/jsp/forwardto.jsp").forward(request, response); Leon - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 30, 2000