I've been trying to resolve an issue at my new job. I still don't have access to a lot of their systems. There's an RDF report that's supposed to be called and then it is saved as a pdf file.
Here's small part of the code -
URL url = new URL("http://localhost:7777/reports/rwservlet?csc&report=/app/oracle/files/TCP01/reports/vp_owner/letter.rdf&P_USER=null&p_emp_id=12345");
URLConnection conn = url.openConnection();
(I manually inserted the URL link for readability)
Another piece of code checks for contenttype text/html - if it is text/html it throws an exception because it was expecting binary pdf data instead.
My main question is - Can a Production App Server call itself with an "http://localhost:7777" call?
I'm thinking that the contenttype is text/html because a 'Page cannot be displayed' is being sent back - because it can't resolve the localhost. Would this be true?
Is localhost only used for local machines like the application server on your desktop?
Thanks