{"id":4622,"date":"2013-10-06T05:25:39","date_gmt":"2013-10-05T18:25:39","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4622"},"modified":"2016-02-08T17:08:02","modified_gmt":"2016-02-08T07:08:02","slug":"netbeans-java-web-application-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/netbeans-java-web-application-primer-tutorial\/","title":{"rendered":"NetBeans Java Web Application Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"NetBeans Java Web Application Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/NetBeans_JavaWebApplication_Primer-14of.jpg\" title=\"NetBeans Java Web Application Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">NetBeans Java Web Application Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s NetBeans Java Web Application primer tutorial builds on our previous <a target=_blank title='Tic Tac Toe' href='#tttoe'>Tic Tac Toe<\/a> game shown below.   We need to revisit this area of NetBeans to examine web <a target=_blank title='Java Servlet' href='http:\/\/en.wikipedia.org\/wiki\/Web_container\u200e'>Java Servlets<\/a>, at a later date, because this Tic Tac Toe Java Web Application only goes so far as to use a <a target=_blank title='jsp file information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/JavaServer_Pages\u200e'>JavaServer Page<\/a> using JavaScript but <a target=_blank title='Ajax' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Ajax'>Ajax<\/a>, for instance, can be part of such functionality.  In saying that, take a look at the last two slides of the tutorial to see that you can mix <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/NetBeans_JavaWebApplication_Primer-22of.jpg\">Java<\/a> with HTML when you use <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/NetBeans_JavaWebApplication_Primer-23of.jpg\">JSP functionality<\/a>.<\/p>\n<p>Programming <a target=_blank title='IDE information from Wikipedia' href='http:\/\/een.wikipedia.org\/wiki\/IDE\u200e'>IDE<\/a>s take a lot of the hard work out of tasks such as compiling and linking in languages such as Java, C, C++, VB.Net and C#.   In the case of NetBeans IDE, which this blog reintroduces to you today (its customary to shake hands, and no <a target=_blank title='pardon?' href='http:\/\/www.youtube.com\/watch?v=SGZV6fsotYo'>Klingon<\/a> is necessary), it can create a Java Web Application, for instance, as we do today to create a Tic Tac Toe game as a web application.   To cut a long story short, there aint nothin&#8217; wrong with a good ol&#8217; IDE, but beware of IDEs in <a target=_blank title='Ides of March' href='https:\/\/www.youtube.com\/watch?v=Je0gTnheVe4'>March<\/a>.<\/p>\n<p>In saying that about IDEs, and how they make programming easier, often with Open Source programming, it is advantageous to know what goes on &#8220;under the hood&#8221; (or even &#8220;in the &#8216;hood&#8221; &#8230; chortle, chortle).   So if you ever get an opportunity to get helped creating your own makefile (or make it yourself, even with the <a target=_blank title='Sweet Green Icing' href='http:\/\/www.youtube.com\/watch?v=CPMpeNDIGdk'>Sweet Green Icing<\/a> &#8230; knew it could be worked in!) for something, take the opportunity to learn how to do this, as the Open Source world will become a little easier to navigate with such types of knowledge.   You&#8217;ve got to admire those early designers of computer languages, and those days when all you had was this tiny bit of memory (<a target=_blank title='64k' href='http:\/\/www.crashonline.org.uk\/39\/z88.htm'>64k<\/a> or <a target=_blank title='Voyager computer system' href='http:\/\/www.activeastronomy.org\/Home\/daniel'>&#8220;into the heliosphere on 8,000 bytes of memory&#8221;<\/a>) to play with to create your program.   <\/p>\n<p>In doing this NetBeans Java Web Application found that Java JDK 1.6 needed to be upgraded to Java JDK 1.7 to allow for the workings of the <a target=_blank title='GlassFish Web Server information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/GlassFish\u200e'>GlassFish Web Server<\/a> used by NetBeans, and, in order to do this, found <a target=_blank title='JDK 1.7 upgrade information' href='http:\/\/stackoverflow.com\/questions\/17376543\/how-to-upgrade-jdk-1-6-to-a-higher-version-to-run-glassfish'><i>How to upgrade JDK 1.6 to a higher version to run Glassfish?<\/i><\/a> was incredibly helpful pointing to <a target=_blank title='Java SE Downloads page' href='http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jdk7-downloads-1880260.html'><i>Java SE Downloads<\/i><\/a> as the useful download area of interest.<\/p>\n<p>NetBeans can be an IDE for much more than Java &#8230; it can supervise PHP, C++, Maven, Groovy and HTML\/Javascript.   In coming days and weeks we&#8217;ll look at more.<\/p>\n<p>Link to downloadable NetBeans Java Web Application <a target=_blank title='jsp file information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/JavaServer_Pages\u200e'>JavaServer Page<\/a> programming source code at <a target=_blank title='index.jsp' href='http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/index.jsp_GETME'>index.jsp<\/a><\/p>\n<p>Link to NetBeans &#8220;spiritual home&#8221; download page at <a target=_blank title='NetBeans download page' href='https:\/\/netbeans.org\/downloads\/'>NetBeans<\/a>.<\/p>\n<hr \/>\n<p id='tttoe'>Previous <a target=_blank title='Tic Tac Toe' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=454'>Tic Tac Toe<\/a> game shown below.<\/p>\n<table title='Click a box to make your move in Noughts and Crosses game against Computer' ondblclick='window.open(\"http:\/\/www.rjmprogramming.com.au\/Games\/Noughtsandcrosses\/\",\"_blank\");'>\n<tbody style=\"background-color:pink;\">\n<tr>\n<td style=\"border-right: 2px solid red;border-bottom: 2px solid red;\" id=\"t11\"><img decoding=\"async\" id=\"11\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-bottom: 2px solid red;\" id=\"t12\"><img decoding=\"async\" id=\"12\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;border-bottom: 2px solid red;\" id=\"t13\"><img decoding=\"async\" id=\"13\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"border-right: 2px solid red;\" id=\"t21\"><img decoding=\"async\" id=\"21\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td id=\"t22\"><img decoding=\"async\" id=\"22\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;\" id=\"t23\"><img decoding=\"async\" id=\"23\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"border-right: 2px solid red;border-top: 2px solid red;\" id=\"t31\"><img decoding=\"async\" id=\"31\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-top: 2px solid red;\" id=\"t32\"><img decoding=\"async\" id=\"32\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;border-top: 2px solid red;\" id=\"t33\"><img decoding=\"async\" id=\"33\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"#post-454\" title=\"Coward's way out?\" onclick=\"newgame();\">New game<\/a><\/p>\n<p>Here is a great movie&nbsp;<a target=_blank title='War Games (Matthew Broderick)' href='http:\/\/www.youtube.com\/watch?v=NHWjlCaIrQo'>scene<\/a>&nbsp;that springs to mind.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d454' onclick='var dv=document.getElementById(\"d454\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=44\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d454' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d4622' onclick='var dv=document.getElementById(\"d4622\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Java\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d4622' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s NetBeans Java Web Application primer tutorial builds on our previous Tic Tac Toe game shown below. We need to revisit this area of NetBeans to examine web Java Servlets, at a later date, because this Tic Tac Toe Java &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/netbeans-java-web-application-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24,37],"tags":[644,833,997,1319,1402],"class_list":["post-4622","post","type-post","status-publish","format-standard","hentry","category-elearning","category-netbeans","category-tutorials","tag-java","tag-netbeans","tag-programming","tag-tutorial","tag-web-application"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/4622"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=4622"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/4622\/revisions"}],"predecessor-version":[{"id":20032,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/4622\/revisions\/20032"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=4622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=4622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=4622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}