Interceptors probelms

2010-07-26 Thread Rohit
Hi,

 

I am new to struts2, prior to this I have been using struts1.2, Spring and
Hibernate combination. I have just started using Struts2,Spring and
Hibernate application, but I seem to be plagued with interceptor exceptions,

 

There are two error which keep happening, all in different scenarios

 

1)  2010-07-26 19:50:58,031 ERROR
org.apache.struts2.dispatcher.Dispatcher.error:27 - Could not find action or
result
No result defined for action com.inrev.bm.action.IRCampaignMgmtAction and
result input
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionI
nvocation.java:364)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:266)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Validati
onInterceptor.java:252)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.do
Intercept(AnnotationValidationInterceptor.java:68)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method
FilterInterceptor.java:87)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:237)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Con
versionErrorInterceptor.java:122)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:237)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parame
tersInterceptor.java:195)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Method
FilterInterceptor.java:87)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocati
on.java:237)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parame
tersInterceptor.java:195)

 

2)  2010-07-26 22:09:22,779 DEBUG
com.opensymphony.xwork2.interceptor.ParametersInterceptor.debug:57 - Setting
params session => [
{"session_key":"djshjhdfkjhdjhuhhhgfhg-1133902930","uid":1133902930,"expires
":0,"secret":"fjhfhlkasjdhfkdsjfhjhyhfhdjhfjkdh","sig":"hfjdfhljksdfhjkasdhf
jhdfjhakfjnmx,nvds"} ] 

2010-07-26 22:09:22,780 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:57 - Property:
session

2010-07-26 22:09:22,781 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:57 - Class:
com.inrev.bm.action.IRFacebookAction

2010-07-26 22:09:22,797 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:57 - converter
is null for property session. Mapping size: 0

2010-07-26 22:09:22,797 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:57 -
field-level type converter for property [session] = none found

2010-07-26 22:09:22,798 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:57 -
global-level type converter for property [session] = none found

2010-07-26 22:09:22,799 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:57 - falling
back to default type converter
[com.opensymphony.xwork2.conversion.impl.xworkbasicconver...@18a62f6]

2010-07-26 22:09:22,804 DEBUG
com.opensymphony.xwork2.conversion.impl.XWorkConverter.debug:61 - unable to
convert value using type converter
[com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter]

Cannot create type interface java.util.Map from value
{"session_key":"6e2ecfba81fc0e9b889a80021133902930","uid":1133902930,"expire
s":0,"secret":"
fjhfhlkasjdhfkdsjfhjhyhfhdjhfjkd","sig":"fe455338f9d869e589939d9c8dcdccb7"}
- [unknown location] at
com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.convertValue(XWo
rkBasicConverter.java:141)

at
com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.convertValue(XWo
rkBasicConverter.java:135)

at
com.opensymphony.xwork2.conversion.impl.XWorkConverter.convertValue(XWorkCon
verter.java:323)

at
com.opensymphony.xwork2.ognl.OgnlTypeConverterWrapper.convertValue(OgnlTypeC
onverterWrapper.java:28)

at ognl.OgnlRuntime.getConvertedType(OgnlRuntime.java:1040)

at ognl.OgnlRuntime.getConvertedTypes(OgnlRuntime.java:1057)

at ognl.OgnlRuntime.getConvertedMethodAndArgs(OgnlRuntime.java:1083)

 

I can make out that the first error is related to Validator interceptor and
the second one is related to Parameter convertor, but I cannot seem to
figure out how I can fix them. In the second exception all the parameter
values are being sent from facebook. Help would be highly appreciated.

 

Regards,

Rohit

 

 

 



Struts2 Modifying An arraylist of objects

2010-08-03 Thread Rohit
Hi,

 

I have an object in my Action class which contains an arraylist of objects
internally, I am trying to create a CRUD screen for this object. My Action
Class and bean are given below,

 

/**

 * @author rohit

 *

 */

public class IRFeedMgmtAction extends ActionSupport implements
ModelDriven,SessionAware,ServletRequestAware

{

private static org.apache.log4j.Logger log =
Logger.getLogger(IRFeedMgmtAction.class);

 

private HttpServletRequest request;



private Map session;



private IRAccountsDAO acctsDAO;



private IRFeeds feed = new IRFeeds();



/* (non-Javadoc)

 * @see com.opensymphony.xwork2.ActionSupport#execute()

 */

public String execute()

{

return "success";

}



/**

 * @return

 */

public String add()

{

IRUser user  = (IRUser) session.get("user");



List twtUsers =
acctsDAO.getTwitterAcctByOrgId(user.getOrgId());

 
feed.setTwtAccts(prepareTwitterAccounts(twtUsers));



return "addFeed";

}



/**

 * @return

 */

public String save()

{

IRFeeds fd = getFeed();

ArrayList twtAccts =
fd.getTwtAccts();



System.err.println(fd.getFeedUrl());



for (Iterator iterator =
twtAccts.iterator(); iterator.hasNext();) 

{

IRFeedAccts irFeedAccts =
(IRFeedAccts) iterator.next();

 
System.err.println(irFeedAccts.getNumber());

}



return "saved";

}



/**

 * @return 

 * 

 */

private ArrayList
prepareTwitterAccounts(List twtUsers)

{

ArrayList twtAccts = new
ArrayList();

IRAccountUsers twtUser = null;

IRFeedAccts feedAccnt = null;

for (Iterator iterator =
twtUsers.iterator(); iterator.hasNext();)

{

twtUser = (IRAccountUsers)
iterator.next();



feedAccnt = new
IRFeedAccts();

 
feedAccnt.setAccountId(twtUser.getSocialId());

 
feedAccnt.setPic(twtUser.getPic());

 
feedAccnt.setName(twtUser.getTwtUsrName());

feedAccnt.setNumber(30);



twtAccts.add(feedAccnt);

}



return twtAccts;

}



MY BEAN

 

public class IRFeeds  implements java.io.Serializable {

 

 

 private Integer feedId;

 private Integer campId;

 private String feedUrl;

 private boolean active;

 private Date createdOn;

 private Date updatedOn;

 private String createdBy;

 

 private ArrayList twtAccts; 



 private ArrayList fbAccts;



 private ArrayList fbPages;

 

 

MY JSP FILE

 





 


 
"
/>

 


 


 


 


 


 


 
 

 


 


 
 

 




 


 

 

Now my problem is when the value of the beans in the arraylist is modified
in the JSP, the same doesn't reach the action class save method. The value
remains the same.

 

Regards,

Rohit

 



NullPointerException while accessing request struts2

2010-08-26 Thread Rohit
Hi,

I am facing a strange error in Struts2, I am getting a null pointer
exception when trying to set attribute into request scope,

Struts Problem Report

Struts has detected an unhandled exception: Messages:
File: org/apache/catalina/connector/Request.java Line number: 1,424
Stacktraces java.lang.NullPointerException

org.apache.catalina.connector.Request.setAttribute(Request.java:1424)
org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:
503)
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:
284)
com.inrev.bm.action.IRBrandMgmtAction.wrdTwts(IRBrandMgmtAction.java:81)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)

My code is given below,

public class IRBrandMgmtAction extends ActionSupport implements
SessionAware,ServletRequestAware {


private static final long serialVersionUID = 1L;

private Map session;

private HttpServletRequest request; 

private IRWordToTrack wrdtotrack;

private IRBrandMgmtDAO brandMgmtDAO;

private static org.apache.log4j.Logger log =
Logger.getLogger(IRBrandMgmtAction.class);

and the method where this is happening,

public String wrdTwts()
{
ArrayList messages = null;
IRDateUtil dtUtil = new IRDateUtil();
String wordId = request.getParameter("wordId");

IRUser user = (IRUser) session.get("user");
IRWordToTrack word = brandMgmtDAO.getWord(Integer.parseInt(wordId));

if(word!=null)
{
messages =
brandMgmtDAO.viewMsgForUser(word.getWord().toUpperCase().trim(), null,
dtUtil.getTimeZoneOffset(user.getTimeZone()));
}

request.setAttribute("messages",messages);

return "tweets";
}

I am using tomcat 6 server.

Regards, Rohit

 



RE: NullPointerException while accessing request struts2

2010-08-26 Thread Rohit
Yes I have done that, it's not that every time I am getting the null pointer
exception. It's happening randomly.

Regards,
Rohit 

-Original Message-
From: Jan T. Kim [mailto:j@uea.ac.uk] 
Sent: 26 August 2010 16:31
To: user@struts.apache.org
Subject: Re: NullPointerException while accessing request struts2

On Thu, Aug 26, 2010 at 10:24:41AM +0100, Rohit wrote:
> Hi,
> 
> I am facing a strange error in Struts2, I am getting a null pointer
> exception when trying to set attribute into request scope,
> 
> Struts Problem Report
> 
> Struts has detected an unhandled exception: Messages:
> File: org/apache/catalina/connector/Request.java Line number: 1,424
> Stacktraces java.lang.NullPointerException
> 
> org.apache.catalina.connector.Request.setAttribute(Request.java:1424)
>
org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:
> 503)
>
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:
> 284)
> com.inrev.bm.action.IRBrandMgmtAction.wrdTwts(IRBrandMgmtAction.java:81)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> java.lang.reflect.Method.invoke(Unknown Source)
> 
> My code is given below,

have you implemented a setServletRequest method, as described in the FAQ
at
 
http://struts.apache.org/2.2.1/docs/how-can-we-access-the-httpservletrequest
.html

Best regards, Jan

> public class IRBrandMgmtAction extends ActionSupport implements
> SessionAware,ServletRequestAware {
> 
> 
> private static final long serialVersionUID = 1L;
> 
> private Map session;
> 
> private HttpServletRequest request; 
> 
> private IRWordToTrack wrdtotrack;
> 
> private IRBrandMgmtDAO brandMgmtDAO;
> 
> private static org.apache.log4j.Logger log =
> Logger.getLogger(IRBrandMgmtAction.class);
> 
> and the method where this is happening,
> 
> public String wrdTwts()
> {
> ArrayList messages = null;
> IRDateUtil dtUtil = new IRDateUtil();
> String wordId = request.getParameter("wordId");
> 
> IRUser user = (IRUser) session.get("user");
> IRWordToTrack word = brandMgmtDAO.getWord(Integer.parseInt(wordId));
> 
> if(word!=null)
> {
> messages =
> brandMgmtDAO.viewMsgForUser(word.getWord().toUpperCase().trim(), null,
> dtUtil.getTimeZoneOffset(user.getTimeZone()));
> }
> 
> request.setAttribute("messages",messages);
> 
> return "tweets";
> }
> 
> I am using tomcat 6 server.
> 
> Regards, Rohit
> 
>  
> 

-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=<  hierarchical systems are for files, not for humans  >=-*

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Chinese character problem

2011-03-31 Thread Rohit
Hi,

I am trying to handle Chinese word in my application (Struts2 bases), but
when the word "沃尔沃" in UI it becomes "沃尔沃".

How can I handle this?

Regards,
Rohit


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: Chinese character problem

2011-03-31 Thread Rohit
Sorry.. this is while submitting form. I started using this filter and the 
problem was solved. But is this the right way?


encodingFilter

org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true

 
  

Regards,
Rohit

-Original Message-
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] 
Sent: 31 March 2011 18:18
To: Struts Users Mailing List
Subject: Re: Chinese character problem

2011/3/31 Rohit :
> I am trying to handle Chinese word in my application (Struts2 bases), but
> when the word "沃尔沃" in UI it becomes "沃尔沃".
>
> How can I handle this?

Are you using property files?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts2 String ThreadSafe?

2012-11-29 Thread rohit
 Hi,
   We are using Struts2-Spring integration and all my action classes implement 
SessionAware, sample code to action class and their spring definition is given 
below,
 public class IRXxxxAction extends ActionSupport implements SessionAware { 
private Map session; public String execute() {//} public void 
setSession(Map session) { this.session = session; } }  
Spring Configuration
    If I understand correctly, 
each auto-wired property will be a singleton, so if the above is true, is there 
anyway that the session map get shared between two simultaneous requests?
 Regards,


 




Re: Struts2 String ThreadSafe?

2012-11-29 Thread rohit
So in the current case there is a chance that same action class may be used in 
simultaneous request and hence the mixup?



 On Thu, 29 Nov 2012 21:02:23 +0530 Umesh Awasthi 
<umeshawas...@gmail.com> wrote  


First and foremost for using spring with Struts2 make your action bean 
scope prototype 
and is not be ready for the weird issues 
 
Struts2 itself create a new request instance as well other objects 
associated with itself to make it thread safe. 
 
 
 
On Thu, Nov 29, 2012 at 8:59 PM, rohit <ro...@in-rev.com> wrote: 
 
> Hi, 
> We are using Struts2-Spring integration and all my action classes 
> implement SessionAware, sample code to action class and their spring 
> definition is given below, 
> public class IRXxxxAction extends ActionSupport implements SessionAware { 
> private Map session; public String execute() {//} public void 
> setSession(Map&lt;String, Object&gt; session) { this.session = 
session; } } 
> Spring Configuration 
> &lt;bean name="userAction" class="com.IRXxxxAction" &gt; 
&lt;property 
> name="adminDAO" ref="adminDAO" /&gt; &lt;/bean&gt; If I 
understand 
> correctly, each auto-wired property will be a singleton, so if the above 
is 
> true, is there anyway that the session map get shared between two 
> simultaneous requests? 
> Regards, 
> 
> 
> 
> 
> 
> 
 
 
-- 
With Regards 
Umesh Awasthi 
http://www.travellingrants.com/ 




Prototype beans

2012-12-03 Thread rohit

We are defining struts action classes in spring as prototype bean, in this 
while editing a particular bean a new object is being inserted, I can imagine 
this would be because of prototype nature of beans.

How can we achieve edit with prototype beans?

Regards,
Rohit



Re: Struts2 String ThreadSafe?

2012-11-29 Thread Rohit Gupta
So given the fact that my beans are not prototype, there is a chance that
the same action class may be used for two consecutive requests.

Regards,


On 29/11/12 9:02 PM, "Umesh Awasthi"  wrote:

>First and foremost for using spring with Struts2 make your action bean
>scope prototype
>and is not be ready for the weird issues
>
>Struts2 itself create a new request instance as well other objects
>associated with itself to make it thread safe.
>
>
>
>On Thu, Nov 29, 2012 at 8:59 PM, rohit  wrote:
>
>>  Hi,
>>We are using Struts2-Spring integration and all my action classes
>> implement SessionAware, sample code to action class and their spring
>> definition is given below,
>>  public class IRXxxxAction extends ActionSupport implements
>>SessionAware {
>> private Map session; public String execute() {//} public void
>> setSession(Map<String, Object> session) { this.session = session;
>>} }
>>  Spring Configuration
>>  <bean name="userAction" class="com.IRXxxxAction" > <property
>> name="adminDAO" ref="adminDAO" /> </bean> If I understand
>> correctly, each auto-wired property will be a singleton, so if the
>>above is
>> true, is there anyway that the session map get shared between two
>> simultaneous requests?
>>  Regards,
>>
>>
>>
>>
>>
>>
>
>
>-- 
>With Regards
>Umesh Awasthi
>http://www.travellingrants.com/




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Prototype beans

2012-12-03 Thread Rohit Gupta
I am using XML approach, it works fine when the type is not prototype,
understandable so since the same instance is used across requests.



On 03/12/12 2:49 PM, "Puneet Babbar 2"  wrote:

>Are you using annotations or xml approach to work with struts? And have
>you checked what happens when you don't define your struts actions as
>prototype?
>
>-Puneet
>
>-----Original Message-
>From: rohit [mailto:ro...@in-rev.com]
>Sent: Monday, December 03, 2012 2:13 PM
>To: user@struts.apache.org
>Subject: Prototype beans
>
>
>We are defining struts action classes in spring as prototype bean, in
>this while editing a particular bean a new object is being inserted, I
>can imagine this would be because of prototype nature of beans.
>
>How can we achieve edit with prototype beans?
>
>Regards,
>Rohit
>
>
>-
>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts2 WebApp Portlet Bridge

2009-04-16 Thread Rohit Srivastava
Have been trying to figure out which web framework to be used, however, this
is not going to be one of the  "what's the best framework" type of
questions.

Is there is a generic portlet bridge which can enable struts2 web
applications deployment as a standard compliant portlet ?

The application architecture is going to be different , and there seems to
be no direct way out. Once as a portlet, you can't put it as a simple web
app without using a portlet container. And once as a webapp, the portlet
architecture (two phases rendering, modes, lack of URL addresability)  comes
in the way for full blown portlet deployment.

So, perhaps by following proper guidelies (using struts2 tag libs) is it
possible to deploy struts webapp as a portlet ? Lets drop the inter-portlet
communication anyway.

I checked out the portlet plugin, but it seems to support native portlet
development.

Any ideas or previous experiences to share ?

Very Thanks, Rohit


s.autocompleter not found

2007-03-16 Thread Rohit Dewan

I have a page configured as follows:

http://www.w3.org/1999/xhtml";>


Test
<@s.head theme="ajax" />



and later in the body

<@s.url id="bars" value="barsList.action" />
<@s.form action="addFoo" method="add">
 <@s.autocompleter theme="ajax" href="%{bars}" name="bar"
/>
 <@s.submit value="OK" action="addFoo" method="add"/>
 <@s.submit value="Cancel" action="addFoo"
method="cancel"/>



I get the following error when the page is rendered:


on line 56, column 33 in provider/addAppointment.html s.autocompleter not
found.
The problematic instruction:
--
==> user-directive s.autocompleter [on line 56, column 33 in
provider/addAppointment.html]
in user-directive s.form [on line 55, column 25 in
provider/addAppointment.html]
--

Java backtrace for programmers:
--
freemarker.core.InvalidReferenceException: on line 56, column 33 in
provider/addAppointment.html s.autocompleter not found.
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.Environment.visit(Environment.java:233)
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.Environment.process(Environment.java:176)
   at freemarker.template.Template.process(Template.java:232)
   at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(
FreemarkerResult.java:168)
   at org.apache.struts2.dispatcher.StrutsResultSupport.execute(
StrutsResultSupport.java:178)
   at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
DefaultActionInvocation.java:343)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
DefaultActionInvocation.java:248)

What am I missing. Any help would be most appreciated.

Regards,
Rohit


Re: s.autocompleter not found

2007-03-16 Thread Rohit Dewan

That resolved the issue. Thanks!

Is there an ETA for 2.0.7?

Regards,
Rohit

On 3/16/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


I just realized that there is a bug with the autocompleter and freemarker:

http://issues.apache.org/struts/browse/WW-1823

as a workaround use "autocompleterModel", it will be fixed for 2.0.7.

regards
musachy

On 3/16/07, Rohit Dewan <[EMAIL PROTECTED]> wrote:
>
> I have a page configured as follows:
>
> http://www.w3.org/1999/xhtml";>
> 
> 
> Test
> <@s.head theme="ajax" />
> 
> 
>
> and later in the body
>
> <@s.url id="bars" value="barsList.action" />
> <@s.form action="addFoo" method="add">
>   <@s.autocompleter theme="ajax" href="%{bars}"
name="bar"
> />
>   <@s.submit value="OK" action="addFoo" method="add"/>
>   <@s.submit value="Cancel" action="addFoo"
> method="cancel"/>
> 
>
>
> I get the following error when the page is rendered:
>
>
> on line 56, column 33 in provider/addAppointment.html s.autocompleternot
> found.
> The problematic instruction:
> --
> ==> user-directive s.autocompleter [on line 56, column 33 in
> provider/addAppointment.html]
> in user-directive s.form [on line 55, column 25 in
> provider/addAppointment.html]
> --
>
> Java backtrace for programmers:
> --
> freemarker.core.InvalidReferenceException: on line 56, column 33 in
> provider/addAppointment.html s.autocompleter not found.
> at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136)
> at freemarker.core.Environment.visit(Environment.java:196)
> at freemarker.core.MixedContent.accept(MixedContent.java:92)
> at freemarker.core.Environment.visit(Environment.java:196)
> at freemarker.core.Environment.visit(Environment.java:233)
> at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116)
> at freemarker.core.Environment.visit(Environment.java:196)
> at freemarker.core.MixedContent.accept(MixedContent.java:92)
> at freemarker.core.Environment.visit(Environment.java:196)
> at freemarker.core.Environment.process(Environment.java:176)
> at freemarker.template.Template.process(Template.java:232)
> at
org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(
> FreemarkerResult.java:168)
> at org.apache.struts2.dispatcher.StrutsResultSupport.execute(
> StrutsResultSupport.java:178)
> at com.opensymphony.xwork2.DefaultActionInvocation.executeResult
(
> DefaultActionInvocation.java:343)
> at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> DefaultActionInvocation.java:248)
>
> What am I missing. Any help would be most appreciated.
>
> Regards,
> Rohit
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd



s.autocompleter with JSON Plugin

2007-03-17 Thread Rohit Dewan

I have the following in the body:

<@s.url id="foos" value="foosList.action" />
<@s.form theme="ajax" action="addTest" method="add">
<@s.autocompleterModel theme="ajax" href="%{foos}"
name="foo" />
<@s.submit value="OK" action="addTest" method="add"/>
<@s.submit value="Cancel" action="addTest"
method="cancel"/>


I have verified that foosList.action returns the following
{"foos":{1:"chance",10:"test"}}

However, the autocompleter is blank after load.

Has anyone had success using the JSON plugin with the autocompleter?

Regards,
Rohit


ETA for 2.0.7

2007-03-26 Thread Rohit Dewan

Would anyone be able to let me know the ETA for release 2.0.7?

Thanks,
Rohit


multiple s.if tags

2007-03-27 Thread Rohit Dewan

I am trying the following with strange results.

   <@s.iterator value="availabilityList" status="rowstatus">
   <@s.if test="#rowstatus.index%7==0">
   
   
   <@s.if test="avail">
   
   <@s.if test="selected">
   
   
   
   <@s.property value="date"/>
   <@s.if test="selected">
   
   
   <@s.if test="avail">
   
   
   <@s.if test="#rowstatus.index%7==6">
   
   
   

I am getting





value

rather than



value



What am I missing here?

Thanks in advance!

Regards,
Rohit


Re: Session not set before prepare() function with Struts 2 prepare interceptor

2007-03-27 Thread Rohit Dewan

Hi Jason,

I believe it is the servlet-config interceptor that is responsible for
setting the session. I think it is part of the defaultStack. Try moving the
defaultStack before prepare in your configuration. That might do the job.

Regards,
Rohit

On 3/27/07, Jason Wyatt <[EMAIL PROTECTED]> wrote:



Hi,

I'm trying to use the "prepare" interceptor in Struts 2, and although the
Action's prepare() function IS being called, the session doesn't seem to
be
set on the action before the prepare() function is called.

The action implements SessionAware, and has a setSession(Map session)
function. The session aware part was working for the execute() function.

Do I need to add another interceptor to the action's interceptor stack
before the prepare interceptor?

Here is the Action's interceptor stack:







Thanks in advance for any help, regards

Jason



Itree Software www.itree.com.au
Ph (02)42263454Fax (02)42263193
-> Meeting your requirements.
-> Delivering on promises.
-> Pride in our work.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




autocompleter with JSON plugin

2007-04-05 Thread Rohit Dewan

I have the following in the body:

<@s.url id="foos" value="foosList.action" />
<@s.form theme="ajax" action="addTest" method="add">
<@ s.autocompleterModel theme="ajax" href="%{foos}"
name="foo" />
<@s.submit value="OK" action="addTest" method="add"/>
<@ s.submit value="Cancel" action="addTest"
method="cancel"/>


I have verified that foosList.action returns the following
{"foos":{1:"chance",10:"test"}}

However, the autocompleter is blank after load.

I am using Struts 2.0.7 and JSON Plugin 0.7

Any thoughts?

Thanks,
Rohit


Re: autocompleter with JSON plugin

2007-04-06 Thread Rohit Dewan

Hi Musachy,

That was it. It works now!

Especially given that the autocompleter is structured as a key value pair,
supporting maps would be a natural fit. Thanks for creating the enhancement
request on JIRA.

Regards,
Rohit

On 4/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:


The autocompleter is expecting the "datasource" to be an array, not a
map(or
object), so in this case it should be:

{"foos": [
   ["1", "chance"],
   ["10", "test"]
   ]
}

Although it would be convenient if it would take a map also:

https://issues.apache.org/struts/browse/WW-1872

musachy

On 4/5/07, Rohit Dewan <[EMAIL PROTECTED]> wrote:
>
> I have the following in the body:
>
> <@s.url id="foos" value="foosList.action" />
> <@s.form theme="ajax" action="addTest" method="add">
>  <@ s.autocompleterModel theme="ajax" href="%{foos}"
> name="foo" />
>  <@s.submit value="OK" action="addTest" method="add"/>
>  <@ s.submit value="Cancel" action="addTest"
> method="cancel"/>
> 
>
> I have verified that foosList.action returns the following
> {"foos":{1:"chance",10:"test"}}
>
> However, the autocompleter is blank after load.
>
> I am using Struts 2.0.7 and JSON Plugin 0.7
>
> Any thoughts?
>
> Thanks,
> Rohit
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd



autocompleter not working on Firefox 1.5 on Linux

2007-04-11 Thread Rohit Dewan

I have a working autocompleter on Firefox 2.0 on MacOS. The same code does
not work on Firefox 1.5 on Linux.

Any suggestions?

Thanks,
Rohit


Re: autocompleter not working on Firefox 1.5 on Linux

2007-04-12 Thread Rohit Dewan

Hi Musachy,

I rebooted my linux machine for an unrelated reason and now cannot reproduce
the issue. It is working now.

Sorry for the bother.

Regards,
Rohit


Using timezone with date tag

2007-04-27 Thread Rohit Dewan

Is there a way to specify timezone in the date tag. The current behavior
defaults to the timezone of the server.

Regards,
Rohit


specifying timezone in date tag

2007-04-30 Thread Rohit Dewan

Is there a way to specify timezone in the date tag? The current behavior
defaults to the timezone of the server.

Regards,
Rohit


Struts 2.0.6 with Tomcat 6.0

2007-05-02 Thread Rohit Dewan

I am considering the use of Tomcat 6.0 which implements Servlet 2.5 and JSP
2.1. Should I expect any issues using it with Struts 2.0.6?

Regards,
Rohit


unsubscribe me

2006-10-03 Thread Rohit Dadhwal
unsubscribe me
 thanks


plz unsubscribe me

2006-10-04 Thread Rohit Dadhwal


unsubscribe me from the list

2006-10-04 Thread Rohit Dadhwal


Struts Internationalization doesn't work on Linux

2006-10-08 Thread rohit dige
I need to show a text message on JSP page in browser's
preferred language. I have created multiple language
specific properties files and put them 
 under WEB-INF/classes/config. My JSP and
Struts-config.xml look as following

Struts-Config.xml



 

JSP file


<%@ page contentType=”text/html; charset=UTF-8”
pageEncoding=”UTF-8” %>
















It shows text in browser preffered language on
Windows. But on Linux, it  does not load the correct
ApplicationResources.properties file - it loads the 
default one, instead of one for a locale (regardless
of 
whether it is language only or language and country).
Do we need any extra configuration on Linux to make it
work? Your help is greatly appreciated.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts Internationalization doesn't work on Linux

2006-10-09 Thread rohit dige
Hey Martin,

Thank you so much for your response. We are using
RHEL.  
i18n settings in RHEL are configured in
/etc/sysconfig/i18n, and the LANG parameter specifies
LANG="en_US.UTF-8". But this problem still exists. Am
I missing anything else?

Thank you,
Krishna



--- Martin Gainty <[EMAIL PROTECTED]> wrote:

> for RH check your initdb.i18n 
> file for the LANG parameter
> make sure the LANG parameter specifies
> LANG="en_US.UTF-8"
> 
> Anyone else?
> Martin--
> 
> This e-mail communication and any attachments may
> contain confidential and privileged information for
> the use of the 
> designated recipients named above. If you are not
> the intended recipient, you are hereby notified that
> you have received
> this communication in error and that any review,
> disclosure, dissemination, distribution or copying
> of it or its 
> contents
> 
> - Original Message - 
> From: "rohit dige" <[EMAIL PROTECTED]>
> To: 
> Sent: Sunday, October 08, 2006 4:10 PM
> Subject: Struts Internationalization doesn't work on
> Linux
> 
> 
> >I need to show a text message on JSP page in
> browser's
> > preferred language. I have created multiple
> language
> > specific properties files and put them 
> > under WEB-INF/classes/config. My JSP and
> > Struts-config.xml look as following
> > 
> > Struts-Config.xml
> > 
> >  > parameter="config.ApplicationResources"
> null="false"/>
> > 
> > 
> > 
> > JSP file
> > 
> > 
> > <%@ page contentType="text/html; charset=UTF-8"
> > pageEncoding="UTF-8" %>
> > 
> > 
> > 
> > 
> > 
> >  content="text-html;
> > charset=utf-8">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > It shows text in browser preffered language on
> > Windows. But on Linux, it  does not load the
> correct
> > ApplicationResources.properties file - it loads
> the 
> > default one, instead of one for a locale
> (regardless
> > of 
> > whether it is language only or language and
> country).
> > Do we need any extra configuration on Linux to
> make it
> > work? Your help is greatly appreciated.
> > 
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> >


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Unsubscribe Me !!

2004-05-17 Thread Rohit A Nair
  


On Mon, 17 May 2004 Ronald van den Heuvel wrote :
>Hm ok I will try the filter but this is not the real solution because I
>am not using any other taglibs. Only the standard Struts taglibs.
>
>
>
>-Original Message-
> From: Paul McCulloch [mailto:[EMAIL PROTECTED]
>Sent: maandag 17 mei 2004 13:50
>To: 'Struts Users Mailing List'
>Subject: RE: Problem with utf-8 encoding with struts
>
>That's an old version I gave the URL for. A better place to look would
>be in
>the Tomcat source.
>
>Paul
>
> > -Original Message-
> > From: Paul McCulloch [mailto:[EMAIL PROTECTED]
> > Sent: Monday, May 17, 2004 12:47 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Problem with utf-8 encoding with struts
> >
> >
> > This can happen if you use JSTL tags which overwrite whatever response
> > encoding you set.
> >
> > This can be fixed by using a filter to force the encoding
> >
> > http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java
> >
> > Paul
> >
> > > -Original Message-
> > > From: Ronald van den Heuvel
> > [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, May 17, 2004 12:28 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Problem with utf-8 encoding with struts
> > >
> > >
> > >  Hello all,
> > >
> > >
> > >
> > > I am using Struts for a web-application and the web-page
> > should be in
> > > UTF-8 encoding, but the application keeps sending the
> > > following header:
> > > Content-Type: text/html;charset=ISO-8859-1. I take the
> > > following action
> > > to get the page into UTF-8.
> > >
> > >  - in the struts config file:
> > >
> > >> > nocache="true" />
> > >
> > > - in the main tiles layout:
> > >
> > > <%@ page language="java" contentType="text/xml;
> > > charset=UTF-8" %> (at the top)
> > >
> > > ( in the head part of the document)
> > >
> > >
> > >
> > > The page is valid xhtml 1.0 transitional and I get no errors what so
> > > ever. I tested it in mozilla and IE and both say it is the
> > ISO-8859-1
> > > content type.
> > >
> > >
> > >
> > > Does anybody know the solution to this problem?
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > > Ronald
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > **
> > Axios Email Confidentiality Footer
> > Privileged/Confidential Information may be contained in this
> > message. If you are not the addressee indicated in this
> > message (or responsible for delivery of the message to such
> > person), you may not copy or deliver this message to anyone.
> > In such case, you should destroy this message, and notify us
> > immediately. If you or your employer does not consent to
> > Internet email messages of this kind, please advise us
> > immediately. Opinions, conclusions and other information
> > expressed in this message are not given or endorsed by my
> > Company or employer unless otherwise indicated by an
> > authorised representative independent of this message.
> > WARNING:
> > While Axios Systems Ltd takes steps to prevent computer
> > viruses from being transmitted via electronic mail
> > attachments we cannot guarantee that attachments do not
> > contain computer virus code.  You are therefore strongly
> > advised to undertake anti virus checks prior to accessing the
> > attachment to this electronic mail.  Axios Systems Ltd grants
> > no warranties regarding performance use or quality of any
> > attachment and undertakes no liability for loss or damage
> > howsoever caused.
> > **
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>