Vineet Kumar Garg wrote:After forwarding a request to a jsp from controller servlet
--- Why we shouldn't/can't pick request parameters passed from client inside jsp?
It depends if the same submitted request is being used. If so, then the parameters are still present. If you are using the PRG pattern, which is almost always appropriate, then the parameters are no longer present.
- why it's recommended to have the data set as attributes and then use it in JSP?
Again it depends on the data. Scoped variables (what you are calling attributes) are the most versatile way to convey data from the controller to the JSP.
Perhaps you should give this article a read.
It's not necessarily a bad practice in itself, but why you may have heard that it's not a good practice is because it may be the result of following something that is a bad practice: submitting a form to a JSP rather than a task controller.
See the article I linked to for more information.