gt; request.setAttribute("", rslt.toString()); //this name is unknown, i
> dont
> >> know what to put here
> >> return null;
> >>
> >>
> >> what did i do wrong/ didnt do? tnx a lot
> >> --
> >> View this message in context:
>
ME/
>>
>> Struts Action execute code
>>
>> JSONArray list = new JSONArray();
>> JSONObject obj = new JSONObject();
>> while(result.next()) {
>> obj.put("uid", result.getInt("departmentID"));
>>
Doh! Sorry.
On Jan 22, 2008 4:21 PM, Dale Newfield <[EMAIL PROTECTED]> wrote:
> James Mitchell wrote:
> > Take a look at this page:
> > http://cwiki.apache.org/S2PLUGINS/json-plugin.html
>
> The OP specified struts1 in the subject.
>
> -Dale
>
>
>
James Mitchell wrote:
Take a look at this page:
http://cwiki.apache.org/S2PLUGINS/json-plugin.html
The OP specified struts1 in the subject.
-Dale
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
", result.getInt("departmentID"));
> obj.put("name", result.getString("name"));
> list.put(obj);
> }
> JSONObject rslt = new JSONObject();
> rslt.put ("total", list.length());
> rslt.put("list", list);
> request.setAt
ist = new JSONArray();
> JSONObject obj = new JSONObject();
> while(result.next()) {
> obj.put("uid", result.getInt("departmentID"));
> obj.put("name", result.getString("name"));
> list.put(obj);
> }
> JSONObject rslt = new JSO
esult.getInt("departmentID"));
obj.put("name", result.getString("name"));
list.put(obj);
}
JSONObject rslt = new JSONObject();
rslt.put ("total", list.length());
rslt.put("list", list);
request.setAttribute("", rslt.toString()); //this name is
7 matches
Mail list logo