当前位置: 代码迷 >> JavaScript >> JSTL标签跟Struts标签的对应参照
  详细解决方案

JSTL标签跟Struts标签的对应参照

热度:108   发布时间:2012-11-13 10:00:51.0
JSTL标签和Struts标签的对应参照
Java代码 复制代码
  1. <bean:cookie?id="category"?name="cat"/> ??
  2. 替换 ??
  3. <c:set?var="category"?value="${cookie[''cat''].value}"/> ??
  4. ------------------------------------------- ??
  5. <bean:define="name"?value="ObjName"/> ??
  6. 替换 ??
  7. <c:set?var="name"?value="${ObjName}"/> ??
  8. ------------------------------------------- ??
  9. <bean:header?id="browser"?name="User-Agent"/> ??
  10. 替换 ??
  11. <c:set?var="browser"?value="${header[''User-Agent'']}"/> ??
  12. ------------------------------------------- ??
  13. <bean:include?id="yahooContents"?href="?http://www.yahoo.com/"/?> ??
  14. 替换 ??
  15. <c:import?var="yahooContents"?url="?http://www.yahoo.com/?"/> ??
  16. -------------------------------------------- ??
  17. <bean:parameter?id="color"?name="clr"/> ??
  18. 替换 ??
  19. <c:set?var="color"?value="${param[''clr'']}"/> ??
  20. -------------------------------------------- ??
  21. <bean:write?name="ObjName"/> ??
  22. 替换 ??
  23. <c:out?value="${ObjName}"/> ??
  24. -------------------------------------------- ??
  25. <logic:empty?name="results"/> ??
  26. Your?value?is?empty ??
  27. </logic> ??
  28. 替换 ??
  29. <c:if?test="${empty?results}"> ??
  30. Your?value?is?empty ??
  31. </c:if> ??
  32. -------------------------------------------- ??
  33. <logic:equal?name="val"?value="0"> ??
  34. val=0??
  35. </logic:equal> ??
  36. 替换 ??
  37. <c:if?test="${value==0}"> ??
  38. val=0??
  39. <c:if> ??
  40. -------------------------------------------- ??
  41. <logic:greaterEqual?name="count"?value="5"> ??
  42. Count?is?greater?than?or?equal?to?five ??
  43. </logic:greaterEqual> ??
  44. 替换 ??
  45. <c:if?test="${count>=5}"> ??
  46. Count?is?greater?than?or?equal?to?five ??
  47. </c:if> ??
  48. -------------------------------------------- ??
  49. <logic:iterate?id="result"?collection="<%=results%>"> ??
  50. Result:<%=result%><bt> ??
  51. </logic:iterate> ??
  52. 替换 ??
  53. <c:forEach?var="result"?items="${results}"> ??
  54. Result:<c:out?value="${result}"/> ??
  55. </c:forEach> ??
  56. -------------------------------------------- ??
  57. <logic:notEmpty?name="results"> ??
  58. Results?is?not?empty ??
  59. </logic:notEmpty> ??
  60. 替换 ??
  61. <c:if?test="${!empty?results}"> ??
  62. Results?is?not?empty ??
  63. </c:if> ??
  64. --------------------------------------------- ??
  65. <logic:notEqual?name="count"?value="0"> ??
  66. Count?is?not?equal?to?zero ??
  67. </logic:notEqual> ??
  68. 替换 ??
  69. <c:if?test="${count!=0}"> ??
  70. Count?is?not?equal?to?zero ??
  71. </c:if>??
  相关解决方案