jl2001
asked on
How to get the URL text
Hi, all
When I type (server name)/home.jsp, I need to show a popup message: This is our home. How can I get the URL text?
For example:
If URL = "(server name)/home.jsp"
alert ("This is our home");
Thanks
When I type (server name)/home.jsp, I need to show a popup message: This is our home. How can I get the URL text?
For example:
If URL = "(server name)/home.jsp"
alert ("This is our home");
Thanks
Better to just have your jsp include the js to call your alert when the window is loaded (onLoad) if the url matches.
<%
String URL = request.getRequestURI();
%>
String URL = request.getRequestURI();
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
"Accept cheekycj's comment as answer."
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Kuldeepchaturvedi
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
"Accept cheekycj's comment as answer."
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Kuldeepchaturvedi
EE Cleanup Volunteer