Wednesday, November 7, 2007

Serving JSP from Tomcat 5.5 on Ubuntu 7.10

Serving JSP from Tomcat 5.5 on Ubuntu 7.10

- Tomcat installed on Ubuntu 7.10, used Synaptic package manager.
- /etc/init.d/tomcat5.5 start
- /etc/init.d/tomcat5.5 stop
- /usr/share/tomcat5.5 is where tomcat lives.
- /usr/share/tomcat5.5-webapps is where the webapps live.


Create /usr/share/tomcat5.5-webapps/ROOT/test.jsp with the following contents:

<html>
<body>
<%java.util.Date d = new java.util.Date();%>

Todays date is <%= d.getDate()%> and this jsp page worked!

</body>
</html>

---
Subnote: To get the less than and greater than signs for the tags I use &lt; and &gt; There is a nice page that will do the conversion for you at : http://www.stanford.edu/~bsuter/js/convert.html

No comments: