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
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