aspose file tools*
The moose likes Servlets and the fly likes request object from http to https Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "request object from http to https" Watch "request object from http to https" New topic
Author

request object from http to https

sreeni san
Ranch Hand

Joined: Aug 14, 2001
Posts: 39
Hi,

I have a form generated by servlet1 (by calling http://servlet/servlet1) and on submitting this form another servlet, servlet2 is called through "https" protocol. In the servlet2, the request object is found to be null disabling me to collect parameters passed from the servlet1 form.

Please help me solve this problem.

Thanks

Sreeni
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by sreeni san:
In the servlet2, the request object is found to be null [...]
This looks really unlikely. Can you give more, or more precise, information?

- Peter
Tommy Greenberg
Greenhorn

Joined: Jul 30, 2004
Posts: 15
Are you sure your setup is correct. There is a lot more the "HTTPS" then writting it in a URL. You can handle "HTTPS" many different ways. You can do it in your code, web.xml, and/or web server or servlet engine.

If your SSL and HTTPS are setup correctly make sure that your calling servlet is using the same protocol as your request handling servlet.

Meaning

Servlet1 -[HTTPS]-> HTML FORM1 -[HTTPS]-> Servlet2

Not

Servlet1 -[HTTP]-> HTML FORM1 -[HTTPS]-> Servlet2

This is because https and http use different ports, so if you switch the ports in mid request, you'll have servlet1 writting to a different port than the one servlet2 is reading from.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request object from http to https