<HTML>
<BODY>
Hello! The time is now <%= new java.util.Date() %>
</BODY>
</HTML>
I tried to open this trivial jsp file with firefox, but the expression wouldn’t evaluate. I have Java installed.
I’m new to JSP. Should I put the jsp in some specific directory? Or do I forget to include anything in the jsp file?
It sounds like that you aren’t using a JSP/Servlet container at all but instead just opened the file straight from local disk file system by a
file://URL. This is indeed not going to work. You need to install a JSP/Servlet container. This is basically a HTTP web server which has the JSP compiler builtin and supports serving JSP/Servlets. A well known example is Apache Tomcat. Just download the zip under “Core” section (no, not the “Windows zip”, really just “zip”) and extract it on your disk. Then perform the following steps:/webappsfolder of Tomcat./bin/startup.bat(Windows) or/bin/startup.sh(Unix) script.See also: