开发者

JavaBeans JSP dealing with GET requests

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