Hello and thank you for reading my post.
I'm trying to make a webapp work with HTTPS.
It was working properly with HTTP.
Below is the problem I have.
Inside a servlet, in its "doPost()" method,
to check whether the "incoming JSP" is "example1.jsp" or "example2.jsp",
I am using the following piece of code:
-----------------------------------------------------------
s_referer = request.getHeader("referer");
if(s_referer.contains("example1.jsp") == true)
{
b_jspReferer1 = true;
}
if(s_referer.contains("example2.jsp") == true)
{
b_jspReferer2 = true;
}
-----------------------------------------------------------
In "example1.jsp" and "example2.jsp" there is a "<form>" element
which "action" attribute is set to "do_example":
-----------------------------------------------------------
<form method="post" action="do_example">
[...]
</form>
-----------------------------------------------------------
Now that I'm using HTTPS, "s_referer" is always equal to "do_example" in the
servlet.
Before, it used to be either "example1.jsp" in case the "incoming" JSP was
"example1.jsp"
and "example2.jsp" in case the "incoming" JSP was "example2.jsp".
I don't know how to correct my code to be able to discriminate between the
two JSPs.
Can you please help me?
I apologize in advance for the barbaric expression "incoming JSP".
I hope my point is understandable despite unfortunate expression.
Best regards.
--
View this message in context:
http://tomcat.10.x6.nabble.com/From-HTTP-to-HTTPS-request-getHeader-referer-tp5024782.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]