Setting up Apache Tomcat 7.0 to work with NetBeans IDE 7.0.1

Go to http://tomcat.apache.org/ to download the latest Tomcat server zip file. Install it in your computer C:\ drive. Open your software NetBeans IDE, click on Tools menu, select Servers. You can remove GlassFish which is the default server and add the Tomcat. If you already used the port 8080 for PHP localhost, you should use port 8081 for Tomcat and Shutdown port is 8006. Important step: You must define user role as “manager-script” in Tomcat70\conf\tomcat-users.xml in order to run in NetBeans. Add these 2 lines…

Continue reading »

What is the difference between <%@ include file="xyz.jsp" %> and in JSP?

The <%@include file=”xyz.jsp” %> or <%@include file=”xyz.html” %> directive pulls in the text of the included file and compiling it as if it were part of the including file. The included file can be any type (including HTML or text). The tag compiles the file as a separate JSP file, and embeds a call to it in the compiled JSP. The include action is executed at request time as opposed to translation time. Thus instead of the content of the include file being included in…

Continue reading »

How to set Tomcat Server Port in Java EE

If you have Apache server that running on Port 8080 as localhost, Java EE doesn’t allow you to debug or run your jsp app thru this port again using Tomcat Server. So what will you do? Open Java EE and specify any java web project. At the bottom of the page, click on “Servers” tab. Double click on the defined Tomcat server (mine is 6.0), it’ll take you to the Overview page. Here you can change the Port from 8080 to 8081 on the HTTP/1.1.…

Continue reading »