Information Systems 300

idiotdiscΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 2 μήνες)

182 εμφανίσεις

MSIS 531


Spring 2006

Exercise Set
2

This exercise set

offers an opportunity to explore the MyPetstore project in NetBeans and MySQL
.

Setup:



Ensure that both MySQL and NetBeans are started, then run the MyPetstore project and ensure
that the start page appears.



You may find it
useful to look at the “Files” view in NetBeans, which gives a file system view of all
files in the project (the “Project” view hides certain files). To open this view, select Window
-
>Files
from the NetBeans menus, or press Ctrl
-
2. The Files window will app
ear along with Project and
Runtime windows on the left
-
hand side of the screen.



If you have an “orig” directory in your project, it can be deleted; right
-
click it and select Delete
from the contect menu.

Questions:

1.

How does NetBeans know which jsp to start

up when the application is invoked? Be specific on the
location where this configuration information is stored, and include a list of other legal “startup file
names” for this project.


2.

This project uses Struts Tiles to manage common display elements lik
e headers and footers.
Which file stores the main Tiles layout information?


3.

In account.jsp at the root of the Web Pages tree, what does the “.mainLayout” definition refer to?


4.

In this project, where is the MySQL database connection information stored? G
iven the structure
of the application, why is it important to place it there?


answer

answer

answer

answer

MSIS 531


Spring 2006

5.

The JSF configuration for this project is different than we’ve seen previously. Briefly discuss these
differences, and give the location where the JSF configuration is specifie
d.


6.

Briefly describe the function of the log4j.properties file found in the default package under Source
Packages.


7.

Where are the Hibernate mapping files for this project stored, and why does it make sense to put
them there?


8.

What does the term “depende
nt object” mean in Hibernate terms? Think about this question with
regard to the ERD that might be generated from the MySQL database.


9.

Briefly describe the difference between the CatalogService and CatalogServiceImpl classes.


10.

What is the default URL ext
ension for this project (in the past we have seen “.faces” and “.jhtml”).
Where is this information found?


11.

How does the Tomcat web server embedded in NetBeans know to use “/mypetstore” as the web
application name?


answer

answer

xx

answer

answer

answer

answer

MSIS 531


Spring 2006

12.

How does the application know where to

find the correct image from the “images” folder? (Hint:
start up the MySQL query explorer, msis531/g3tm3data, and look around in there.)


13.

Where are references to the CSS stylesheet (stylesheet.css) made in the project? How is this
design choice of benefi
t?


14.

What does the Sequence class in mypetstore.model.dao.helper do, and why is it there?


15.

Of the 45 classes implemented for this project, which ones “know” they are running
in the Spring
framework? (Hint: do a Windows search on the Java sources for “spri
ngframework”.) Comment
briefly on the uses Spring is put to (hint: Google the Spring classes used to see what they do).


16.

There is only one message bundle implemented for this project. If a developer wanted to add
localization support, what changes would n
eed to be made to the project to accommodate this
requirement? (Hint: look in the configuration files).


17.

In the Java source files for this project, what effect do comments that start with “/**” have?



answer

answer

answer

answer

answer

answer