The current server time is:
Now open the Terminal, cd to the ~/ejbproject directory, and execute /usr/local/ant/bin/ant These steps will recompile the TestSessionBean, generate the proper client files, copy over clock.jsp, and rebuild and deploy a new WAR file into JBoss As long as you place EJBs, JSPs, and other resources alongside like components in the template project, no special steps are required to include new components in the build process JBoss automatically detects and redeploys the new WAR file (you will see this in the JBoss log if you are watching) You should now be able to open your web browser to the URL http://localhost:8080/web-client/clock.jsp and see the new clock in action, as shown in Figure 14-6 Figure 14-6 The clock JSP Chapter 13 Servlets, JSP, and Tomcat Most users are familiar with HTML, and virtually everyone who owns a computer today is familiar with web browsers The previous chapter introduced relational databases, but didn't discuss how to web-enable the information you're storing This chapter covers that topic and provides a way for you to put a face on your web application If you're already a web or J2EE developer, much of this material will be familiar, although you'll encounter several Mac OS X twists along the way If you've never played in the enterprise Java space, this chapter should whet your appetite for Mac OS X and get you moving in the right direction This chapter assumes that you've installed a database (in particular, MySQL) and that you'd now like to present information to the end user Two Java technologies are ideal for this task: JavaServer Pages (JSP) and Java servlets JSP is a specification and technology that lets a developer create HTML pages with embedded bits of Java code Servlets are a more code-oriented technology and are not based on HTML pages; however, they still simplify HTML generation, and are excellent for producing web-based user interfaces This chapter details how to run these components in your Mac OS X environment Chapter 2 Apple's Java Platform With a basic understanding of the Mac OS X platform, you're ready to get down to some bits and bytes well, almost First, you need to make sure you've got your Java compiler running properly, your environment variables set, and all program directories in the right place We'll deal with all of that in this chapter ... how to run these components in your Mac OS X environment Chapter 2 Apple's Java Platform With a basic understanding of the Mac OS X platform, you're ready to get down to some bits and bytes well, almost First, you need to make sure you've got your Java compiler... developer, much of this material will be familiar, although you'll encounter several Mac OS X twists along the way If you've never played in the enterprise Java space, this chapter should whet your appetite for Mac OS X and get you moving in the right direction... [Localhost:~/JBoss.3.0TemplateAndExamples] wiverson% cp [Localhost:~/ JBoss.3.0TemplateAndExamples] wiverson% c [Localhost:~/ejbproject] wiverson% ls Readme.txt build.xml src build log4j.configuration template [Localhost:~/ejbproject] wiverson% ls -a