?
Solved

Can I use sendRedirect() and hide parameters?

Posted on 2001-09-18
12
Medium Priority
?
448 Views
Last Modified: 2007-12-19
I need to forward users to another domain say, "http://www.thenewdomain.com" and there are some required parameters that need sending say, "login="joe".

I know that I can create one full string "http://www.thenewdomain.com?login=joe" and use sendRedirect() but when I do that the parameters show up in the URL Address line of the browser.  I need to hide those parameters similar to the HTML GET.

Does anyone know of a way to do that??

Thanks!
0
Comment
Question by:pzila
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +3
12 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6493597
You mean similar to HTTP POST, not GET.

It can't be done using sendRedirect. You actually need to build the POST request within the servlet.

I'm afraid I don't have any example code.......I'll see what I can find.

:o)

Ant
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6493771
Unfortunately with Servlets you cannot add GET or Post Parameters.

You can add attributes (java objects, strings, etc) to the request object.

Then you can forward the request to a JSP that will have access to all the attributes you attached to the request object.

The only way I have seen adding of Parameters (like FORM GET/POST) is when you do JSP include of a file and pass parameters via the Jsp:param tag.

CJ
0
 
LVL 6

Expert Comment

by:holli
ID: 6494252
encrypt the parameter, then it can be seen but not understood or correctly changed.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:beegled
ID: 6498673
holli,

I have a question.  If you pass the login and password like http://login:password@www.website.com/, is there a way to encrypt that login and password and still have it work?

David
0
 
LVL 6

Expert Comment

by:holli
ID: 6499287
once you do not have a https - connection all text will be transferred unencrypted in clear text.
to be sure, use a https for the login.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6500053
You can use Encryption methods just for Login and Password.. but passing them via the URL is still not a good approach.  For maximum security rely on FORM posts over SSL.

CJ
0
 

Expert Comment

by:beegled
ID: 6500967
Unfortunately, in this specific case, I can only use http and have to add it to the url.  Oh well, not a biggie, thank you.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6500989
Then I would use one of the many crypt libs available to encrypt the username and password.. and then use the URL.

CJ
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6855019
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Cd&
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6855111
I am not sure here.. probably just PAQ it.

CJ
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6892889
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
zero PAQ

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 6909029
Per recommendation, points refunded and question closed by
Netminder
CS Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question