属性を取得するとnullが含まれるが、割り当てた変数が値を取得するという問題があります
heresは、場所を渡す方法の前のページです。
<%if(rs.next()) {%>
<td><a href="university.jsp?location=<%=rs.getInt("cs_id")%>"><%out.print((String) (rs.getString("country_state")));%></a></td>
<%}else{ break; } %>
パラメータを取得していないページは次のとおりです。大学の州を選択するか、大学を入力してください:
<%
//set the session the each parameter
String locationString = request.getParameter("location");
Integer locationId = Integer.valueOf(locationString);
session.setAttribute("locationId",locationString);
System.out.print(locationString);
System.out.print(request.getAttribute("locationId"));
%>