Thursday, November 1, 2007

26.StackStripesExtension

The goal of this assignment was to gain some initial familiarity with new technologies including: Tomcat, JSP, JSTL, Stripes, and HttpUnit and to understand how to apply our previous experiences with Java, Ant, JUnit, PMD, FindBugs, Checkstyle, etc. to the domain of web application development.

What was difficult about this assignment?
I have completed all the tasks for this assignment, therefore I gained a lot of knowledge about building Web applications and using tools such as JSP, JSTL, and Stripes. The major task for this assignment was to understand how the index.jsp, StackActioanBean class, and the StackModel class all communicate and work together.
Now I understand that the index.jsp is the actual web page. When the user clicks on any button on that web page the index.jsp sends this information to the appropriate method in StackActionBean class. The code in the StackActionBean class calls methods in StackModel class, which perform the actual processing. After the call returns the StackActionBean class returns the modified index.jsp and it is displayed on to the web site. This was not hard to figure out but it was essential to understand this process before enhancing StackStripes.

What problems were encountered in carrying out the work
First of all, I made a really stupid mistake. The instructions in the assignment say: "If you are on Windows, you will also need to edit the file conf/context.xml file to change the <Context> tag to include the antiJARLocking and antiResourceLocking attributes as follows: <Context antiJARLocking="true" antiResourceLocking="true">" Even though it is very clear what to do, I just copied the line and inserted it between the already existing <Context> </Context> tags. That is why I was not able to connect to http://localhost:8080 and had to trace all the installation tasks back to figure out the problem. My bad, it took me an additional hour to figure that bug out. In addition, when I wrote test code for the stack pop method, I realized that the stack still contained values which were pushed onto the stack in a previously called test method. I tired to solve it by getting an instance of the stack and calling the stack clear method but this did not work. So, I decide to leave the values for testing the pop method.

No comments: