This exercise set
offers an opportunity to explore the MyPetstore project in NetBeans and MySQL
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
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.
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.
This project uses Struts Tiles to manage common display elements lik
e headers and footers.
Which file stores the main Tiles layout information?
In account.jsp at the root of the Web Pages tree, what does the “.mainLayout” definition refer to?
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?
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
Briefly describe the function of the log4j.properties file found in the default package under Source
Where are the Hibernate mapping files for this project stored, and why does it make sense to put
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.
Briefly describe the difference between the CatalogService and CatalogServiceImpl classes.
What is the default URL ext
ension for this project (in the past we have seen “.faces” and “.jhtml”).
Where is this information found?
How does the Tomcat web server embedded in NetBeans know to use “/mypetstore” as the web
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.)
Where are references to the CSS stylesheet (stylesheet.css) made in the project? How is this
design choice of benefi
What does the Sequence class in mypetstore.model.dao.helper do, and why is it there?
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
briefly on the uses Spring is put to (hint: Google the Spring classes used to see what they do).
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).
In the Java source files for this project, what effect do comments that start with “/**” have?