0

Problem with servlet is that, I have to maintain consistency of names across HTML form and Servlet,

String data = request.getParameter(FIELD_NAME);

and

<input name=FIELD_NAME ...>

Is there any standard practice to avoid such inconsistency? Also is it possible to make servlet reusable, so that we can add new fields in form without modifying Servlet code?

Nilesh
  • 2,089
  • 3
  • 29
  • 53
  • This is among others where component based [MVC](http://stackoverflow.com/q/3541077) frameworks like [JSF](http://stackoverflow.com/tags/jsf/info) come into the picture. Perhaps it's time to pick and learn one? – BalusC Aug 11 '15 at 10:06
  • Thanks! Till I learn JSF, is there any quick solution? – Nilesh Aug 11 '15 at 10:09

0 Answers0