|
在java文件中使用了下面的动作
public static JSONObject login(HttpServletRequest request, HttpServletResponse response, JSONObject params, ActionContext context) throws SQLException, NamingException, IOException {
我要怎么修改_do.java文件才能正常调用这个动作尼,不修改直接编译baas会出错,下面是do文件中的代码,
public static JSONObject login(JSONObject params, ActionContext context) throws Exception{
boolean selfContext = null==context;
if(selfContext) context = new ActionContext(getDBConfig());
if(params.containsKey(ActionContext.REQUEST)) context.put(ActionContext.REQUEST, params.get(ActionContext.REQUEST));
if(params.containsKey(ActionContext.RESPONSE)) context.put(ActionContext.RESPONSE, params.get(ActionContext.RESPONSE));
byte[] privateParamBytes = {123,125};
JSONObject privateParams = JSONObject.parseObject(new String(privateParamBytes,"UTF-8"));
byte[] publicParamBytes = {123,125};
JSONObject publicParams = JSONObject.parseObject(new String(publicParamBytes,"UTF-8"));
//进行参数处理
initActionParams(privateParams,publicParams,params);
try{
try {
JSONObject ret = Happy.login(params, context);
if(selfContext) context.commit();
return ret;
}catch (Exception e){
try {
if(selfContext) context.rollback();
} catch (SQLException e1) {
}
throw e;
}
} finally {
if(selfContext) context.closeConnection();
}
}
|
|