From Professional Java for Web Applications
page 24
In file: $TOMCAT_HOME/conf/tomcat-users.xml
Add in between <tomcat-users>
and </tomcat-users>
<user username="admin" password="admin" roles="manager-gui,admin-gui" />
In file: $TOMCAT_HOME/conf/web.xml
Search for org.apache.jasper.servlet.JspServlet
Below the existing <init-param>
and </init-param>
, add the following
<init-param>
<param-name>compilerSourceVM</param-name>
<param-value>1.8</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.8</param-value>
</init-param>
Try this to see if it points to java jdk
In Windows:
> echo %JAVA_HOME%
Otherwise, set the system environment variable, for example
JAVA_HOME
C:\Program Files\Java\jdk1.8.0_60
> cd C:\Program Files\Apache Software Foundation\Tomcat 8.0\
> bin\startup.bat
If everything is ok, localhost:8080
will show the Apache Tomcat page