November 2012

  • I recommend running netbeans on your desktop/laptop machine)
  • Start by making sure you have Java installed (recommended version is Java Platform (JDK) 7u9)
  • Then install Netbeans from http://netbeans.org/
    • Current version is 7.2 -- use the Java EE version
    • When installing netbeans also install latest version of tomcat (7.0.27)
  • Customizing your netbeans configuration
    • Add database definitions in server.conf inside <GlobalNamingResouces>
          <GlobalNamingResources>
              <!-- Editable user database that can also be used by
                   UserDatabaseRealm to authenticate users
              -->
              <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
              <Resource driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="4" maxIdle="2" maxWait="5000" name="jdbc/config-prod" password="RWP_change3" type="javax.sql.DataSource" url="jdbc:oracle:thin:@sca-oracle01.slac.stanford.edu:1521:dpf01" username="CONFIG"/>
              <Resource driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="4" maxIdle="2" maxWait="5000" name="jdbc/config-srs" password="RWP_change3" type="javax.sql.DataSource" url="jdbc:oracle:thin:@sca-oracle01.slac.stanford.edu:1521:dpf01" username="CONFIG"/>
      
          </GlobalNamingResources>
      
    • Add (attached ) mysql/oracle database drivers into
      • ~/.netbeans/7.3beta/apache-tomcat-7.0.27.0_base/lib
  • We have created a skelton project to get you started
    • Linked here .
    • Open in netbeans and you are ready to get started
  • Intro to maven
    • Look at pom.xml in the default application
  • Run using tomcat
    • Running using tomcat built into Netbeans
    • Deploy to remote server
      • settings.xml
  • Simple JSP page
  • Database JSP page
  • JSP philosophy
    • Embedded Java code
    • JSTL -- tag libraries
    • Java code vs JSP code
    • Hibernate, model-view, etc.etc.
  • Other useful links:
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels