Author Login
Post Reply
user Digest 5 Mar 2010 09:27:36 -0000 Issue 9019
Topics (messages 205228 through 205256):
Re: Struts2 JQuery select box
205228 by: nani2ratna
205229 by: Johannes Geppert
205230 by: nani2ratna
205231 by: Johannes Geppert
205232 by: nani2ratna
205233 by: Johannes Geppert
205234 by: nani2ratna
205235 by: Johannes Geppert
205254 by: nani2ratna
Passing parameters to <s:property>
205236 by: Ricardo Jorge
205237 by: Lukasz Lenart
205238 by: Ricardo Jorge
205239 by: Lukasz Lenart
205240 by: adam pinder
205241 by: adam pinder
jsp out to a differnet outputstream
205242 by: abhishek jain
205243 by: Dale Newfield
205245 by: abhishek jain
205253 by: adam pinder
205256 by: abhishek jain
Form submit always redirects to the action page instead of the target div
205244 by: Jose A. Corbacho
205247 by: Johannes Geppert
Re: WARNING: No configuration found for the specified action:
205246 by: sgupta4686
205248 by: sgupta4686
205249 by: Jose A. Corbacho
205250 by: sgupta4686
205251 by: sgupta4686
logic bean iterator
205252 by: abhishek jain
Re: Struts 2, Log4J and turning off WARNING messages
205255 by: Raghuveer
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_205228.ezm (zipped)
Hi Johanes,
Thanks for reply.
Actually I am very new to JSON.
Action is working fine.
I went through your code and redid the same type stuff in my app.
I don't know about JSON reponse.
Since in your action class there no result(jsp) mapped.
So I too did the same. I am just executing the action method. And I don't
know how to send response.
Can you please explain or send me some links.
So i can read and do that.
Thanks in advance
RS
Johannes Geppert wrote:
>
> Hello,
>
> did your JSON Actions works fine?
>
> Check if you really get an JSON response and the
> variables inside the result have the same name.
>
> Can you please POST your result with sample data?
>
> Best Regards
>
> Johannes Geppert
>
>
> nani2ratna wrote:
>>
>> Hi,
>>
>> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
>> select box.
>> I just followed this link
>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>
>> Every thing is executing fine.
>> But the list not loading properly.
>> I am new to JSON.
>>
>> I changed below jsp page which was working fine with normal select box.
>>
>> my code is
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205229.ezm (zipped)
you can just execute your action like a normal action.
http://localhost:8080/app/json.action
The result should be a normal textfile which you can open
with notepad or whatever you want.
Also you can use Firebug "Network/XHR" to see your action response
Best Regards
Johannes Geppert
nani2ratna wrote:
>
> Hi Johanes,
>
> Thanks for reply.
> Actually I am very new to JSON.
> Action is working fine.
>
> I went through your code and redid the same type stuff in my app.
> I don't know about JSON reponse.
> Since in your action class there no result(jsp) mapped.
> So I too did the same. I am just executing the action method. And I don't
> know how to send response.
>
> Can you please explain or send me some links.
> So i can read and do that.
>
> Thanks in advance
> RS
>
>
>
> Johannes Geppert wrote:
>>
>> Hello,
>>
>> did your JSON Actions works fine?
>>
>> Check if you really get an JSON response and the
>> variables inside the result have the same name.
>>
>> Can you please POST your result with sample data?
>>
>> Best Regards
>>
>> Johannes Geppert
>>
>>
>> nani2ratna wrote:
>>>
>>> Hi,
>>>
>>> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
>>> select box.
>>> I just followed this link
>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>
>>> Every thing is executing fine.
>>> But the list not loading properly.
>>> I am new to JSON.
>>>
>>> I changed below jsp page which was working fine with normal select box.
>>>
>>> my code is
>>>
>>
>>
>
>
-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205230.ezm (zipped)HI,
Thank you.
I executed the action.
It gave me the following exception
java.lang.IllegalAccessException: Class
org.apache.struts2.json.JSONWritercan not access a member of class
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with
modifiers "public"
sun.reflect.Reflection.ensureMemberAccess (
Reflection.java:65)
java.lang.reflect.Method.invoke (
Method.java:588)
org.apache.struts2.json.JSONWriter.bean (
JSONWriter.java:227)
org.apache.struts2.json.JSONWriter.process (
JSONWriter.java:165)
org.apache.struts2.json.JSONWriter.value (
JSONWriter.java:131)
Thanks and Regards
RS
Johannes Geppert wrote:
>
> you can just execute your action like a normal action.
>
> http://localhost:8080/app/json.action
>
> The result should be a normal textfile which you can open
> with notepad or whatever you want.
>
> Also you can use Firebug "Network/XHR" to see your action response
>
> Best Regards
>
> Johannes Geppert
>
>
> nani2ratna wrote:
>>
>> Hi Johanes,
>>
>> Thanks for reply.
>> Actually I am very new to JSON.
>> Action is working fine.
>>
>> I went through your code and redid the same type stuff in my app.
>> I don't know about JSON reponse.
>> Since in your action class there no result(jsp) mapped.
>> So I too did the same. I am just executing the action method. And I don't
>> know how to send response.
>>
>> Can you please explain or send me some links.
>> So i can read and do that.
>>
>> Thanks in advance
>> RS
>>
>>
>>
>> Johannes Geppert wrote:
>>>
>>> Hello,
>>>
>>> did your JSON Actions works fine?
>>>
>>> Check if you really get an JSON response and the
>>> variables inside the result have the same name.
>>>
>>> Can you please POST your result with sample data?
>>>
>>> Best Regards
>>>
>>> Johannes Geppert
>>>
>>>
>>> nani2ratna wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
>>>> select box.
>>>> I just followed this link
>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>>
>>>> Every thing is executing fine.
>>>> But the list not loading properly.
>>>> I am new to JSON.
>>>>
>>>> I changed below jsp page which was working fine with normal select box.
>>>>
>>>> my code is
>>>>
>>>
>>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205231.ezm (zipped)
Attachment:
user_205232.ezm (zipped)HI,
I am trying to get this object
List<ProdmProdcat> prodcatList = new ArrayList<prodmProdcat>();
ProdmProdcat is a java bean which got two properties.
they are String prodcat_code;
and String prodcat_desc;
Is this object fine.
Thanks and Regards
RS
nani2ratna wrote:
>
> HI,
>
> Thank you.
> I executed the action.
> It gave me the following exception
>
>
java.lang.IllegalAccessException: Class
org.apache.struts2.json.JSONWriter> can not access a member of class
>
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with
> modifiers "public"
>
sun.reflect.Reflection.ensureMemberAccess (
Reflection.java:65)
>
java.lang.reflect.Method.invoke (
Method.java:588)
>
org.apache.struts2.json.JSONWriter.bean (
JSONWriter.java:227)
>
org.apache.struts2.json.JSONWriter.process (
JSONWriter.java:165)
>
org.apache.struts2.json.JSONWriter.value (
JSONWriter.java:131)
>
> Thanks and Regards
> RS
>
>
>
> Johannes Geppert wrote:
>>
>> you can just execute your action like a normal action.
>>
>> http://localhost:8080/app/json.action
>>
>> The result should be a normal textfile which you can open
>> with notepad or whatever you want.
>>
>> Also you can use Firebug "Network/XHR" to see your action response
>>
>> Best Regards
>>
>> Johannes Geppert
>>
>>
>> nani2ratna wrote:
>>>
>>> Hi Johanes,
>>>
>>> Thanks for reply.
>>> Actually I am very new to JSON.
>>> Action is working fine.
>>>
>>> I went through your code and redid the same type stuff in my app.
>>> I don't know about JSON reponse.
>>> Since in your action class there no result(jsp) mapped.
>>> So I too did the same. I am just executing the action method. And I
>>> don't know how to send response.
>>>
>>> Can you please explain or send me some links.
>>> So i can read and do that.
>>>
>>> Thanks in advance
>>> RS
>>>
>>>
>>>
>>> Johannes Geppert wrote:
>>>>
>>>> Hello,
>>>>
>>>> did your JSON Actions works fine?
>>>>
>>>> Check if you really get an JSON response and the
>>>> variables inside the result have the same name.
>>>>
>>>> Can you please POST your result with sample data?
>>>>
>>>> Best Regards
>>>>
>>>> Johannes Geppert
>>>>
>>>>
>>>> nani2ratna wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for
>>>>> loading select box.
>>>>> I just followed this link
>>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>>>
>>>>> Every thing is executing fine.
>>>>> But the list not loading properly.
>>>>> I am new to JSON.
>>>>>
>>>>> I changed below jsp page which was working fine with normal select
>>>>> box.
>>>>>
>>>>> my code is
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205233.ezm (zipped)did you work with hibernate?
I found this post that maybe helps you out.
http://www.codeweblog.com/solution-struts2-hibernate-integration-with-jsonpulugin-an-exception-when/
Best Regards
Johannes Geppert.
nani2ratna wrote:
>
> HI,
>
> I am trying to get this object
> List<ProdmProdcat> prodcatList = new ArrayList<prodmProdcat>();
> ProdmProdcat is a java bean which got two properties.
> they are String prodcat_code;
> and String prodcat_desc;
>
> Is this object fine.
>
> Thanks and Regards
> RS
>
>
> nani2ratna wrote:
>>
>> HI,
>>
>> Thank you.
>> I executed the action.
>> It gave me the following exception
>>
>>
java.lang.IllegalAccessException: Class
>>
org.apache.struts2.json.JSONWriter can not access a member of class
>>
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with
>> modifiers "public"
>>
sun.reflect.Reflection.ensureMemberAccess (
Reflection.java:65)
>>
java.lang.reflect.Method.invoke (
Method.java:588)
>>
org.apache.struts2.json.JSONWriter.bean (
JSONWriter.java:227)
>>
org.apache.struts2.json.JSONWriter.process (
JSONWriter.java:165)
>>
org.apache.struts2.json.JSONWriter.value (
JSONWriter.java:131)
>>
>> Thanks and Regards
>> RS
>>
>>
>>
>> Johannes Geppert wrote:
>>>
>>> you can just execute your action like a normal action.
>>>
>>> http://localhost:8080/app/json.action
>>>
>>> The result should be a normal textfile which you can open
>>> with notepad or whatever you want.
>>>
>>> Also you can use Firebug "Network/XHR" to see your action response
>>>
>>> Best Regards
>>>
>>> Johannes Geppert
>>>
>>>
>>> nani2ratna wrote:
>>>>
>>>> Hi Johanes,
>>>>
>>>> Thanks for reply.
>>>> Actually I am very new to JSON.
>>>> Action is working fine.
>>>>
>>>> I went through your code and redid the same type stuff in my app.
>>>> I don't know about JSON reponse.
>>>> Since in your action class there no result(jsp) mapped.
>>>> So I too did the same. I am just executing the action method. And I
>>>> don't know how to send response.
>>>>
>>>> Can you please explain or send me some links.
>>>> So i can read and do that.
>>>>
>>>> Thanks in advance
>>>> RS
>>>>
>>>>
>>>>
>>>> Johannes Geppert wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> did your JSON Actions works fine?
>>>>>
>>>>> Check if you really get an JSON response and the
>>>>> variables inside the result have the same name.
>>>>>
>>>>> Can you please POST your result with sample data?
>>>>>
>>>>> Best Regards
>>>>>
>>>>> Johannes Geppert
>>>>>
>>>>>
>>>>> nani2ratna wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for
>>>>>> loading select box.
>>>>>> I just followed this link
>>>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>>>>
>>>>>> Every thing is executing fine.
>>>>>> But the list not loading properly.
>>>>>> I am new to JSON.
>>>>>>
>>>>>> I changed below jsp page which was working fine with normal select
>>>>>> box.
>>>>>>
>>>>>> my code is
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205234.ezm (zipped)Hi Johannes,
I saw that one earlier.
I found the bug.
I have another property in my action class which is service class.
So i excluded that service class from json.
Now its working fine.
I did this one,
@Actions( {
@Action(value = "/JsonAction", results = {
@Result(name = "success", type = "json", params =
{"excludeProperties", "prodmDatPmService"} )
})
})
But how to exclude more than one property.
Thanks and Regards
RS
nani2ratna wrote:
>
> HI,
>
> I am trying to get this object
> List<ProdmProdcat> prodcatList = new ArrayList<prodmProdcat>();
> ProdmProdcat is a java bean which got two properties.
> they are String prodcat_code;
> and String prodcat_desc;
>
> Is this object fine.
>
> Thanks and Regards
> RS
>
>
> nani2ratna wrote:
>>
>> HI,
>>
>> Thank you.
>> I executed the action.
>> It gave me the following exception
>>
>>
java.lang.IllegalAccessException: Class
>>
org.apache.struts2.json.JSONWriter can not access a member of class
>>
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper with
>> modifiers "public"
>>
sun.reflect.Reflection.ensureMemberAccess (
Reflection.java:65)
>>
java.lang.reflect.Method.invoke (
Method.java:588)
>>
org.apache.struts2.json.JSONWriter.bean (
JSONWriter.java:227)
>>
org.apache.struts2.json.JSONWriter.process (
JSONWriter.java:165)
>>
org.apache.struts2.json.JSONWriter.value (
JSONWriter.java:131)
>>
>> Thanks and Regards
>> RS
>>
>>
>>
>> Johannes Geppert wrote:
>>>
>>> you can just execute your action like a normal action.
>>>
>>> http://localhost:8080/app/json.action
>>>
>>> The result should be a normal textfile which you can open
>>> with notepad or whatever you want.
>>>
>>> Also you can use Firebug "Network/XHR" to see your action response
>>>
>>> Best Regards
>>>
>>> Johannes Geppert
>>>
>>>
>>> nani2ratna wrote:
>>>>
>>>> Hi Johanes,
>>>>
>>>> Thanks for reply.
>>>> Actually I am very new to JSON.
>>>> Action is working fine.
>>>>
>>>> I went through your code and redid the same type stuff in my app.
>>>> I don't know about JSON reponse.
>>>> Since in your action class there no result(jsp) mapped.
>>>> So I too did the same. I am just executing the action method. And I
>>>> don't know how to send response.
>>>>
>>>> Can you please explain or send me some links.
>>>> So i can read and do that.
>>>>
>>>> Thanks in advance
>>>> RS
>>>>
>>>>
>>>>
>>>> Johannes Geppert wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> did your JSON Actions works fine?
>>>>>
>>>>> Check if you really get an JSON response and the
>>>>> variables inside the result have the same name.
>>>>>
>>>>> Can you please POST your result with sample data?
>>>>>
>>>>> Best Regards
>>>>>
>>>>> Johannes Geppert
>>>>>
>>>>>
>>>>> nani2ratna wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for
>>>>>> loading select box.
>>>>>> I just followed this link
>>>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>>>>
>>>>>> Every thing is executing fine.
>>>>>> But the list not loading properly.
>>>>>> I am new to JSON.
>>>>>>
>>>>>> I changed below jsp page which was working fine with normal select
>>>>>> box.
>>>>>>
>>>>>> my code is
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205235.ezm (zipped)i think comma seperated, but i'am not sure.
so your select box runs now??
Best Regards
Johannes Geppert
nani2ratna wrote:
>
> Hi Johannes,
> I saw that one earlier.
> I found the bug.
> I have another property in my action class which is service class.
>
> So i excluded that service class from json.
> Now its working fine.
> I did this one,
> @Actions( {
> @Action(value = "/JsonAction", results = {
> @Result(name = "success", type = "json", params =
> {"excludeProperties", "prodmDatPmService"} )
> })
> })
>
> But how to exclude more than one property.
>
> Thanks and Regards
> RS
>
>
> nani2ratna wrote:
>>
>> HI,
>>
>> I am trying to get this object
>> List<ProdmProdcat> prodcatList = new ArrayList<prodmProdcat>();
>> ProdmProdcat is a java bean which got two properties.
>> they are String prodcat_code;
>> and String prodcat_desc;
>>
>> Is this object fine.
>>
>> Thanks and Regards
>> RS
>>
>>
>> nani2ratna wrote:
>>>
>>> HI,
>>>
>>> Thank you.
>>> I executed the action.
>>> It gave me the following exception
>>>
>>>
java.lang.IllegalAccessException: Class
>>>
org.apache.struts2.json.JSONWriter can not access a member of class
>>>
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
>>> with modifiers "public"
>>>
sun.reflect.Reflection.ensureMemberAccess (
Reflection.java:65)
>>>
java.lang.reflect.Method.invoke (
Method.java:588)
>>>
org.apache.struts2.json.JSONWriter.bean (
JSONWriter.java:227)
>>>
org.apache.struts2.json.JSONWriter.process (
JSONWriter.java:165)
>>>
org.apache.struts2.json.JSONWriter.value (
JSONWriter.java:131)
>>>
>>> Thanks and Regards
>>> RS
>>>
>>>
>>>
>>> Johannes Geppert wrote:
>>>>
>>>> you can just execute your action like a normal action.
>>>>
>>>> http://localhost:8080/app/json.action
>>>>
>>>> The result should be a normal textfile which you can open
>>>> with notepad or whatever you want.
>>>>
>>>> Also you can use Firebug "Network/XHR" to see your action response
>>>>
>>>> Best Regards
>>>>
>>>> Johannes Geppert
>>>>
>>>>
>>>> nani2ratna wrote:
>>>>>
>>>>> Hi Johanes,
>>>>>
>>>>> Thanks for reply.
>>>>> Actually I am very new to JSON.
>>>>> Action is working fine.
>>>>>
>>>>> I went through your code and redid the same type stuff in my app.
>>>>> I don't know about JSON reponse.
>>>>> Since in your action class there no result(jsp) mapped.
>>>>> So I too did the same. I am just executing the action method. And I
>>>>> don't know how to send response.
>>>>>
>>>>> Can you please explain or send me some links.
>>>>> So i can read and do that.
>>>>>
>>>>> Thanks in advance
>>>>> RS
>>>>>
>>>>>
>>>>>
>>>>> Johannes Geppert wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> did your JSON Actions works fine?
>>>>>>
>>>>>> Check if you really get an JSON response and the
>>>>>> variables inside the result have the same name.
>>>>>>
>>>>>> Can you please POST your result with sample data?
>>>>>>
>>>>>> Best Regards
>>>>>>
>>>>>> Johannes Geppert
>>>>>>
>>>>>>
>>>>>> nani2ratna wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for
>>>>>>> loading select box.
>>>>>>> I just followed this link
>>>>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>>>>>
>>>>>>> Every thing is executing fine.
>>>>>>> But the list not loading properly.
>>>>>>> I am new to JSON.
>>>>>>>
>>>>>>> I changed below jsp page which was working fine with normal select
>>>>>>> box.
>>>>>>>
>>>>>>> my code is
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205254.ezm (zipped)Hi,
I just came to work and saw your email.
Once again Thanks for replies.
But sj:select is not working like s:select.
If i use normal struts 2 select, its loading normally.
But sj:select loading after all the elements in the jsp page rendered
completely.
Another one, while loading the elements I am presetting the value of list to
some value using value attribute.
This one working is fine in s:select.
But not working with sj:select.
Did you work with value/ key attribute earlier.
Do i need to set any other attribute
Thanks and Regards
Ratna
Johannes Geppert wrote:
>
> i think comma seperated, but i'am not sure.
> so your select box runs now??
>
> Best Regards
>
> Johannes Geppert
>
>
> nani2ratna wrote:
>>
>> Hi Johannes,
>> I saw that one earlier.
>> I found the bug.
>> I have another property in my action class which is service class.
>>
>> So i excluded that service class from json.
>> Now its working fine.
>> I did this one,
>> @Actions( {
>> @Action(value = "/JsonAction", results = {
>> @Result(name = "success", type = "json", params =
>> {"excludeProperties", "prodmDatPmService"} )
>> })
>> })
>>
>> But how to exclude more than one property.
>>
>> Thanks and Regards
>> RS
>>
>>
>> nani2ratna wrote:
>>>
>>> HI,
>>>
>>> I am trying to get this object
>>> List<ProdmProdcat> prodcatList = new ArrayList<prodmProdcat>();
>>> ProdmProdcat is a java bean which got two properties.
>>> they are String prodcat_code;
>>> and String prodcat_desc;
>>>
>>> Is this object fine.
>>>
>>> Thanks and Regards
>>> RS
>>>
>>>
>>> nani2ratna wrote:
>>>>
>>>> HI,
>>>>
>>>> Thank you.
>>>> I executed the action.
>>>> It gave me the following exception
>>>>
>>>>
java.lang.IllegalAccessException: Class
>>>>
org.apache.struts2.json.JSONWriter can not access a member of class
>>>>
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
>>>> with modifiers "public"
>>>>
sun.reflect.Reflection.ensureMemberAccess (
Reflection.java:65)
>>>>
java.lang.reflect.Method.invoke (
Method.java:588)
>>>>
org.apache.struts2.json.JSONWriter.bean (
JSONWriter.java:227)
>>>>
org.apache.struts2.json.JSONWriter.process (
JSONWriter.java:165)
>>>>
org.apache.struts2.json.JSONWriter.value (
JSONWriter.java:131)
>>>>
>>>> Thanks and Regards
>>>> RS
>>>>
>>>>
>>>>
>>>> Johannes Geppert wrote:
>>>>>
>>>>> you can just execute your action like a normal action.
>>>>>
>>>>> http://localhost:8080/app/json.action
>>>>>
>>>>> The result should be a normal textfile which you can open
>>>>> with notepad or whatever you want.
>>>>>
>>>>> Also you can use Firebug "Network/XHR" to see your action response
>>>>>
>>>>> Best Regards
>>>>>
>>>>> Johannes Geppert
>>>>>
>>>>>
>>>>> nani2ratna wrote:
>>>>>>
>>>>>> Hi Johanes,
>>>>>>
>>>>>> Thanks for reply.
>>>>>> Actually I am very new to JSON.
>>>>>> Action is working fine.
>>>>>>
>>>>>> I went through your code and redid the same type stuff in my app.
>>>>>> I don't know about JSON reponse.
>>>>>> Since in your action class there no result(jsp) mapped.
>>>>>> So I too did the same. I am just executing the action method. And I
>>>>>> don't know how to send response.
>>>>>>
>>>>>> Can you please explain or send me some links.
>>>>>> So i can read and do that.
>>>>>>
>>>>>> Thanks in advance
>>>>>> RS
>>>>>>
>>>>>>
>>>>>>
>>>>>> Johannes Geppert wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> did your JSON Actions works fine?
>>>>>>>
>>>>>>> Check if you really get an JSON response and the
>>>>>>> variables inside the result have the same name.
>>>>>>>
>>>>>>> Can you please POST your result with sample data?
>>>>>>>
>>>>>>> Best Regards
>>>>>>>
>>>>>>> Johannes Geppert
>>>>>>>
>>>>>>>
>>>>>>> nani2ratna wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am trying to use http://code.google.com/p/struts2-jquery/ for
>>>>>>>> loading select box.
>>>>>>>> I just followed this link
>>>>>>>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>>>>>>>
>>>>>>>> Every thing is executing fine.
>>>>>>>> But the list not loading properly.
>>>>>>>> I am new to JSON.
>>>>>>>>
>>>>>>>> I changed below jsp page which was working fine with normal select
>>>>>>>> box.
>>>>>>>>
>>>>>>>> my code is
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205236.ezm (zipped)Hello.
I need to access a property the includes a parameter but I cannot find a way
to do it.
I want to list all page names in selectedPages but I also need to specify
the locale (language) the should appear because a page may have many names
in different languages:
This works fine. It's a normal getName():
<ul>
<s:iterator value="selectedPages" status="row">
<li>
<s:property value="name" />
</li>
</s:iterator>
</ul>
but I needed to do something like
<ul>
<s:iterator value="selectedPages" status="row">
<li>
<s:property value="name(Locale.US)" />
</li>
</s:iterator>
</ul>
Best Regards,
Ricardo

Attachment:
user_205237.ezm (zipped)2010/3/4 Ricardo Jorge <rvjsapi@(protected)>:
> <s:property value="name(Locale.US)" />
Did you define method name(Locale locale) in your class? Or just
getName(Locale locale)? For second case use
<s:property value="getName(Locale.US)" /> or <s:property
value="%{getName(Locale.US)}" />
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

Attachment:
user_205238.ezm (zipped)Thank you for your reply.
I don't have a getName in my action class if that's what you mean.
I'm using an iterator so the getName is a method from the class's object
defined in the iterator's value option. That class also makes available a
getName(Locale locale).
Locale is a class (
java.util.Locale).
PS: I've just tried the following but it did not work
<s:property value="name(@
java.util.Locale@(protected))" />
Best Regards
Ricardo
On Thu, Mar 4, 2010 at 4:51 PM, Lukasz Lenart
<lukasz.lenart@(protected):
> 2010/3/4 Ricardo Jorge <rvjsapi@(protected)>:
> > <s:property value="name(Locale.US)" />
>
> Did you define method name(Locale locale) in your class? Or just
> getName(Locale locale)? For second case use
> <s:property value="getName(Locale.US)" /> or <s:property
> value="%{getName(Locale.US)}" />
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205239.ezm (zipped)2010/3/4 Ricardo Jorge <rvjsapi@(protected)>:
> PS: I've just tried the following but it did not work
> <s:property value="name(@
java.util.Locale@(protected))" />
Take a look on some examples here [1] and try
<s:property value="getName(@
java.util.Locale@(protected))" />
[1] http://struts.apache.org/2.x/docs/ognl-basics.html
Regards
--
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

Attachment:
user_205240.ezm (zipped) use an alias in the getName call like so
<s:property value="getName('US')"/>
this will still call getName but pass the string "US" then make the class method getName do the locale related work.
you can't pass an object in a property call as far as i know only a primitive/string.
i still think you should be looking at this differently and using the i18n interceptor and resource bundles to handle different languages.
adam
> Date: Thu, 4 Mar 2010 17:13:43 +0000
> Subject: Re: Passing parameters to <s:property>
> From: rvjsapi@(protected)
> To: user@(protected)
>
> Thank you for your reply.
>
> I don't have a getName in my action class if that's what you mean.
>
> I'm using an iterator so the getName is a method from the class's object
> defined in the iterator's value option. That class also makes available a
> getName(Locale locale).
>
> Locale is a class (
java.util.Locale).
>
> PS: I've just tried the following but it did not work
> <s:property value="name(@
java.util.Locale@(protected))" />
>
> Best Regards
> Ricardo
>
> On Thu, Mar 4, 2010 at 4:51 PM, Lukasz Lenart
> <lukasz.lenart@(protected):
>
> > 2010/3/4 Ricardo Jorge <rvjsapi@(protected)>:
> > > <s:property value="name(Locale.US)" />
> >
> > Did you define method name(Locale locale) in your class? Or just
> > getName(Locale locale)? For second case use
> > <s:property value="getName(Locale.US)" /> or <s:property
> > value="%{getName(Locale.US)}" />
> >
> >
> > Regards
> > --
> > Łukasz
> > http://www.lenart.org.pl/
> > Kapituła Javarsovia 2010
> > http://javarsovia.pl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
_________________________________________________________________
Got a cool Hotmail story? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205241.ezm (zipped) just pass an alias to the locale in the parameter
<s:property value="getName('US')"/>
and let the getName class handle the actual locale.
adam
> Date: Thu, 4 Mar 2010 18:20:19 +0100
> Subject: Re: Passing parameters to <s:property>
> From: lukasz.lenart@(protected)
> To: user@(protected)
>
> 2010/3/4 Ricardo Jorge <rvjsapi@(protected)>:
> > PS: I've just tried the following but it did not work
> > <s:property value="name(@
java.util.Locale@(protected))" />
>
> Take a look on some examples here [1] and try
> <s:property value="getName(@
java.util.Locale@(protected))" />
>
> [1] http://struts.apache.org/2.x/docs/ognl-basics.html
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205242.ezm (zipped)Hi guys,
I am not sure if it a direct struts question, if it is not pl pardon me and
let me know,
Is there a method in jsp / struts in which the output of a jsp page is
1. send to a file(saved in a file) , instead of going into browser response,
2. send to an email library,
the 1 is more important for me for the time.
Pl. let me know thanks,
--
Thanks and kind Regards,
Abhishek jain

