views:

26

answers:

1

Hello,

I understand how POST works but if for example the following GET request is made:

GET /index.jsp?page=home

How do I get the value, in this case home through to my java bean. i.e. using an MVC architecture?

Thanks

A: 

There's a lot of patterns to achieve this. My personal favorite is actually never to do GET or POST request on a jsp but always on a servlet. This servlet updates the beans, then forward the request to the adequate jsp. There's also a lot of frameworks seeking to simplify this process one way or another.

Maurice Perry