Code Review - looking for best practices

E

Ed Thompson

After the past few months I have learned a lot about the MVC pattern and
JSTL. I have been re-writing a little home grown webapp (under Tomcat)
using Maverick to implement MVC, and just started using Tag Libs (JSTL).

All has been going well until I reached the attached JSP. This
represents a form to be used to Add/Edit a Title, or Add/Edit a
Title/Series, and as such, has a lot of conditional code.

I am trying to figure out the best way to refactor the conditional code:

1) leave as is - embedded servlet code
2) move to controller servlet
3) use JSTL to address
4) other? (e.g. separate forms)


I have been able to refactor other pages to move almost all the code to
the servlet, with minimal use of JSTL and no embedded Java. This is my
first attempt at refactoring one of two complex forms I designed.

All suggestions welcome. trying to learn best design, so level of
effort is not this issue (otherwise I would not ask - it works now).

The JSP page is attached. I am mostly interested in best design for lines:
17-23
37-44
70


Thanx for the input of the community!

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top