Attachment:
user_205243.ezm (zipped)abhishek jain wrote:
> I am not sure if it a direct struts question, if it is not pl pardon me and
> let me know,
Maybe a filter in your web.xml?
How are your pages put together? tiles? sitemesh?
Since those are already filters, you might see if those can do what you
want...
-Dale

Attachment:
user_205245.ezm (zipped)On Fri, Mar 5, 2010 at 11:05 AM, Dale Newfield <dale@(protected):
> abhishek jain wrote:
>
>> I am not sure if it a direct struts question, if it is not pl pardon me
>> and
>> let me know,
>>
>
> Maybe a filter in your web.xml?
>
> How are your pages put together? tiles? sitemesh?
> Since those are already filters, you might see if those can do what you
> want...
>
Hi,
I am using Tiles.
Can tiles do the work for me?
thanks
abhi

Attachment:
user_205253.ezm (zipped)
is it a file on the client side or server side ?
if client side, you can specify a result type in the struts.xml but the user will be prompted to save the file as its a security risk to write it without there confirmation.
server side, just use plain java code in jsp to write and then do a page redirect or return null.
adam
> Date: Fri, 5 Mar 2010 12:52:33 +0530
> Subject: Re: jsp out to a differnet outputstream
> From: abhishek.netjain@(protected)
> To: user@(protected)
>
> On Fri, Mar 5, 2010 at 11:05 AM, Dale Newfield <dale@(protected):
>
> > abhishek jain wrote:
> >
> >> I am not sure if it a direct struts question, if it is not pl pardon me
> >> and
> >> let me know,
> >>
> >
> > Maybe a filter in your web.xml?
> >
> > How are your pages put together? tiles? sitemesh?
> > Since those are already filters, you might see if those can do what you
> > want...
> >
> Hi,
> I am using Tiles.
> Can tiles do the work for me?
> thanks
> abhi
_________________________________________________________________
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205256.ezm (zipped)Hi Adam,
Thanks for replying, It is a file on server side,
I could have written plain java code in JSP, but that will loose the benefit
of jsp and also rework on my end, I am sure there must be a method to
redirect the output of *out *to a file and not to STDOUT or so.
thanks
abhi
On Fri, Mar 5, 2010 at 2:10 PM, adam pinder <apinder@(protected):
>
>
>
> is it a file on the client side or server side ?
>
>
>
> if client side, you can specify a result type in the struts.xml but the
> user will be prompted to save the file as its a security risk to write it
> without there confirmation.
>
>
>
> server side, just use plain java code in jsp to write and then do a page
> redirect or return null.
>
>
>
> adam
>
>
>
> > Date: Fri, 5 Mar 2010 12:52:33 +0530
> > Subject: Re: jsp out to a differnet outputstream
> > From: abhishek.netjain@(protected)
> > To: user@(protected)
> >
> > On Fri, Mar 5, 2010 at 11:05 AM, Dale Newfield <dale@(protected)>
> wrote:
> >
> > > abhishek jain wrote:
> > >
> > >> I am not sure if it a direct struts question, if it is not pl pardon
> me
> > >> and
> > >> let me know,
> > >>
> > >
> > > Maybe a filter in your web.xml?
> > >
> > > How are your pages put together? tiles? sitemesh?
> > > Since those are already filters, you might see if those can do what you
> > > want...
> > >
> > Hi,
> > I am using Tiles.
> > Can tiles do the work for me?
> > thanks
> > abhi
>
> _________________________________________________________________
> We want to hear all your funny, exciting and crazy Hotmail stories. Tell us
> now
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
>
--
Thanks and kind Regards,
Abhishek jain
+91 9971376767

