The Artima Developer Community
Sponsored Link

Java Buzz Forum
"Hello, J2EE" in 2 minutes for OS X

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Norman Richards

Posts: 396
Nickname: orb
Registered: Jun, 2003

Norman Richards is co-author of XDoclet in Action
"Hello, J2EE" in 2 minutes for OS X Posted: Nov 20, 2003 10:00 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Norman Richards.
Original Post: "Hello, J2EE" in 2 minutes for OS X
Feed Title: Orb [norman richards]
Feed URL: http://members.capmac.org/~orb/blog.cgi/tech/java?flav=rss
Feed Description: Monkey number 312,978,199
Latest Java Buzz Posts
Latest Java Buzz Posts by Norman Richards
Latest Posts From Orb [norman richards]

Advertisement

Mike Clark issued a challenge to make a browser say "Hello, World!" using JBoss on a Mac. I'm no stranger to Hello World challenges (if you are a JDJ subscriber, the article is online here) so I couldn't resist thinking about this.

It actually turns out that Apple provides pretty good Hello World support in Xcode, which is available to anyone who has upgraded to 10.3. Here is how to get Hello World going in about 2 minutes on any 10.3 box without using anything but the standard dev tools. (I'm not counting the time to install Xcode here. That may take 5-10 additional minutes)

  1. Install XCode off the 10.3 developer CD. Make sure you get the J2EE components which includes JBoss, Ant and XDoclet.
  2. Launch Xcode and create a new "Web Module" called "helloworld". You will notice that Xcode starts you off with a simple HelloWorld servlet and a complete web application build.
  3. Start JBoss. (run /Library/JBoss/3.2/bin/run.sh)
  4. Press the build button in the IDE. Keep an eye on the JBoss window and you should see the
  5. Go to http://localhost:8080/helloworld/servlet/HelloWorld
  6. To change the "Hello World!" message to "Hello, World!" (as per the challenge) , go to the HellowWorldServlet.java file in your src directory. Change line 69 of the servlet to include the comma in the text.
  7. Press the "build" button again and wait for the application to deploy. When it does, reload the web page and you will see your new message.

Ok, that wasn't very painful, was it? Obviously one doesn't need a servlet to do Hello, World. But, Apple provides it as a placeholder to illustrate how to do a servlet. Note the seemless XDoclet integration which eliminates the need to do any deployment descriptors. Nice! There's also a Hello, World EJB sample as well as a combined "Enterprise Application" containing both the web and ejb code in one project. Click and go.

Xcode isn't my preferred J2EE development evironment, but if someone wants to get a web or EJB app up quickly on OS X, I can't think of a quicker less hassle option.

Read: "Hello, J2EE" in 2 minutes for OS X

Topic: YoLinux Previous Topic   Next Topic Topic: Selling Tool Support

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use