开发者

Using request object parameter as a name of application scope attriubte in JSP

I have a request object with String attribute name1. When request is sent to JSP I would like to use name1 parameter as a name of application scope bean to retrieve its status. I have tried

 <jsp:getProperty name="${name开发者_高级运维1}" property="status" />

and

${${objName}.status}

and

${applicationScope.${objName}.status}

but it does not work.


You cannot nest EL expressions. It's one expression. Use the brace notation.

${applicationScope[objName].status}

See also:

  • Hidden features of JSP/Servlet
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