i have a silly problem here, if i delete a data in database from my jsp
page .. let say in the page i got 10 datas and i deleted one, and after i
deleted it i used sendRedirect() method to go back to the list page. I need to
refresh the page or it will keep showing 10 datas. How can i make it
if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
String MM_referrer = request.getRequestURI();
if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" +
request.getQueryString();
MM_authFailedURL = MM_authFailedURL + MM_qsChar + "a
he request..
let's say
-
request.setAttribute("mylist", mylist);
requestdispatcher.forward(request, response);
-
how can i have the same functionality using response.sendRedirect??? as far
as i know, in the response u cannot set any attributes
anyone can help me??
t
a return statement after sendRedirect should help.
response.sendRedirect(URL);
return;
Uwe
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets ca
I did this inside my JSP :
<%
response.sendRedirect(update_error.jsp?msg=errormsg);
%>
and I'm getting this error:
HTTP Error 400
400 Bad Request
Due to malformed syntax, the request could not be understood by the server.
The client should not repeat the request without modific
Hi guys,
Someone tell me, if i'm using sessions, i can't use redirect,..is that
true??
You can send me an example of how to create sessions..store and retrieve
information..
thanks in advance.
Juan.
-Original Message-
From: Rodrigo Gevaerd [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, Jul
You may want to try to set so that the browser will not cache the data in
the list page jsp.
At 11:28 AM 8/26/01, you wrote:
>i have a silly problem here, if i delete a data in database from my jsp
>page .. let say in the page i got 10 datas and i deleted one, and after i
>deleted it i used sendR
Can you tell me how can i do that sir ???
==thx,H`L
- Original Message -
From:
Irawan
To: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 6:30
AM
Subject: Re: response.sendRedirect()
problem
You may want to try to set so that the browser will not cache
the
:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>Sent: Monday, August 27, 2001 6:30 AM
>Subject: Re: response.sendRedirect() problem
>
>You may want to try to set so that the browser will not cache the data
>in
>the list page jsp.
>
>At 11:28 AM 8/26/01, you wrote:
> >i have a silly problem he
Hi all,
I have no problem using response.sendRedirect(URL); when I pass parameters to
my JSP page but what I also want to do is if I do not pass anything or by
default when I initialize the JSP w/out any parameters I want it to redirect
user to my main.html any Ideas by default? the code is
if i have:
response.sendRedirect("page.jsp");
how can i put in a target=_top the redirect?
thanks
Carlos
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mai
#x27;m able to force the server to redirect before
parsing
> the whole page is to place a "return;" immediately after the redirect at
the
> end of the if() block.
response.sendRedirect() doesn't stop the execution of a page, the
jsp:forward tag does. Mayb
Thomas wrote:
>
> At the top of my page is an access control code block that checks to see if
> a user is allowed access to the page. If the user doesn't have access, then
> they are redirected to an error page. Below the control code is a procedure
> to deal with a submitted form that updates a
There is an advantage to using response.sendRedirect() - when users try to
print a page that is the result of a form POST from certain Netscape
browsers, the page prints blank, or with an error message; I've even seen
it strip the query string for the purposes of printing.
the point is that i want to set some Attributes in the request..
> let's say
> -
> request.setAttribute("mylist", mylist);
> requestdispatcher.forward(request, response);
> -
>
> how can i have the same functionality using response.sendRedirect??? as far
response.sendRedirect(Servlet B's URL).
Servlet B then gets the new value from HttpSession and creates a View Bean
the View bean is populated with the result. Servlet B then calls the
Display JSP using :
request.setAttribute("thisViewBean",thisViewBean);
RequestDispatcher rd;
rd = ge
Hi,
In my project I am useing 'response.sendRedirect("somefilename.jsp")' . Its working fine. but my problem is each and every page I am checking my session whether its expired or not..if expired I am redirecting to Login page using response.sendRedirect. but once I am
After the sendRedirect statement write return statement.
-Original Message-
From: srinivas tadikonda [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 28, 2002 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: response.sendRedirect problem
Hi,
In my project I am useing 'response.sendRed
r u putting ur code in finally block. coz thats the only way that after your
response.sendRedirect statement your remaining code below it is being
executed.
Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031
-Original Message-
From: srinivas tadikonda [mailto:[EMAIL
Just to check, you did put quotes around the url didn't you?
Dave
> -Original Message-
> From: Sandy Tiu [mailto:[EMAIL PROTECTED]]
> Sent: 14 September 1999 19:29
> To: [EMAIL PROTECTED]
> Subject: response.sendRedirect () with parms
>
>
Sandy Tiu wrote:
> I did this inside my JSP :
>
> <%
> response.sendRedirect(update_error.jsp?msg=errormsg);
> %>
>
> and I'm getting this error:
>
> HTTP Error 400
> 400 Bad Request
>
> Due to malformed syntax, the request could not be understoo
Also, you have to Encode the redirect before send:
response.sendRedirect (response.encodeRedirectUrl
("update_error.jsp?msg=errormsg"));
Sandy Tiu wrote:
> I did this inside my JSP :
>
> <%
> response.sendRedirect(update_error.jsp?msg=errormsg);
> %>
>
>
> <%
> response.sendRedirect(update_error.jsp?msg=errormsg);
> %>
You have to put quotes around the redirect uri
response.sendRedirect("update_error.jsp?msg=errormsg");
Mike
===
To unsubscribe
At 06:29 PM 9/14/99 +, Sandy Tiu wrote:
>I did this inside my JSP :
>
><%
>response.sendRedirect(update_error.jsp?msg=errormsg);
>%>
>
>and I'm getting this error:
>
>HTTP Error 400
You probably want
<%
response.sendRedirect("update_error.
My problem is actually like this:
<%
url = "udpate_error.jsp?msg=" + e.getMessage();
response.sendRedirect (url);
%>
where e.getMessage() returns an error from the database which could look
like this:
"Account does not exist."
I found out that I have to parse the ab
ncodedMsg = java.net.URLEncoder.encode(e.getMessage());
response.sendRedirect("udpate_error.jsp?msg=" + encodedMsg);
%>
Although, I think a better way would be to have the databse throw an
exception, and then set <%@ page errorPage="update_error.jsp" %>, instead
of tr
Sandy Tiu wrote:
> I found out that I have to parse the above string and replace all spaces
> with a "%20" before appending it to the url. It worked after
> I did this. Is there a better way?
Take a peek at java.net.URLEncoder.encode().
-Dave
Try using:
<%
url = "udpate_error.jsp?msg=" + e.getMessage();
url = URLEncoder.encode(url);
response.sendRedirect (url);
%>
URLEncoder.encode is a static method that will parse and correct URLs
that contain unsafe characters.
Carles
Sandy Tiu wrote:
>
> My problem
> I found out that I have to parse the above string and replace all spaces
> with a "%20" before appending it to the url. It worked after
> I did this. Is there a better way?
Aside from using the JSP error directive, you should use
java.net.URLEncoder.encode(msg) rather than substituting spaces w
this. Is there a better way?
>
><%
>String encodedMsg = java.net.URLEncoder.encode(e.getMessage());
>response.sendRedirect("udpate_error.jsp?msg=" + encodedMsg);
>%>
>
>Although, I think a better way would be to have the databse throw an
>exception, and then set <%@ page err
L PROTECTED] <[EMAIL PROTECTED]>
Date : mercredi 15 septembre 1999 19:33
Objet : Re: response.sendRedirect () with parms
>At 04:42 PM 9/15/99 +, Sandy Tiu wrote:
>>"Account does not exist."
>>
>>I found out that I have to parse the above string and replace
AIL PROTECTED]
Subject: Re: response.sendRedirect () with parms
This thread seems not to be active anymore. Anyway, the solution Marc
explained works great, except in one case : I want to forward the response
to an jsp page, passing some parameters, but also I want the browser to be
placed at a marked.
I
sorry
Sylvain
-Message d'origine-
De : Thomas Cox <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : jeudi 7 octobre 1999 22:10
Objet : FW: response.sendRedirect () with parms
>
><>Idea #1:
>Pass the #14 in as an argument, and output som
Juan:
You can use HttpServletResponse.sendRedirect(String)
any time you want. What you heard is not true. But,
you have to be aware that when you call sendRedirect()
the page processing doesn't stop. It will continue
until the end of the page. It adds a response header
so the browser ask for it.
:
>Can you tell me how can i do that sir ???
>
>==
>thx,
>H`L
>- Original Message -
>From: <mailto:[EMAIL PROTECTED]>Irawan
>To: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>Sent: Monday, August 27, 2001 6:30 AM
>Subject: Re: response.sendRedirect() pro
the
report parameters, and, once validated, uses response.sendRedirect() to move
the user to the report page.
When working with just the two JSP pages and the tag, everything works fine.
After the form is valid, the redirect gets sent, and the report shows. All is
happy and good.
Almost.
The
I've been trying out my web-app on different Servlet engines and have
found a discrepancy between the way response.sendRedirect() works on
Orion 0.9 beta versus JRun 3.0 beta. Orion behaved the way I expected,
but when I tried to find out from the Servlet 2.2 spec the way this
situation shou
Subject: Re: response.sendRedirect() problem
> Sure can.
> From your code add the following 3 lines:
> response.setHeader("Pragma", "No-cache");
> response.setHeader("Cache-Control", "no-cache");
> response.setDateHeader("Expires", 0);
>
on
>- Original Message -
>From: Irawan <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, August 27, 2001 9:51 AM
>Subject: Re: response.sendRedirect() problem
>
>
> > Sure can.
> > From your code add the following 3 lines:
> > re
m: Irawan <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Monday, August 27, 2001 9:51 AM
>>Subject: Re: response.sendRedirect() problem
>>
>>
>> > Sure can.
>> > From your code add the following 3 lines:
>> > response.setHe
: response.sendRedirect()
problem to Irawan
Hello Jason.I used the following response.setHeader methods
inside my jsp page.still the page is not getting refreshed.but for
me
Hi.
Actually if I use setHeader "no cache" what is happening ?
Is the files are not stored in C:\WINDOWS\Temporary Internet Files ?
In my case i am not using any redirects but using encodeUrl and opening
files in separate single window.
The page opened in separate window is retained unchanged, ie
have more setting can set throw response?
>>>
>>>Jason
>>>- Original Message -
>>>From: Irawan <[EMAIL PROTECTED]>
>>>To: <[EMAIL PROTECTED]>
>>>Sent: Monday, August 27, 2001 9:51 AM
>>>Subject: Re:
Did you add the no cache to the page open in the separate window also?
If the new page open in the other window is also a jsp/servlet, then you
also have to add the code there. The code to set the page to no cache is
specific only for that particular page.
When the page set to 'no cache' then th
PROTECTED]
Subject: Re: response.sendRedirect() problem to Irawan
Once you set the cache to no, it is up to the browser to honor the request
I believe. Also in your case, what I would check is to make sure that the
code is working correctly. So you are saying that all the data/content are
Is it safe to put code after a response.sendRedirect(URL), and expect for
it to execute?
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with
jsp
(which queries the database shows the report). There is also a custom tag
involved. This tag exists on the parameters page, handles validation of the
report parameters, and, once validated, uses response.sendRedirect() to move
the user to the report page.
When working with just the two JSP
>
> For instance, my web-app has a context path of "/cvg" and the servlet I
> want to redirect to is mapped to "/dispatch". If I call
> response.sendRedirect("/dispatch") on Orion, it translates the redirect
> to "http://myhost/cvg/dispatch",
JonTom Kittredge wrote:
>
> I've been trying out my web-app on different Servlet engines and have
> found a discrepancy between the way response.sendRedirect() works on
> Orion 0.9 beta versus JRun 3.0 beta. Orion behaved the way I expected,
> but when I tried to find out
t("/~foo/bar/"). It would be horrible to move the
web-application. This means you would have to do
response.sendRedirect(request.getContextPath() + "/foo") in almost every
redirect.
Also, alot of applications that were developed before the introduction
of web-applications
> "/dispatch" is not an absolute URL. It needs a context to mean something
> (like a protocol and a host).
>
Well, no, it doesn't, in practice. If you leave out the protocol+host+port,
they're provided from the page context.
But OK, if you don't like the word "absolute" by itself, feel free to us
Hi, all...
I'm using Apache HTTP server and Jakarta Tomcat as a servlet engine.
Apache is running on port 8088 and the direct connection to Tomcat is closed.
The problem is that when some action in jsp has been operated and the jsp has called
the "response.sendRedirect()" meth
Yes, this is perfectly safe, as long as this code does not attempt to write
to
the response.
-AMT
> -Original Message-
> From: Aaron Hoyt [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 29, 2001 11:48 AM
> To: [EMAIL PROTECTED]
> Subject: what happens after response.s
I have a question about servlet mapping using response.sendRedirect() for local
language navigation:
1) What impact does using servlet mapping and response.sendRedirect() have on IIS and
JRun connections?
Is there any risk of this increasing the use of available HTTP connections and
crashing
> I'm using Apache HTTP server and Jakarta Tomcat as a servlet engine.
>
> Apache is running on port 8088 and the direct connection to Tomcat is closed.
>
> The problem is that when some action in jsp has been operated and the jsp has called
> the "response.sendRedire
D]
Subject: response.sendRedirect(...) is taking page from cache
I have a page that submits a request to a servlet and on certain conditions
the servlet performs a
response.sendRedirect(...) right back to itself. Is there anyway to force
the browser to not grab
the page from cache. I have the
out.println("");
Regards,
Niranjan.
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Duane Morse
Sent: Wednesday, June 20, 2001 12:49 AM
To: [EMAIL PROTECTED]
Subject: Re: response.sen
session.setAttribute("WhetherBackFromReportPage",null);
response.sendRedirect("xyz.jsp");
}
}
This xyz.jsp is the same page on which this is coded.
Now this page is in a protected area of the web server requiring user id and
password
What's the error?
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs ca
ncountered this problem as well, but have no explaination as to its
> cause. It seems to occur more frequently with the servlet runner, and I haven't
> seen it happen if response.sendRedirect() is called from within a servlet (as
> opposed to a jsp). I haven't encountered it with IBM We
]
Subject: Re: Unable to do response.sendRedirect() into a protected
resource
What's the error?
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTE
te[SMTP:[EMAIL PROTECTED]]
> Sent: 22 February 1999 16:49
> To: [EMAIL PROTECTED]
> Subject: Re: response.sendRedirect() raises java.io.Exception:
> triedto write more than content length
>
> Rolland Crunk wrote:
> >
> > At 01:43 PM 2/19/99 +, Westawa
) method. It is done this way to provide
error
tracking. When exception is thrown, all content is discarded and another
JSP
page is called to generate html.
JSP should look like this:
...
<%
// clean output buffer
out.discard();
// send redirect
response.sendRedirect(resp.encodeRedirect("som
63 matches
Mail list logo