• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic