7
我被困在下面的代碼中。在JSP頁面上,我想根據瀏覽器接受的終端來編寫不同的內容。終值被適當地設置在控制器中,但執行以下代碼,所有的3c中時:如果條件被認爲是有效的和三個語句就顯示出來<c:if test= >始終爲真
<c:if test="${terminal=='android'}">
<p>you are on android</p>
</c:if>
<c:if test="${terminal=='iphone'}">
<p>you are on iphone </p>
</c:if>
<c:if test="${terminal=='other'}">
<p>you are on an other terminal </p>
</c:if>
要檢查條件是否是好的,我添加了下面的代碼從Android訪問時給予正確的真,假,假的..提前
<p> ${terminal=='android'}</p>
<p>${terminal=='iphone'}</p>
<p>${terminal=='other'}</p>
感謝