Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのコードを使用していますが、非推奨です。JSP2.2への移植を手伝ってもらえますか?
<%= pageContext.getVariableResolver().resolveVariable("varName")%>
Javadocによると、変数リゾルバーを取得する新しい方法は次のとおりですjspContext.getELContext().getELResolver()。PageContextはJspContextであるため、行を<%=pageContext.getELContext().getELResolver().resolveVariable("varName")%>に変更できます。
jspContext.getELContext().getELResolver()
<%=pageContext.getELContext().getELResolver().resolveVariable("varName")
変数を解決するだけの場合は、代わりにEL構文を使用する必要があります${varName}。
${varName}