本文整理了Java中org.kohsuke.stapler.StaplerRequest.setCharacterEncoding()
方法的一些代码示例,展示了StaplerRequest.setCharacterEncoding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StaplerRequest.setCharacterEncoding()
方法的具体详情如下:
包路径:org.kohsuke.stapler.StaplerRequest
类名称:StaplerRequest
方法名:setCharacterEncoding
暂无
代码示例来源:origin: jenkinsci/role-strategy-plugin
/**
* Called on role management form's submission.
*/
@RequirePOST
@Restricted(NoExternalUse.class)
public void doRolesSubmit(StaplerRequest req, StaplerResponse rsp) throws UnsupportedEncodingException, ServletException, FormException, IOException {
checkAdminPerm();
req.setCharacterEncoding("UTF-8");
JSONObject json = req.getSubmittedForm();
AuthorizationStrategy strategy = this.newInstance(req, json);
instance().setAuthorizationStrategy(strategy);
// Persist the data
persistChanges();
}
代码示例来源:origin: jenkinsci/role-strategy-plugin
checkAdminPerm();
req.setCharacterEncoding("UTF-8");
JSONObject json = req.getSubmittedForm();
AuthorizationStrategy oldStrategy = instance().getAuthorizationStrategy();
代码示例来源:origin: org.jvnet.hudson.plugins/dashboard-view
@Override
protected synchronized void submit(StaplerRequest req) throws IOException,
ServletException, FormException {
super.submit(req);
try {
req.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException ex) {
Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);
}
JSONObject json = req.getSubmittedForm();
String sIncludeStdJobList = Util.nullify(req.getParameter("includeStdJobList"));
includeStdJobList = sIncludeStdJobList != null && "on".equals(sIncludeStdJobList);
String sUseCssStyle = Util.nullify(req.getParameter("useCssStyle"));
useCssStyle = sUseCssStyle != null && "on".equals(sUseCssStyle);
if (useCssStyle) {
if (req.getParameter("leftPortletWidth") != null) {
leftPortletWidth = req.getParameter("leftPortletWidth");
}
if (req.getParameter("rightPortletWidth") != null) {
rightPortletWidth = req.getParameter("rightPortletWidth");
}
}
else {
leftPortletWidth = rightPortletWidth = "50%";
}
topPortlets = Descriptor.newInstancesFromHeteroList(req, json, "topPortlet", DashboardPortlet.all());
leftPortlets = Descriptor.newInstancesFromHeteroList(req, json, "leftPortlet", DashboardPortlet.all());
rightPortlets = Descriptor.newInstancesFromHeteroList(req, json, "rightPortlet", DashboardPortlet.all());
bottomPortlets = Descriptor.newInstancesFromHeteroList(req, json, "bottomPortlet", DashboardPortlet.all());
}
代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder
checkPermission(CONFIGURE);
req.setCharacterEncoding("UTF-8");
JSONObject json = req.getSubmittedForm();
代码示例来源:origin: jenkinsci/cloudbees-folder-plugin
checkPermission(CONFIGURE);
req.setCharacterEncoding("UTF-8");
JSONObject json = req.getSubmittedForm();
内容来源于网络,如有侵权,请联系作者删除!