473,467 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Java Help - Servlets

Hi

I am using the response.sendRedirect(url) method. url is path to
another servlet. Example:

response.sendRedirect(response.encodeRedirectURL
("/EcBugManager/servlet/bugmanager.bugmanager.gui.BugsheetPage?
type="+bugsheetType+"&page="+page);

I am using the response.encodeRedirectURL to encode the url as i dont
want the parameters to be seen in the explorer - address bar.

?? But nothing happens, it just returns the same string with all the
paramteers without being encoded.

Am i using the correct way to encode the url, or is there another way
to do it.

Please, help me on this
Thanks for your time

Rose.
Jul 17 '05 #1
1 3652

"Rose Girl" <ro*********@hotmail.com> wrote in message
news:f5**************************@posting.google.c om...
| Hi
|
| I am using the response.sendRedirect(url) method. url is path to
| another servlet. Example:
|
| response.sendRedirect(response.encodeRedirectURL
| ("/EcBugManager/servlet/bugmanager.bugmanager.gui.BugsheetPage?
| type="+bugsheetType+"&page="+page);
|
| I am using the response.encodeRedirectURL to encode the url as i dont
| want the parameters to be seen in the explorer - address bar.
|
| ?? But nothing happens, it just returns the same string with all the
| paramteers without being encoded.
|
| Am i using the correct way to encode the url, or is there another way
| to do it.
|
| Please, help me on this
| Thanks for your time
|
| Rose.

Hi Rose, URLEncoding just changes certain characters in the url string a
space for example becomes %20, see here for a list of codes
http://www.w3schools.com/html/html_ref_urlencode.asp
If you don't want the query string to be seen you need to post the data
(typically from a browser). If you are wanting to pass the data from one
Servlet to another Servlet check out the RequestDispatcher in the api & (set
attributes in the HttpSession, ServletRequest or ServletContext). A
RequestDispatcher can be obtained from the ServletContext or from the
ServletRequest & HttpServletRequest. The RequestDispatcher obtained from the
ServletRequest can take a relative path. See
ServletRequest.getNamedDispatcher() also.
http://java.sun.com/j2ee/sdk_1.3/tec...ispatcher.html

HTH :-)
--
-P
"Much as some folks hate to lose their way, me, I pray to God that I will."
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: bb | last post by:
I'm not a Perl programmer nor a Linux adherent. What are the advantages of LAMP vs.the Java model for building data-driven websites? I do a fair amount of development using Tomcat/JSP/Servlets...
2
by: Patrick | last post by:
I'm using Jakarta-POI to create a huge Excel spreadsheet. I get the error below when the spreadsheet grows to a large size. It seems to have something to do with the number of "cell" objects that I...
3
by: StealthMonkey | last post by:
Let me prefix this by saying that I know next to nothing about Java (so please try to keep explainations simple). I use PHP for my server-side web programming. Here is my dilemma: I need a...
6
by: DAn | last post by:
Hi, I would like to know if there is a C# version of a servlet, or of J2EE equivalent. If not how do i write in C# a small "servlet" that simply parses some HTML code into text, that in turn...
7
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox,...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
66
by: flarosa | last post by:
Hi, I'm wondering if I can get a reasonably civil (without starting any huge wars) opinion on how server-side PHP compares to server-side Java. I've been strictly a Java developer for almost...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.