次のコードがあります
<%
String projectId = request.getParameter("projectId");
%>
<iframe width="100%" id="uploadFrame"
src="testframe.jsp?projectId=<%=projectId %>"></iframe></body>
</html>
そしてtestframe.jspでは、セッション値を次のように設定しています
<%
String projectId = request.getParameter("projectId");
request.getSession(true).setAttribute("prj",projectId);
%>
最後に、サーブレットで、doGet メソッドでセッション値を取得しています。
String prjId = request.getSession(false).getAttribute("prj").toString();
私が直面している問題は、doGet メソッドでセッション値が常にrequest.getParameter("projectId")
null になるわけではありませんが、testframe.jsp では null ではありません。
この理由は何でしょうか?