• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

request object from http to https

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic