TechnoBuzz

A Techno Blog, mainly about Java

Validation

Should we do the validation on client or on the server.

Anything web or browser specific should be done on the client.

Otherwise, we should do it on the server side.

Typically, Business Objects can be called from non-web entities. Therefore, having validation there is a good idea.

May 3, 2005 Posted by | J2EE | Leave a comment

Forward versus redirect

link

Forward

  • forward is performed internally by the servlet
  • the browser is completely unaware that it has taken place, so its original URL remains intact
  • any browser reload will simple repeat the original request, with the original URL

Redirect

  • redirect is a two step process, where the web application instructs the browser to fetch a second URL, which differs from the original
  • a browser reload of the second URL will not repeat the original request, but will rather fetch the second URL
  • redirect is always slower than a forward, since it requires a second browser request
  • beans placed in the original request scope are not available to the second request

May 3, 2005 Posted by | J2EE | Leave a comment