Attachment:
user_205244.ezm (zipped)Hi all,
All the forms in my application redirect to the the action associated
instead of the target div.
I'm using Struts 2.1.6
Here is the code:
<s:form id="loginForm" namespace="/" action="Login" method="post" >
<s:textfield name="name" />
<s:submit targets="contentDiv"/>
</s:form>
I also try with
<s:submit targets="contentDiv" notifyTopics="show_contentDiv_topic"/>
having
<sx:div id="contentDiv" listenTopics="show_contenDiv_topic">
</sx:div>
Doing it using <sx:a> works but it's not what I'm looking for.
<sx:head/> is defined in the pages
Thanks

Attachment:
user_205247.ezm (zipped)
i think you must use
<sx:submit targets="contentDiv"/>
instead of
<s:submit targets="contentDiv"/>
Best Regards
Johannes Geppert
mccorby wrote:
>
> Hi all,
> All the forms in my application redirect to the the action associated
> instead of the target div.
>
> I'm using Struts 2.1.6
>
> Here is the code:
>
> <s:form id="loginForm" namespace="/" action="Login" method="post" >
> <s:textfield name="name" />
> <s:submit targets="contentDiv"/>
> </s:form>
>
> I also try with
> <s:submit targets="contentDiv" notifyTopics="show_contentDiv_topic"/>
>
> having
>
> <sx:div id="contentDiv" listenTopics="show_contenDiv_topic">
> </sx:div>
>
> Doing it using <sx:a> works but it's not what I'm looking for.
>
> <sx:head/> is defined in the pages
>
> Thanks
>
>
-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205246.ezm (zipped)
Hi ,
I am getting the following log in geronimo for few action classes only :
Geronimo log shows:
2010-03-01 2:01:53,582 WARN [Form] No configuration found for the specified
action: 'SubmitSearchText.action' in namespace: '/text'. Form action
defaulting to 'action' attribute's literal value.
Following is struts.xml :
<package name="text" namespace="/text" extends="default" >
<action name="*SearchText" method="{1}"
class="com.presentation.action.SearchAction">
text
<result>/WEB-INF/jsp/search/search.jsp</result>
<result name="input">/WEB-INF/jsp/search/search.jsp</result>
<result name="searchresults" type="redirect-action">ResultsText</result>
</action>
</package>
Following is the form set in jsp:
<s:form method="post" id="mainForm" action="SubmitSearchText.action"
namespace="/text">
Kindly help me to remove the warnings from the server log.
Thanks,
SGupta
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205248.ezm (zipped)
sgupta4686 wrote:
>
> Hi ,
> I am getting the following log in geronimo for few action classes only :
> Geronimo log shows:
> 2010-03-01 2:01:53,582 WARN [Form] No configuration found for the
> specified action: 'SubmitSearchText.action' in namespace: '/text'. Form
> action defaulting to 'action' attribute's literal value.
>
> Following is struts.xml :
> <package name="text" namespace="/text" extends="default" >
> <action name="*SearchText" method="{1}"
> class="com.presentation.action.SearchAction">
> text
> <result>/WEB-INF/jsp/search/search.jsp</result>
> <result name="input">/WEB-INF/jsp/search/search.jsp</result>
> <result name="searchresults"
> type="redirect-action">ResultsText</result>
> </action>
> </package>
>
> Following is the form set in jsp:
> <s:form method="post" id="mainForm" action="SubmitSearchText.action"
> namespace="/text">
>
> Kindly help me to remove the warnings from the server log.
>
> Thanks,
> SGupta
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205249.ezm (zipped)Remove ".action" from <s:form method="post" id="mainForm"
action="SubmitSearchText.action"
That should make it
On Fri, Mar 5, 2010 at 2:44 PM, sgupta4686 <sugandh_gupta@(protected):
>
> Hi ,
> I am getting the following log in geronimo for few action classes only :
> Geronimo log shows:
> 2010-03-01 2:01:53,582 WARN [Form] No configuration found for the
> specified
> action: 'SubmitSearchText.action' in namespace: '/text'. Form action
> defaulting to 'action' attribute's literal value.
>
> Following is struts.xml :
> <package name="text" namespace="/text" extends="default" >
> <action name="*SearchText" method="{1}"
> class="com.presentation.action.SearchAction">
> text
> <result>/WEB-INF/jsp/search/search.jsp</result>
> <result
> name="input">/WEB-INF/jsp/search/search.jsp</result>
> <result name="searchresults"
> type="redirect-action">ResultsText</result>
> </action>
> </package>
>
> Following is the form set in jsp:
> <s:form method="post" id="mainForm" action="SubmitSearchText.action"
> namespace="/text">
>
> Kindly help me to remove the warnings from the server log.
>
> Thanks,
> SGupta
>
> --
> View this message in context:
> http://old.nabble.com/WARNING%3A-No-configuration-found-for-the-specified-action%3A-tp23112439p27790799.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_205250.ezm (zipped)
Hi ,
> I am getting the following log in geronimo for few action classes only :
> Geronimo log shows:
> 2010-03-01 2:01:53,582 WARN [Form] No configuration found for the
> specified action: 'SubmitSearchText.action' in namespace: '/text'.
> Form action defaulting to 'action' attribute's literal value.
>
> Following is struts.xml :
> <package name="text" namespace="/text" extends="default" >
> <action name="*SearchText" method="{1}"
> class="com.presentation.action.SearchAction">
> text
> <result>/WEB-INF/jsp/search/search.jsp</result>
> <result name="input">/WEB-INF/jsp/search/search.jsp</result>
> <result name="searchresults"
> type="redirect-action">ResultsText</result>
> </action>
> </package>
>
> Following is the form set in jsp:
> <s:form method="post" id="mainForm" action="SubmitSearchText.action"
> namespace="/text">
>
> Kindly help me to remove the warnings from the server log.
>
> Thanks,
> SGupta
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205251.ezm (zipped)
Thanks a lot. This is working.
mccorby wrote:
>
> Remove ".action" from <s:form method="post" id="mainForm"
> action="SubmitSearchText.action"
>
> That should make it
>
> On Fri, Mar 5, 2010 at 2:44 PM, sgupta4686
> <sugandh_gupta@(protected):
>
>>
>> Hi ,
>> I am getting the following log in geronimo for few action classes only :
>> Geronimo log shows:
>> 2010-03-01 2:01:53,582 WARN [Form] No configuration found for the
>> specified
>> action: 'SubmitSearchText.action' in namespace: '/text'. Form action
>> defaulting to 'action' attribute's literal value.
>>
>> Following is struts.xml :
>> <package name="text" namespace="/text" extends="default" >
>> <action name="*SearchText" method="{1}"
>> class="com.presentation.action.SearchAction">
>> text
>> <result>/WEB-INF/jsp/search/search.jsp</result>
>> <result
>> name="input">/WEB-INF/jsp/search/search.jsp</result>
>> <result name="searchresults"
>> type="redirect-action">ResultsText</result>
>> </action>
>> </package>
>>
>> Following is the form set in jsp:
>> <s:form method="post" id="mainForm" action="SubmitSearchText.action"
>> namespace="/text">
>>
>> Kindly help me to remove the warnings from the server log.
>>
>> Thanks,
>> SGupta
>>
>> --
>> View this message in context:
>> http://old.nabble.com/WARNING%3A-No-configuration-found-for-the-specified-action%3A-tp23112439p27790799.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205252.ezm (zipped)Hi friends,
I am using struts 1 , and i am trying to fetch a list from database, (as a
use case the students and marks )
i need to display that in the jsp page by itegrating,
I can print via out.print() in jsp and not via the normal logic:iterate,
Can any one point me to a suitable tutorial or cheat sheat or some notes,
Pl i have tried a lot of times and cant get that through.
Also another problem i am facing is that i am migrating my site from PHP to
Struts, i need to use apache + mod_rewrte, and deploy the struts application
in the tomcat port forward,
I am novice at this, can someone let me access some notes which can correct
me,
Pl. dont mind i have tried but cannt find a starter tutorial at this the
closest i found was http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp and
it does not solve my problem.
--
Thanks and kind Regards,
Abhishek jain

