{"id":499,"date":"2013-05-23T18:18:23","date_gmt":"2013-05-23T10:18:23","guid":{"rendered":"http:\/\/inbreak.net\/?p=499"},"modified":"2013-05-23T18:22:10","modified_gmt":"2013-05-23T10:22:10","slug":"struts2-s2-013%e8%a1%a5%e4%b8%81","status":"publish","type":"post","link":"https:\/\/www.inbreak.net\/archives\/499.html","title":{"rendered":"struts2 s2-013\u8865\u4e01"},"content":{"rendered":"

\u6211\u670d\u4e86struts2\u7684\u5b98\u65b9\u4eba\u5458\uff0c\u4ed6\u4eec\u5347\u7ea7\u65b0\u7684\u7248\u672c\uff0c\u6211\u4ece\u6e90\u7801\u4e0a\u505a\u6587\u4ef6\u5bf9\u6bd4\uff0c\u4ee3\u7801\u6ca1\u6709\u505a\u4efb\u4f55\u53d8\u5316\u3002
\n\u770b\u6765\u6211\u8ba9\u5927\u5bb6\u7b49\u8865\u4e01\uff0c\u662f\u5751\u4e86\u5927\u5bb6\u3002
\n\u7591\u4f3cstruts2\u7684\u5f00\u53d1\u4eba\u5458\u7c97\u5fc3\uff0c\u6ca1\u628a\u65b0\u7248\u672c\u66f4\u65b0\uff0c\u53ea\u662f\u53d1\u5e03\u4e86\u7248\u672c\u53f7\u3002
\n\u53d1\u4e2a\u4e34\u65f6\u8865\u4e01\u7ed9\u5927\u5bb6\u9876\u4e00\u4e0b\u5427\u3002<\/p>\n

\r\n\u66ff\u6362package org.apache.struts2.views.util.DefaultUrlHelper\u8fd9\u4e2a\u7c7b\u7684\u4ee3\u7801\r\n\/\/    \/**\r\n\/\/     * \u8001\u7684\u8fd9\u90e8\u5206\u4ee3\u7801\u6ce8\u91ca\u6389\r\n\/\/     *\/\r\n\/\/    private String translateVariable(String input) {\r\n\/\/        ValueStack valueStack = ServletActionContext.getContext().getValueStack();\r\n\/\/        return TextParseUtil.translateVariables(input, valueStack);\r\n\/\/    }\r\n    \/**\r\n     * struts\u6f0f\u6d1e\u4e34\u65f6\u8865\u4e01\r\n     *\/\r\n    private String translateVariable(String input) {\r\n        return input;\r\n    }\r\n<\/pre>\n

\u5927\u5bb6\u53ef\u4ee5\u76f4\u63a5\u628a\u5b98\u65b9\u8fd9\u4e2a\u6587\u4ef6\u7684\u6e90\u7801\u62f7\u8d1d\u4e00\u4efd\uff0c\u5e76\u6309\u7167\u4ee5\u4e0a\u6b65\u9aa4\u4fee\u8865\uff0c\u7136\u540e\u628a\u6e90\u7801\u653e\u5728java\u9879\u76ee\u4e2d\uff0c\u5c31\u4f1a\u8986\u76d6\u5b98\u65b9\u6e90\u7801\u3002
\n\u539f\u7406\u662f\u7528\u6237\u7684\u6e90\u7801\u4f18\u4e8eJAR\u6267\u884c\uff0c\u6267\u884c\u540e\uff0c\u5c31\u4e0d\u518d\u6267\u884c\u5b98\u65b9\u6e90\u7801\uff0c\u76f8\u5f53\u4e8ehook\u3002
\n\u4fee\u8865\u540e\u7684\u72b6\u6001\u662f\u5bf9${\u4f60\u61c2\u5f97}\u5185\u5bb9\u4f5c\u4e00\u6b21URL\u7f16\u7801\uff0c\u4e4b\u540e\u8f93\u51fa\uff0c\u4e0d\u6267\u884c\u4efb\u4f55ognl\u8bed\u53e5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u6211\u670d\u4e86struts2\u7684\u5b98\u65b9\uff0c\u5347\u7ea7\u65b0\u7684\u7248\u672c\uff0c\u4ece\u6e90\u7801\u4e0a\u505a\u6587\u4ef6\u5bf9\u6bd4\uff0c\u4ee3\u7801\u6ca1\u6709\u505a\u4efb\u4f55\u53d8\u5316\u3002
\n\u770b\u6765\u6211\u8ba9\u5927\u5bb6\u7b49\u8865\u4e01\uff0c\u662f\u5751\u4e86\u5927\u5bb6\u3002
\n\u7591\u4f3cstruts2\u7684\u5f00\u53d1\u4eba\u5458\u7c97\u5fc3\uff0c\u6ca1\u628a\u65b0\u7248\u672c\u66f4\u65b0\uff0c\u53ea\u662f\u53d1\u5e03\u4e86\u7248\u672c\u53f7\u3002
\n\u53d1\u4e2a\u4e34\u65f6\u8865\u4e01\u7ed9\u5927\u5bb6\u9876\u4e00\u4e0b\u5427\u3002<\/p>\n

\u7ee7\u7eed\u9605\u8bfb »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[84,86,5],"tags":[70],"views":162139,"_links":{"self":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/499"}],"collection":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/comments?post=499"}],"version-history":[{"count":3,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/499\/revisions"}],"predecessor-version":[{"id":502,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/499\/revisions\/502"}],"wp:attachment":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/media?parent=499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/categories?post=499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/tags?post=499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}