This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

servlet calling another servlet (SSL)

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a servlet that invokes another servlet that runs within Tomcat on the same system:


In short, the call to invoke the other servlet would look like this:
http://myserver:8080/anotherServlet/theMethod

We are now allowing our apps to run under SSL control. However, the calling servlet and the called servlet may or may not be under SSL control. If for instance, the called servlet is under SSL control, the call to invoke it would look like this:
https://myserver:8443/anotherServlet/theMethod

Both the text "https" and the port have to change to properly invoke it.

My question, is there a way to programmatically query to find out if another servlet is under SSL control and to find what port to use? 8443 is the default port in TC, but it can be changed. How would the caller know that?

thanks
[ October 21, 2005: Message edited by: Neil Goldsmith ]
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From your code, it looks like you are trying to include the content generated from another servlet resides in the same system.

Use RequestDispatcher.include instead.
 
Neil Goldsmith
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My first servlet needs to get the data back from the called servlet in the reqID variable as shown in the code. If I use the include call, can the first servlet parse the response from the called servlet? How does it do that?

thanks
 
permaculture is giving a gift to your future self. After reading this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic