JSP

I am new to JSP. My Apache and Tomcat (working separately) are installed and HTML code runs. Also jsp files without <% %> also run. The following does not and does not produce any results:

</head>

<body>

<h2>JSP Expressions</h2>

<ul>

<li>Current time: <%= new java.util.Date() %></li>

<li>Server: <%= application.getServerInfo() %></li>

<li>Session ID: <%= session.getId() %></li>

<li>The <code>testParam</code> form parameter:

<%= request.getParameter("testParam") %></li>

</ul>

</body></html>

and gives the following:

JSP Expressions

Current time:

Server:

Session ID:

The testParam form parameter:

without values? Any assistance on what is wrong? Is it my Apache or Tomcat?

[936 byte] By [The.Villagera] at [2007-10-2 16:24:43]
# 1
How do you test it ?
semma at 2007-7-13 17:23:02 > top of Java-index,Java Essentials,New To Java...
# 2
Does your file have a ".jsp" extension ?
ordinary_guya at 2007-7-13 17:23:02 > top of Java-index,Java Essentials,New To Java...
# 3

this is what i got when the server is running

JSP Expressions

Current time: Fri Mar 31 11:05:40 SGT 2006

Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)

Session ID: ac10a7db231ff115ca0e62aa4693ab06c3479a4e73cc

The testParam form parameter: null

and this when not..opening jsp file with IE 6:

JSP Expressions

Current time:

Server:

Session ID:

The testParam form parameter:

jgalacambraa at 2007-7-13 17:23:02 > top of Java-index,Java Essentials,New To Java...
# 4

It seems as if you did a working deployment of your JSP page because you get an error from your server.

Do you send a parameter?

What is the result if you delete the

<li>The <code>testParam</code> form parameter:

<%= request.getParameter("testParam") %></li>

part of your JSP?

trhtrhrthta at 2007-7-13 17:23:02 > top of Java-index,Java Essentials,New To Java...
# 5
Apache is a web server. So I run the url http://localhost:8081/testjsp.jsp.
The.Villagera at 2007-7-13 17:23:02 > top of Java-index,Java Essentials,New To Java...
# 6
The file name ends with the .jsp extension. It is run as a url http://localhost:8081/testjsp.jsp under Apache web server. Other files with pure html with Javascript are being displayed correctly.
The.Villagera at 2007-7-13 17:23:02 > top of Java-index,Java Essentials,New To Java...