Friday 7 October 2011

Java assignment to generate web page?

I am in a java class and have to use Eclipse. I am finding I hate Eclipse because it's always prompting me to change the answers by itself which breaks all the other lines of code. It also isn't telling me what is wrong.



Anyway, the assignment is this:



create a Java program called %26quot;WebPageGenerator%26quot; that will do the following:



* Ask the user for their name

* Ask the user for the name of an image file

* Ask the user for their homepage URL

* Use the information entered by the user to dynamically build a simple Web page file called %26quot;index.html%26quot;. That Web page should have a non-white background color and use a non-black text color. It should simply contain:

o the name entered by the user in large type

o the image whose file was entered by the user

o the image should have a link, sending the user to the user's homepage



I have the first message box popping up that asks for the user's name, but I need a place for the variable to be stored.



The instructions say to use PrintWriter. When I try to add print writer as an imported package eclipse doesn't like it. I can't add that under the JOptionPane that gets input for the first question?



I don't know how to add printwriter and I don't know how to get multiple boxes to collect user's input. I can't find resources on the java site or googling.



Thank you.Java assignment to generate web page?THIS HAS NOTHING TO DO WITH THIS QUESTION LOL... I just wanted to say THANX!! For the great advice on my question you made me feel SOOOOOOOOOOO much better! your tha best! =]
Java assignment to generate web page?
dude, this is a cakewalk.



do you know html??? if so..



build a string that is the code for the html webpage. you can get all the variables and enter them as you need them.



then all you have to do is save the file as a .htm



super easy



btw, i hate Eclipse too