Access request parameters from JSP View in Spring Web MVC without putting them in the model

I would like to access some HTTP GET parameters directly in the JSP without passing them through Controller + Model, but at the same time I still use the dispatcher / controller / model / view mechanism for other parameters and logic.

This is because I have many HTTP GET parameters that are generated by Javascript and are also used only in Javascript. They don’t need my controllers at all.

I tried ${arg}, ${request.arg}, ${requestScope.arg}, nothing works.

If I bypass the dispatcher, it ${requestScope.arg}works.

But is there a way to make it work with the dispatcher?

Thank!

+5
source share
1 answer

, ( , ), ${param.parameterName}.

, ${requestScope.attributeName}.

. http://java.sun.com/products/jsp/syntax/2.0/syntaxref207.html#1010522 .

+8

All Articles