dcsimg
Java in jsp page not working
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nolan_Carroll
Posted On:   Monday, June 25, 2007 01:09 PM

I just started using JSP today, and already I've come across a problem. When I save my file with the .jsp extension and then load it in a browser, the Java sections do not work.


For instance:


"Hello! The time is now <%= new java.util.Date() %>"


prints
"Hello! The time is now".



I am sure that I am making a simple mistake, but I do not know what it is. All help is appreciated.

Re: Java in jsp page not working

Posted By:   WarnerJan_Veldhuis  
Posted On:   Monday, June 25, 2007 02:19 PM

A JSP file needs to be parsed by a Java Servlet Container, such as Tomcat. Install Tomcat, build the WAR-file by following the plethora of examples that are around, deploy the WAR file, and it should work...



http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html here are some chapters you might wanna read first.
About | Sitemap | Contact