I apologize in advance for asking such a silly question, but I can't seem to get my Javascript to be executed. I switched from my complete page to a simple example to make sure I wasn't doing anything too tricky, and I still can't get the JS to work. I have the following code saved in a file named index.html on my server:
<%@page import="index.jsp" %>
<html>
<head>
<title>Hello World</title>
</head>
<body>
Hello World!<br/>
<script type="text/JavaScript" src="index.jsp">
</script>
Still hello world!
<script type="text/JavaScript">
out.println(" Your IP address is " + request.getRemoteAddr());
alert("Welcome to the boost converter site");
</script>
</body>
</html>
And what I see when I go to the page is :
Hello World
Still Hello World
In the Index.jsp file, I have:
function InitPage(){
out.println("Your IP address is " + request.getRemoteAddr());
}
I know the solution is insanely simple, but I haven't been able to come up with the line of code that fixes this. I've been copying example code over to my page just to see if somebody else's JS is executed properly, and I haven't gotten that either. Pretty sure the server runs Tomcat.
Thanks,
Craig