• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question on re-using jsp pages.

 
chandru ram
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Consider an application that has many different flows like addition,modification of a record etc.Each flow has to show a jsp page in different ways. for ex consider the following:

there is a page jsp1.jsp.If the flow is addition of a record, the jsp1 should show some values as text boxes and drop-downs.But if the flow is modification then the jsp1 should show the same fields as lables instead of textboxes.


If the number of such conditions are more then it results in lot of if-else conditions in the jsp page.If we write two separate jsp pages one for addition flow and one for modification flow (e.g jsp1_add.jsp and jsp1_mod.jsp) then if there is a change like adding a new field etc, then it has to be done at two places.

So what is the best solution for this.Does using Tiles solve this.

Thanks in advance,
Chandru ram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic