Why do my anchor tags contain my request context path to the path I specified?

I am using Apache Tomcat 6.0.26 with Java and JSP servlets.

Whenever I try to connect to an external website, my anchor tags always contain my request context path before the external link. For example, if my context path is http: // localhost: 8084 / MyWebPage / , and I try to go to www.google.com through this tag:

<a href="www.google.com">Google</a>

My anchor tag is trying to go to http: // localhost: 8084 / MyWebPage / www.google.com instead of www.google.com.

What am I missing here?

Thanks in advance.

+3
source share
1

scheme. :

<a href="http://www.google.com">Google</a>

. , URL- , .

+5

Source: https://habr.com/ru/post/1766094/


All Articles