Javascript 处理jsp会话值时href的开始和结束引号不匹配

Javascript 处理jsp会话值时href的开始和结束引号不匹配,javascript,jsp,anchor,href,Javascript,Jsp,Anchor,Href,我正在开发一个jsp应用程序。我的会话中有一个用户对象 从jsp中,我可以成功访问以下值- userType = ${USER.type}; editPermission = ${USER.hasPermission['editPermission']; //case 1. 这里的hasPermission是Map。在情况1中,它返回true/false。但是当我在 提前感谢。此变量在此上下文中不计算 你喜欢这样吗 <a href="#tab" onclick="window.loc

我正在开发一个jsp应用程序。我的
会话中有一个
用户
对象
从jsp中,我可以成功访问以下值-

userType = ${USER.type};
editPermission = ${USER.hasPermission['editPermission'];  //case 1.
这里的
hasPermission
Map
。在情况1中,它返回true/false。但是当我在


提前感谢。

此变量在此上下文中不计算

你喜欢这样吗

<a href="#tab" onclick="window.location.href='.../home.do?tbNam=all&userType=' + ${USER.type} + '&editPermission=' + ${USER.hasPermission['editPermission']} + ';'>All</a>


我认为您缺少“${USER.hasPermission['editPermission']”后面的“}”结束括号。请检查that@Ramkumar,谢谢你的发现。这是一个我已经纠正过的错误。但是在我的代码中有“}”,你可以使用转义序列“\”。请检查此项onclick=“window.location.href=\”../home.do?tbNam=all&userType=${USER.type}&editPermission=${USER.hasPermission['editPermission']}\”
<a href="#tab" onclick="window.location.href='.../home.do?tbNam=all&userType=' + ${USER.type} + '&editPermission=' + ${USER.hasPermission['editPermission']} + ';'>All</a>