Attachment:
user_205255.ezm (zipped)1. Place log4j.properties in WEB-INF\classes
2. Set log4j.logger.org.apache.struts2=warn, struts in log4j.properties.
Raghuveer
-----Original Message-----
From: carl ballantyne [mailto:carl.ballantyne@(protected)]
Sent: Wednesday, March 03, 2010 6:25 PM
To: Struts Users Mailing List
Subject: Struts 2, Log4J and turning off WARNING messages
Hi All,
I cannot seem to turn off the warning messages Struts 2 is putting in
my log files. This makes it impossible to follow debugging in some
parts of the applications. I keep getting messages like following:
[#|2010-03-03T13:45:10.345+0100|WARNING|sun-appserver2.1|org.apache.struts2.
util.TextProviderHelper|_ThreadID=23;_ThreadName=httpSSLWorkerThread-8080-2;
_RequestID=5867914b-d1a7-4fd5-a848-a419944b1ad6;|The default value
expression 'Guardar' was evaluated and did not match a property. The
literal value 'Guardar' will be
used.|#]
I have googled around and looked at the archives and cannot find a
solution that works. Below is my log4j.properties which is in the
WEB-INF/classes folder.
# Set root logger level to WARN and append to stdout
log4j.rootLogger=ERROR, stdout
log4j.appender.stdout=
org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=
org.apache.log4j.PatternLayout# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
# Print only messages of level ERROR or above in the package noModule.
log4j.logger.noModule=FATAL
Any ideas? Anyone else having the same problem?
Cheers, Carl.
*Advertencia legal: en virtud de lo establecido en la Ley Organica 15/1999
de Proteccion de Datos de Caracter Personal, le informamos de que los datos
personales que pueda facilitarnos se incorporaran a un fichero automatizado
titularidad de CAST INFO, S.A. con la finalidad de gestionar la relacion
negocial que nos vincula. Podra revocar su consentimiento al tratamiento de
los datos, asi como ejercer sus derechos de acceso, rectificacion,
cancelacion u oposicion dirigiendose por escrito a CAST INFO domiciliada en
C/ Tuset 23, 1 -- 08006 Barcelona, o a la direccion de correo electronico
lopd@(protected).
Este mensaje y los ficheros anexos que pueda contener son confidenciales,
pueden contener informacion sometida a secreto profesional y se dirige
exclusivamente a su destinatario. Si ha recibido este mensaje por error o
tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo
comunique inmediatamente por este mismo medio y se abstenga de utilizarlo,
reproducirlo, alterarlo, archivarlo o comunicarlo a terceros. El emisor no
se responsabiliza de posibles perjuicios derivados de la captura,
incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por
terceros.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.