Okay, this is got to be the easiest question of the day. This is my first stab at Java and JSP.
I just wrote a little Java application using using Eclipse. Now I want to serve up this little application into a web page. I need to figure out the connection between Java applications and web pages.
Here's my application:
public class PhraseOMatic {
public static void main(String[] args) {
// CREATE WORD ARRAYS
String[] wordListOne = {"24/7", "Multi-tier", "30,000 foot", "B-to-B", "win-win", "front-end", "back-end", "web-based"};
String[] wordListTwo = {"empowered", "sticky", "concentric", "distributed", "leveraged", "shared", "accelerated", "aligned"};
String[] wordListThree = {"process", "tipping point", "mindshare", "mission", "space", "paradigm", "portal", "vision"};
// CALCULATE ARRAY LENGTHS
int oneLength = wordListOne.length;
int twoLength = wordListTwo.length;
int threeLength = wordListThree.length;
// PRINT OUT THE PHRASE
int i = 1;
while (i < 10) {
// GENERATE RANDOM NUMBERS
int rand1 = (int) (Math.random() * oneLength);
int rand2 = (int) (Math.random() * twoLength);
int rand3 = (int) (Math.random() * threeLength);
// BUILD A PHRASE
String phrase = wordListOne[rand1] + " " + wordListTwo[rand2] + " " + wordListThree[rand3];
// PRINT OUT PHRASE
System.out.println("What we need is a " + phrase + ".");
i = i + 1;
}
}
}
How to I get the compiled application to render as a web page? What steps do I need to take next?
Thanks!!!