SIMS 255: Lab 7

November 6, 2003

JSP

In today's lab we will get a simple jsp page running that will accept text from the user and reverse the word using the code you wrote for Assignment 5. See our example.

Step 1: Create Message.java

Message.java should:

Once your class has all of the above and compiles, write a main with hardcoded values to quickly test that your get and set methods are working correctly and reversing the string.

When your class methods are working correctly and compile with no errors, create a folder that is the same name as your package name (username) in your public_html.jsp/WEB-INF/classes/ and place your compiled Message.class file in it.

Step 2: Create the JSP page

Save this file Message.jsp to your public_html.jsp folder (right-click on the link and choose "Save target as...").

Open it and change the class name to use your class file. The format is class="packageName.className".

In a web browser go to: http://dream.sims.berkeley.edu:8080/[USERNAME]/Message.jsp and test your page.

Take the time to look over the jsp file and make sure you understand how it works and what each line does.


NF,JM -- last modified 11/6/03