Re: Struts2-jquery-grid-show on jboss as 6.0.final

2013-09-13 Thread Omar Ngarigari
Thanks Martin,





 From: Martin Gainty 
To: Struts Users Mailing List  
Sent: Friday, September 13, 2013 7:41 AM
Subject: RE: Struts2-jquery-grid-show on jboss as 6.0.final
 

struts.xml containing action specification for JsonTableAction

    
         
         
             
             
         
         
                      /pages/index.jsp
                       /pages/grid.jsp
         
    

this assumes you have your startup welcome page located at 
WebAppName/pages/index.jsp
AND the grid view is located at WebAppName/pgaes/grid.jsp

if the first container (classloader) loads the webapp but the second container 
(classloader) doesn't load the webapp
I would say you misconfigured your second container
did you look at classloader implementation in Jboss?

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.


> Subject: Struts2-jquery-grid-show on jboss as 6.0.final
> From: ngarigar...@yahoo.com
> Date: Thu, 12 Sep 2013 21:16:08 -0400
> To: user@struts.apache.org
> 
> Hello everyone,
> 
> I was able to deploy and run struts2-jquery-grid-showcase 3.6.1 on tomcat 
> application server out of box. However, I am unable to run it on 
> jboss-as-6.0.final. I believe that jboss is expecting all the actions to be 
> configured explicitly on the struts.xml. 
> 
> This is how I configured to get the first page.
> 
> /content/index.jsp
> 
> 
> I can see the header page, but no the editable grid. I was trying to 
> configure grid action like the following, it is not working 
> 
> 
> 
> 
> Can anyone guide me to how I can get all the actions configured on 
> struts.xml? 
> 
> Sent from my iPad
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

Re: Struts2-jquery-grid-show on jboss as 6.0.final

2013-09-13 Thread Omar Ngarigari
Thanks Lukasz, now I can see the index page. It worked.





 From: Lukasz Lenart 
To: Struts Users Mailing List  
Sent: Friday, September 13, 2013 3:12 AM
Subject: Re: Struts2-jquery-grid-show on jboss as 6.0.final
 

No, it doesn't, rather this

http://struts.apache.org/development/2.x/docs/convention-plugin.html#ConventionPlugin-JBoss


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/9/13  :
> Hello everyone,
>
> I was able to deploy and run struts2-jquery-grid-showcase 3.6.1 on tomcat 
> application server out of box. However, I am unable to run it on 
> jboss-as-6.0.final. I believe that jboss is expecting all the actions to be 
> configured explicitly on the struts.xml.
>
> This is how I configured to get the first page.
> 
> /content/index.jsp
> 
>
> I can see the header page, but no the editable grid. I was trying to 
> configure grid action like the following, it is not working
>
> 
>
>
> Can anyone guide me to how I can get all the actions configured on struts.xml?
>
> Sent from my iPad
> -
> 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

Re: conflict between message.properties for multiple Struts war files

2013-08-26 Thread Omar Ngarigari
Yes, I am using the shared Stutrus2 libs jar files.





 From: Lukasz Lenart 
To: Struts Users Mailing List  
Sent: Monday, August 26, 2013 9:11 AM
Subject: Re: conflict between message.properties for multiple Struts war files
 

2013/8/16 Omar Ngarigari :
> No, All these WAR files are separate. I renamed the message.properties for 
> App1 as you suggested "app1-message.properties", but did not rename the other 
> properties files. but the problem is still there when I run the App1.

Strange, does it mean you have configured container to somehow reuse
the same class loader for each WAR? Or do you use shared S2 libs?

> I understand that you want me to rename all the properties files as you 
> suggested. But what the reason behind?

Yes and the reason is the simplest solution as it looks like you have
very specific setup.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Re: s:url & s:param does not work on struts 2.3.15.1

2013-08-19 Thread Omar Ngarigari
Thanks Chris, it works with ${stateName}





 From: Chris Pratt 
To: Struts Users Mailing List  
Cc: Omar Ngarigari  
Sent: Monday, August 19, 2013 1:44 PM
Subject: Re: s:url & s:param does not work on struts 2.3.15.1
 

It might even work using *$*{stateName}.
But, like Dave I don't think the tag body is searched for OGNL expressions.
  (*Chris*)


On Mon, Aug 19, 2013 at 10:34 AM, Dave Newton  wrote:

> Does it work if you use:
>
>     
>
> I actually didn't know it'd work with an OGNL expression as a tag body.
>
> Dave
>
>
>
> On Mon, Aug 19, 2013 at 1:22 PM, Omar Ngarigari  >wrote:
>
> > Hello,
> >
> > I am in the process of upgrading my struts2.3.1.2 application to
> > struts2.3.15.1. Everything works fine except the  and 
> tags.
> >
> > In struts2.3.1.2, I have the following code in jsp file
> > 
> >           %{stateName}
> > 
> > Add
> >
> > I used to get correct state name when using struts2.3.1.2. However, using
> > struts2.3.15.1, I am getting the following on web-browser page:
> %{stateName}
> >
> >
> > Thanks,
> >
> > Omar N.
> >
>
>
>
> --
> e: davelnew...@gmail.com
> m: 908-380-8699
> s: davelnewton_skype
> t: @dave_newton <https://twitter.com/dave_newton>
> b: Bucky Bits <http://buckybits.blogspot.com/>
> g: davelnewton <https://github.com/davelnewton>
> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
>

s:url & s:param does not work on struts 2.3.15.1

2013-08-19 Thread Omar Ngarigari
Hello,

I am in the process of upgrading my struts2.3.1.2 application to 
struts2.3.15.1. Everything works fine except the  and  tags.

In struts2.3.1.2, I have the following code in jsp file

  %{stateName}

Add

I used to get correct state name when using struts2.3.1.2. However, using 
struts2.3.15.1, I am getting the following on web-browser page: %{stateName}


Thanks,

Omar N.


Re: conflict between message.properties for multiple Struts war files

2013-08-16 Thread Omar Ngarigari
No, All these WAR files are separate. I renamed the message.properties for App1 
as you suggested "app1-message.properties", but did not rename the other 
properties files. but the problem is still there when I run the App1. 

I understand that you want me to rename all the properties files as you 
suggested. But what the reason behind?

Thanks,






 From: Lukasz Lenart 
To: Struts Users Mailing List  
Sent: Friday, August 16, 2013 1:32 AM
Subject: Re: conflict between message.properties for multiple Struts war files
 

All these WARs are part of the same EAR? Or they just separated WARs?
You can define a constant struts.custom.i18n.resources in struts.xml
for each WAR:



and then put your app.title in app1-message.properties and so on for the rest.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2013/8/15 Omar Ngarigari 
>
> I have three different applications that were developed using Struts2 
> framework. I deployed three different war files on the JBoss AS6. But, now I 
> am having problem with global message.properties files. Each war file has its 
> own message.properties file.
>
> message.properties file for the App1.war consists of
>
> app.title="State Database"
>
> message.properties file for the App2.war consists of
>
> app.title="Agency Database"
>
> message.properties file for the App3.war consists of
>
> app.title="Database Status Report"
>
> In JSP file for the App1.war there is  application 
> title
>
> In JSP file for the App2.war there is  application 
> title
> In JSP file for the App3.war there is  application 
> title
>
> When I run the App1, I see "Agency Database" as App1 title.
> When I run the App2, again I see "Agency Database" as App2 title.
> When I run the App3, again I see "Agency Database" as App3 title.
>
> Any idea how to resolve the conflict?
>
> Thanks in advance

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

conflict between message.properties for multiple Struts war files

2013-08-15 Thread Omar Ngarigari
I have three different applications that were developed using Struts2 
framework. I deployed three different war files on the JBoss AS6. But, now I am 
having problem with global message.properties files. Each war file has its own 
message.properties file.

message.properties file for the App1.war consists of 

app.title="State Database"

message.properties file for the App2.war consists of 

app.title="Agency Database"

message.properties file for the App3.war consists of

app.title="Database Status Report"

In JSP file for the App1.war there is  application 
title

In JSP file for the App2.war there is  application 
title
In JSP file for the App3.war there is  application 
title

When I run the App1, I see "Agency Database" as App1 title.
When I run the App2, again I see "Agency Database" as App2 title.
When I run the App3, again I see "Agency Database" as App3 title.

Any idea how to resolve the conflict?

Thanks in advance


Struts2 - Using java.util.Map as datasource in the jasperreports

2013-07-29 Thread Omar Ngarigari
Hello,

I was able to generate a PDF file using struts2-jasperreports-plugin using 
java.util.List as datasource. However, I am not able to do the same with the 
java.util.Map datasource. 

My question is anybody knows how to use java.util.Map datasource in the 
struts2-jasperreports-plugin?

Thanks in advance

Re: accessing an external file in the struts.xml

2013-07-02 Thread Omar Ngarigari
I moved the file placed under /WEB-INF directory, but the action class still 
cannot located the path to the file. Please help...





 From: Dave Newton 
To: Struts Users Mailing List  
Sent: Tuesday, July 2, 2013 1:26 PM
Subject: Re: accessing an external file in the struts.xml
 

You have at least one extra layer in your file path, normally you'd keep
files like this under WEB-INF, and start the file path from there.

Dave
On Jul 2, 2013 1:14 PM, "Omar Ngarigari"  wrote:

> Thanks for responding to my question. However, JBoss server does not
> explode the war deployed to it. Unlike tomcat, it does explode the war
> file, and this is why it is easy to access files within a war file.
>
>
> Here's is my code
>
> private HttpServletRequest servletRequest;
> @Override
>     public void setServletRequest(HttpServletRequest httpServletRequest) {
>         // TODO Auto-generated method stub
>         this.servletRequest = httpServletRequest;
>     }
> String filePath =
> servletRequest.getSession().getServletContext().getRealPath("/MyApp/web/jasper/jasperReport.jasper");
> However, I am getting the following path when debugging the above code:
>
>
> C:\jboss-6.0.0.Final\server\default\tmp\vfs\automounta5bfada4df82fa0e\MyApp.war-ec6d753dd0506906\web\jasper\jasperReport.jasper.
>
> The JasperReport.jar is located at the MyApp/web/jasper/ folder.
>
> Thanks,
>
> Omar N.
>
>
> 
>  From: Maurizio Cucchiara 
> To: Struts Users Mailing List ; Omar Ngarigari <
> ngarigar...@yahoo.com>
> Sent: Tuesday, July 2, 2013 12:20 PM
> Subject: Re: accessing an external file in the struts.xml
>
>
>
> Much of the answer depends on what your application server is.
> In any case, I don't think this is a good practice. IMO you should include
> the file with your webapp and find a way to access to it.
>
>
>
>
>
> Twitter     :http://www.twitter.com/m_cucchiara
> G+          :https://plus.google.com/107903711540963855921
> Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
> VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
>
> Maurizio Cucchiara
>
>
> On 2 July 2013 18:05, Omar Ngarigari  wrote:
>
> Hello,
> >
> >Is it possible to access a file that is located in the local drive or
> server side folder from struts.xml? as follow:
> >
> >
> >C:/Folder/jasperReport.jasper
> >or
> > >
> >
> >
> >My struts2 application is deployed on JBoss as 6, it seems
> ServletRequestAware is unable to access the folder within war file while
> working with JBoss. It is working fine with tomcat. I am thinking about
> accessing files in the server size instead.
> >
> >Thanks,
> >

Re: accessing an external file in the struts.xml

2013-07-02 Thread Omar Ngarigari
Thanks for responding to my question. However, JBoss server does not explode 
the war deployed to it. Unlike tomcat, it does explode the war file, and this 
is why it is easy to access files within a war file. 


Here's is my code

private HttpServletRequest servletRequest;
@Override
    public void setServletRequest(HttpServletRequest httpServletRequest) {
        // TODO Auto-generated method stub
        this.servletRequest = httpServletRequest;
    }
String filePath = 
servletRequest.getSession().getServletContext().getRealPath("/MyApp/web/jasper/jasperReport.jasper");
However, I am getting the following path when debugging the above code:

C:\jboss-6.0.0.Final\server\default\tmp\vfs\automounta5bfada4df82fa0e\MyApp.war-ec6d753dd0506906\web\jasper\jasperReport.jasper.

The JasperReport.jar is located at the MyApp/web/jasper/ folder.

Thanks,

Omar N.



 From: Maurizio Cucchiara 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Tuesday, July 2, 2013 12:20 PM
Subject: Re: accessing an external file in the struts.xml
 


Much of the answer depends on what your application server is.
In any case, I don't think this is a good practice. IMO you should include the 
file with your webapp and find a way to access to it.
 




Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara

Maurizio Cucchiara


On 2 July 2013 18:05, Omar Ngarigari  wrote:

Hello,
>
>Is it possible to access a file that is located in the local drive or server 
>side folder from struts.xml? as follow:
>
>
>C:/Folder/jasperReport.jasper
>or
>
>
>
>My struts2 application is deployed on JBoss as 6, it seems ServletRequestAware 
>is unable to access the folder within war file while working with JBoss. It is 
>working fine with tomcat. I am thinking about accessing files in the server 
>size instead.
>
>Thanks,
>

accessing an external file in the struts.xml

2013-07-02 Thread Omar Ngarigari
Hello,

Is it possible to access a file that is located in the local drive or server 
side folder from struts.xml? as follow:


C:/Folder/jasperReport.jasper
or


Re: Warning message when execAndWait

2013-06-27 Thread Omar Ngarigari
1. Yes struts.dev is setted to false.
2. This is how I am using the interceptor:

         
             1000
                1000
                    
         /pages/wait.jsp
3. I am using struts2.3.1.2

Thanks,





 From: Felipe Lorenz 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Thursday, June 27, 2013 4:27 PM
Subject: Re: Warning message when execAndWait
 

Hello Omar,

Is needed more information, but I can guess some things:

1 - struts.dev is setted to false?
2 - are you using token interceptor?
3 - if yes, there is a token value in the submitted form? 
4 - what version of struts are the project using? there is a resolved issue 
about it: https://issues.apache.org/jira/browse/WW-1741

Att,

Felipe Lorenz

Em 27/06/2013, às 17:14, Omar Ngarigari escreveu:

> Hello,
> 
> Is anybody knows why I am getting the following warning message while waiting 
> page is displaying. (execAndWait)?
> 
> WARN  [org.apache.struts2.util.TokenHelper] Could not find token mapped to 
> token name struts.token
> 
> Thanks,

Warning message when execAndWait

2013-06-27 Thread Omar Ngarigari
Hello,

Is anybody knows why I am getting the following warning message while waiting 
page is displaying. (execAndWait)?

WARN  [org.apache.struts2.util.TokenHelper] Could not find token mapped to 
token name struts.token

Thanks,


How to submit a form with enter key

2013-06-05 Thread Omar Ngarigari
Hello,

I am not able to submit a form using "enter key" from the keyboard. The form is 
as follow:



                
                
                    
                    
                    
                
                
                             
                 
                 
                           
                 
            
                 
                
             
               
                
              
            
            
                
            
        

Re: generating taglib using Ant and Java 6

2013-04-04 Thread Omar Ngarigari
Struts3 is coming? Great! how soon?



 From: Dave Newton 
To: Struts Users Mailing List  
Sent: Thursday, April 4, 2013 7:45 PM
Subject: Re: generating taglib using Ant and Java 6
 
Nope.
On Apr 4, 2013 7:39 PM, "Omar Ngarigari"  wrote:

> Did you mean Struts2?
>
>
> 
>  From: Lukasz Lenart 
> To: Struts Users Mailing List 
> Sent: Thursday, April 4, 2013 12:36 PM
> Subject: Re: generating taglib using Ant and Java 6
>
> If you find a solution, please share it as we can use with Struts 3 then
> :-)
>
> 2013/4/4 Steven Yang :
> > Sorry this may not be directed to Struts2
> >
> > I have written some Struts2 taglib and want to package them into a jar.
> > I am not using maven so I used to use Ant with apt tag.
> > And my task looks like the following
> > 
> >  > srcdir="StrutsTags" compile="false" destdir="dist/apt" fork="true"
> > preprocessdir="bin" verbose="false" source="1.5" encoding="utf-8"
> >
> >
> factory="org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory"
> > includeantruntime="false">
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  value="-AoutFile=${basedir}/bin/META-INF/struts-my-tags.tld" />
> > 
> > 
> >
> > However since java 6 apt has been removed or not supported I want to use
> > the Annotation Processor in the Java Compiler. But I couldnt find any
> > direct example and I came up with the following
> >
> > 
> >     >   debug="true"
> >   failonerror="true"
> >   compiler="javac1.6"
> >   srcdir="StrutsTags" includeantruntime="false" encoding="utf-8"
> > verbose="true">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  value="-AoutFile=${basedir}/bin/META-INF/struts-my-tags.tld" />
> > 
> > 
> >
> > When I run this the task completes successfully however nothing is
> > generated in the struts-my-tags.tld.
> >
> > Can someone tell me whats wrong?
> >
> > Thanks
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org

Re: generating taglib using Ant and Java 6

2013-04-04 Thread Omar Ngarigari
Did you mean Struts2? 



 From: Lukasz Lenart 
To: Struts Users Mailing List  
Sent: Thursday, April 4, 2013 12:36 PM
Subject: Re: generating taglib using Ant and Java 6
 
If you find a solution, please share it as we can use with Struts 3 then :-)

2013/4/4 Steven Yang :
> Sorry this may not be directed to Struts2
>
> I have written some Struts2 taglib and want to package them into a jar.
> I am not using maven so I used to use Ant with apt tag.
> And my task looks like the following
> 
>  srcdir="StrutsTags" compile="false" destdir="dist/apt" fork="true"
> preprocessdir="bin" verbose="false" source="1.5" encoding="utf-8"
>
> factory="org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory"
> includeantruntime="false">
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> However since java 6 apt has been removed or not supported I want to use
> the Annotation Processor in the Java Compiler. But I couldnt find any
> direct example and I came up with the following
>
> 
>       debug="true"
>   failonerror="true"
>   compiler="javac1.6"
>   srcdir="StrutsTags" includeantruntime="false" encoding="utf-8"
> verbose="true">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> When I run this the task completes successfully however nothing is
> generated in the struts-my-tags.tld.
>
> Can someone tell me whats wrong?
>
> Thanks

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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-20 Thread Omar Ngarigari
I annotated my action class as follow:

@Target({java.lang.annotation.ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME) 
public @interface SpringSecurityPrincipal {
    public String getUsername();
}

in my action class

public class AddAction extends ActionSupport implements 
ModelDriven{

private String username;

@SpringSecurityPrincipal (getUsername = "username")
public void setUsername(String username){
this.username = username;
}

public String getUsername(){
return username;
}

JSP
>> value="%{springSecurity.currentUser}"/>
>>
>> You cannot call interceptor directly, it must be an action.
>>
>>>            while (((actionClass = actionClass.getSuperclass()) != null) &&
>>> (!isDone))
>>>            {
>>>                for (Method method : actionClass.getDeclaredMethods())
>>>                {
>>>                    if
>>> ((method.getAnnotation(SpringSecurityPrincipal.class) != null) &&
>>> ((currentUser.getPrincipal() instanceof User))) {
>>>                        method.invoke(action, new Object[] {
>>> currentUser.getPrincipal() });
>>
>> This part is looking for a method annotated with the below
>> @SpringSecurityPrincipal and if it will find it, inject User object.
>>
>>> public @interface SpringSecurityPrincipal
>>
>> You must annotate action's method to allow inject User object
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.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
>

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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-20 Thread Omar Ngarigari
Which annotation type should I use in my actiom class to inject user object?

Sent from my iPhone

On Mar 20, 2013, at 2:14 AM, Lukasz Lenart  wrote:

> 2013/3/20 Omar Ngarigari :
>> > value="%{springSecurity.currentUser}"/>
> 
> You cannot call interceptor directly, it must be an action.
> 
>>while (((actionClass = actionClass.getSuperclass()) != null) &&
>> (!isDone))
>>{
>>for (Method method : actionClass.getDeclaredMethods())
>>{
>>if
>> ((method.getAnnotation(SpringSecurityPrincipal.class) != null) &&
>> ((currentUser.getPrincipal() instanceof User))) {
>>method.invoke(action, new Object[] {
>> currentUser.getPrincipal() });
> 
> This part is looking for a method annotated with the below
> @SpringSecurityPrincipal and if it will find it, inject User object.
> 
>> public @interface SpringSecurityPrincipal
> 
> You must annotate action's method to allow inject User object
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.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



Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-19 Thread Omar Ngarigari
I tried your example below using interceptor, but I am having difficult 
displaying the username value in JSP. I used the User class as follow:

public class User
private String username;
private String password;

public String getUsername(){
return username;
}

public String getPassword(){
return password;
}
public void setUsername(String a){
a = username;
}

in struts.xml

             

            
                
                
            
        

        

 
/add.jsp


public class AddAction extends ActionSupport implements ModelDriven{
Add addCustomer = new Add();

public Object getModel(){
return addCustomer;
}
}

JSP


I am not sure this is correct way to display the current logged in username;

Thanks,





 From: Hernán 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Friday, March 1, 2013 2:33 PM
Subject: Re: How to pass the current logged in username to struts2 action from 
spring security 3
 
In order to have the user available in several action objects, you could
write an interceptor, this is the way struts2 handles the so called cross
cutting concerns (it would be Aspect Oriented Programming in Spring)

Here's the class:

package com.tipuana.csa.interceptor;

import java.lang.reflect.Method;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.tipuana.csa.model.User;

@SuppressWarnings("serial")
public class SpringSecurityInterceptor extends AbstractInterceptor {

    public String intercept(ActionInvocation actionInvocation)
            throws Exception {

        Object action = actionInvocation.getAction();

        Authentication currentUser =
SecurityContextHolder.getContext().getAuthentication();

        if (currentUser != null) {

            @SuppressWarnings("rawtypes")
            Class actionClass = action.getClass();
            boolean isDone = false;

            while (((actionClass = actionClass.getSuperclass()) != null) &&
(!isDone))
            {
                for (Method method : actionClass.getDeclaredMethods())
                {
                    if
((method.getAnnotation(SpringSecurityPrincipal.class) != null) &&
((currentUser.getPrincipal() instanceof User))) {
                        method.invoke(action, new Object[] {
currentUser.getPrincipal() });
                        isDone = true;

                        break;
                    }
                }

            }

        }

        return actionInvocation.invoke();
    }
}

package com.tipuana.csa.interceptor;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({java.lang.annotation.ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface SpringSecurityPrincipal
{
}

Then in struts.xml something like this:


        
            

            
                
                
            
        

        

On Fri, Mar 1, 2013 at 11:03 AM, Omar Ngarigari wrote:

> Thanks Lukasz, I will give a try.
>
>
>
>
> 
>  From: Lukasz Lenart 
> To: Struts Users Mailing List 
> Sent: Friday, March 1, 2013 7:01 AM
> Subject: Re: How to pass the current logged in username to struts2 action
> from spring security 3
>
> 2013/3/1 Omar Ngarigari :
> > Thanks Luksz for replying, but what i want is to use the username in
> Struts 2 action class and display in struts2 jsp tags
>
> Use that code to read username in your action and then show it using S2
> tags
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>



-- 
Hernán

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-01 Thread Omar Ngarigari
Thanks Lukasz, I will give a try.





 From: Lukasz Lenart 
To: Struts Users Mailing List  
Sent: Friday, March 1, 2013 7:01 AM
Subject: Re: How to pass the current logged in username to struts2 action from 
spring security 3
 
2013/3/1 Omar Ngarigari :
> Thanks Luksz for replying, but what i want is to use the username in Struts 2 
> action class and display in struts2 jsp tags

Use that code to read username in your action and then show it using S2 tags


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-01 Thread Omar Ngarigari
Thanks Luksz for replying, but what i want is to use the username in Struts 2 
action class and display in struts2 jsp tags

Sent from my iPhone

On Mar 1, 2013, at 1:09 AM, Lukasz Lenart  wrote:

> 2013/3/1 Omar Ngarigari :
>> Hello,
>> 
>> Thanks in advance. I have an application that uses Spring Security 3 + 
>> Struts2. The integration works just fine. I can login without an issue. 
>> However, I would like to get the username in the Struts2 action class so 
>> that I can display in the Struts2 tags jsp pages.
> 
> UserDetails userDetails =
> (UserDetails)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
> 
> http://stackoverflow.com/questions/6161985/get-userdetails-object-from-security-context-in-spring-mvc-controller
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.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



How to pass the current logged in username to struts2 action from spring security 3

2013-02-28 Thread Omar Ngarigari
Hello,

Thanks in advance. I have an application that uses Spring Security 3 + Struts2. 
The integration works just fine. I can login without an issue. However, I would 
like to get the username in the Struts2 action class so that I can display in 
the Struts2 tags jsp pages.

Omar N.

Re: s:checkbox inside s:iterator in struts2.3.1.2

2012-09-24 Thread Omar Ngarigari
I figured it out. I think the correct way is to use fieldValue instead of 
value. It is working now. Thanks so much for your help.





 From: Lukasz Lenart 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, September 24, 2012 2:08 PM
Subject: Re: s:checkbox inside s:iterator in struts2.3.1.2
 
2012/9/24 Omar Ngarigari :
> Hello,
>
> I changed my JSP page as per the documentation recommendation:
>
> 
> 
> 
> 
> 

And works ?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

Re: s:checkbox inside s:iterator in struts2.3.1.2

2012-09-24 Thread Omar Ngarigari
Hello,

I changed my JSP page as per the documentation recommendation:





 


However. the error is still displaying. 
com.opensymphony.xwork2.ognl.OgnlValueStack] Error setting expression 'age' 
with value '[Ljava.lang.String;@1cf93cb': ognl.MethodFailedException: Method 
"setAge" failed for object


 From: Lukasz Lenart 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, September 24, 2012 12:50 AM
Subject: Re: s:checkbox inside s:iterator in struts2.3.1.2
 
2012/9/24 Omar Ngarigari :
> Hello,
>
> Please help, I am having problem that I cannot figure out how to solve it. 
> The problem is as follow:
>
> 1. JSP page:
> 
> 
> 
> 
> 
>
> 2. Action Class
> public class ExampleAction extends ActionSupport {
> private List myList = new ArrayList();
> private List stringList = new ArrayList();
> private int age;
> getter/setters()
>
> public String execute(){
> generatePDFFile(age);
> return Action.SUCCESS;
> }
> }
>
> My problem is I don't know how to get the age in checkbox at JSP page back in 
> the action class to generate PDF file. The PDF file is generated based on the 
> age from the JSP. Is there any one can help me to achieve that.

Please check the documentation [1] as I've mixed attributes, attribute
name is the name of property to set, attribute fieldValue will be
evaluated to HTML attribute value (true/false) - check the examples in
the doc.

[1] http://struts.apache.org/2.x/docs/checkbox.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

Re: s:checkbox inside s:iterator in struts2.3.1.2

2012-09-24 Thread Omar Ngarigari
Hello,

I changed my JSP page as per the documentation recommendation:





 




 From: Lukasz Lenart 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, September 24, 2012 12:50 AM
Subject: Re: s:checkbox inside s:iterator in struts2.3.1.2
 
2012/9/24 Omar Ngarigari :
> Hello,
>
> Please help, I am having problem that I cannot figure out how to solve it. 
> The problem is as follow:
>
> 1. JSP page:
> 
> 
> 
> 
> 
>
> 2. Action Class
> public class ExampleAction extends ActionSupport {
> private List myList = new ArrayList();
> private List stringList = new ArrayList();
> private int age;
> getter/setters()
>
> public String execute(){
> generatePDFFile(age);
> return Action.SUCCESS;
> }
>
 }
>
> My problem is I don't know how to get the age in checkbox at JSP page back in 
> the action class to generate PDF file. The PDF file is generated based on the 
> age from the JSP. Is there any one can help me to achieve that.

Please check the documentation [1] as I've mixed attributes, attribute
name is the name of property to set, attribute fieldValue will be
evaluated to HTML attribute value (true/false) - check the examples in
the doc.

[1] http://struts.apache.org/2.x/docs/checkbox.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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

s:checkbox inside s:iterator in struts2.3.1.2

2012-09-23 Thread Omar Ngarigari
Hello,

Please help, I am having problem that I cannot figure out how to solve it. The 
problem is as follow:

1. JSP page:






2. Action Class
public class ExampleAction extends ActionSupport {
private List myList = new ArrayList();
private List stringList = new ArrayList();
private int age;
getter/setters()

public String execute(){
generatePDFFile(age);
return Action.SUCCESS;
}
}

My problem is I don't know how to get the age in checkbox at JSP page back in 
the action class to generate PDF file. The PDF file is generated based on the 
age from the JSP. Is there any one can help me to achieve that.

Thanks,

Omar N.

Re: struts2.3.1.2 does not come with jquery-plugin jar

2012-08-15 Thread Omar Ngarigari
Thanks Dave for responding. I am expecting to see the "spinning wheel" which is 
an indicator image (images/indicator.gif) to display when I click on the submit 
button. I am getting javascript error, but it does not say much other than 
"object expected:. I am using normal struts2 tags on the form and jquery tags 
on submut button.
This is my jar files:

struts2-core-2.3.1.2
struts2-jquery-plugin-3.3.1.jar


Thanks,



 From: Dave Newton 
To: Struts Users Mailing List  
Sent: Wednesday, August 15, 2012 10:57 AM
Subject: Re: struts2.3.1.2 does not come with jquery-plugin jar
 
Without knowing anything about what is or isn't working, what's supposed to
happen vs. what does, it's really difficult to provide assistance. I don't
see a taglib for the normal S2 tags, though.

Dave

On Wed, Aug 15, 2012 at 9:27 AM, Omar Ngarigari wrote:

> Yes, I have tried it before, I did not get the expected results, but It
> could be due to some other related issues I am not aware of it. I am trying
> to show the indicator image when the request is made. I don't want to use
> the action name on the form because I have several submit buttons that
> shares the same form.
>
> This is how I did it.
> <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
> 
> 
> 
> 
> 
>
>  button="true" style="width:20em;"/>
> 
>  alt="Loading..."/>
>
>
> 
>  From: Umesh Awasthi 
> To: Struts Users Mailing List ; Omar Ngarigari <
> ngarigar...@yahoo.com>
> Sent: Wednesday, August 15, 2012 9:10 AM
> Subject: Re: struts2.3.1.2 does not come with jquery-plugin jar
>
> I believe there should not be any issue while using this combination.
> Have you tried this or facing any issue?
>
> On Wed, Aug 15, 2012 at 6:33 PM, Omar Ngarigari  >wrote:
>
> > Hello,
> >
> > I just want to know if it is okay to use struts2-jquery-plugin.3.3.1.jar
> > with struts2-core-.3.1.2.jar.
> >
> > Thanks,
>
>
>
>
> --
> With Regards
> Umesh Awasthi
> http://www.travellingrants.com/
>



-- 
e: davelnew...@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits Blog <http://buckybits.blogspot.com/>

Re: struts2.3.1.2 does not come with jquery-plugin jar

2012-08-15 Thread Omar Ngarigari
Yes, I have tried it before, I did not get the expected results, but It could 
be due to some other related issues I am not aware of it. I am trying to show 
the indicator image when the request is made. I don't want to use the action 
name on the form because I have several submit buttons that shares the same 
form.

This is how I did it.
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>







 




 From: Umesh Awasthi 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Wednesday, August 15, 2012 9:10 AM
Subject: Re: struts2.3.1.2 does not come with jquery-plugin jar
 
I believe there should not be any issue while using this combination.
Have you tried this or facing any issue?

On Wed, Aug 15, 2012 at 6:33 PM, Omar Ngarigari wrote:

> Hello,
>
> I just want to know if it is okay to use struts2-jquery-plugin.3.3.1.jar
> with struts2-core-.3.1.2.jar.
>
> Thanks,




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

struts2.3.1.2 does not come with jquery-plugin jar

2012-08-15 Thread Omar Ngarigari
Hello,

I just want to know if it is okay to use struts2-jquery-plugin.3.3.1.jar with 
struts2-core-.3.1.2.jar.

Thanks,

Re: Including JSP page from a jar file that placed on /WEB-INF/lib

2012-07-26 Thread Omar Ngarigari
Yes, my jar file contains just plain common JSP files (file.jsp)

Sent from my iPhone

On Jul 25, 2012, at 11:43 PM, Shrinivas Parashar 
 wrote:

> Hi,
> Does your jar contains JSP or precompiled JSP (.class of Servlet)
> 
> Regards,
> Shrinivas
> 
> -Original Message-
> From: paulus.benedic...@gmail.com [mailto:paulus.benedic...@gmail.com] On 
> Behalf Of Paul Benedict
> Sent: 26 July 2012 01:26
> To: Struts Users Mailing List; Omar Ngarigari
> Subject: Re: Including JSP page from a jar file that placed on /WEB-INF/lib
> 
> Omar,
> 
> JSP does not support reading from bundled libraries. You must extract
> your content into your web application.
> 
> Paul
> 
> On Wed, Jul 25, 2012 at 2:23 PM, Omar Ngarigari  wrote:
>> Hello,
>> 
>> I would like know how to include a JSP page that was bundled in the jar file 
>> (WEB-INF/lib) using struts2. I used s:include tag, but I got the error 
>> (Exception thrown during invlude of /common/header.jsp"
>> 
>> 1 - web/common/header is in the jar file under WEB-INF/lib
>> 2  - in the mypages.jsp, I used 
>> 
>> Thanks,
>> 
>> 
>> 
>> From: JOSE L MARTINEZ-AVIAL 
>> To: Struts Users Mailing List 
>> Sent: Tuesday, July 24, 2012 1:00 AM
>> Subject: Tag s:textfield does not parse OGNL expressions for dynamic 
>> attributes
>> 
>> Hi,
>> I have the following textfield:
>>   >   name="userLoginName" theme="simple"
>>   id="userLoginName"
>>   maxLength="20"
>>   regExp="^\w{6,20}$"
>>   trim="true"
>>   uppercase="true"
>>   dojoType="dijit.form.ValidationTextBox"
>>   required="true"
>>   intermediateChanges=false
>>   invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>> 
>> The OGNL expression in the invalidMessage attribute is not been parsed, it
>> just puts the expression in the attribute. Am I doing something wrong, or
>> is it a bug?
>> 
>>  Thanks
>> 
>> JL
> 
> -
> 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



Including JSP page from a jar file that placed on /WEB-INF/lib

2012-07-25 Thread Omar Ngarigari
Hello,

I would like know how to include a JSP page that was bundled in the jar file 
(WEB-INF/lib) using struts2. I used s:include tag, but I got the error 
(Exception thrown during invlude of /common/header.jsp" 

1 - web/common/header is in the jar file under WEB-INF/lib
2  - in the mypages.jsp, I used 

Thanks,



 From: JOSE L MARTINEZ-AVIAL 
To: Struts Users Mailing List  
Sent: Tuesday, July 24, 2012 1:00 AM
Subject: Tag s:textfield does not parse OGNL expressions for dynamic attributes
 
Hi,
I have the following textfield:
       

The OGNL expression in the invalidMessage attribute is not been parsed, it
just puts the expression in the attribute. Am I doing something wrong, or
is it a bug?

  Thanks

JL

Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Omar Ngarigari
I am using struts 2.3.1.2 version and also using simple theme.



 From: Maurizio Cucchiara 
To: Struts Users Mailing List  
Sent: Monday, June 18, 2012 10:01 AM
Subject: Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction
 
Could you specify your struts2 version?
I have a lot of apps based on the stack you mentioned and I've never seen
something similar.
Did you investigate if it is a struts issue or is something related to
the synergy with spring?

Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara


On 18 June 2012 15:03, Hernán  wrote:

> I have upgraded a webApp using struts 2 to use Spring 3 and Spring Security
> 3.1, before that Spring 2.5 and Spring Security 2 was used. The problem is
> that when using redirectAction I get a
> !Namespace?parameters#namespace added to the URL's and that is not a good
> idea... I need the URL without that things added. Do you know what is
> happening?
>
> --
> Hernán
>

Re: How to repopulate data on s:textfield after validation error

2012-06-15 Thread Omar Ngarigari
The default value is list value. For example, my code is as follow:



What I want is on validation error to repopulated data that user entered not 
the one that comes with list from database.



 From: Łukasz Lenart 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Friday, June 15, 2012 9:29 AM
Subject: Re: How to repopulate data on s:textfield after validation error
 
2012/6/15 Omar Ngarigari :
> Please advice me on how to repopulate data on s:textfield after validation 
> error. When a user enters some values on the s:textfield or s:select fields 
> and click submit button validation error displays, the values goes back to 
> the default not the ones that a user entered in first place.

You must have something wrong with your code, as you said, it returns
to defaults which means you override what was entered by user.


Regards
-- 
Łukasz
mobile +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

How to repopulate data on s:textfield after validation error

2012-06-15 Thread Omar Ngarigari
Hello,

Please advice me on how to repopulate data on s:textfield after validation 
error. When a user enters some values on the s:textfield or s:select fields and 
click submit button validation error displays, the values goes back to the 
default not the ones that a user entered in first place.

Thanks in advance,


Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Omar Ngarigari
Just thought it would be good idea to update everyone here, I finally figured 
it out what was my problem. I was using spring in my DAO with @Service and 
@Autowired annotations. Apparantely, these annotation are singleton by default. 
I added @Scope("prototype") and everything works as expected. Thanks Maurizio 
and Chris for your help. 

Thanks, 



 From: Maurizio Cucchiara 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, June 4, 2012 2:42 PM
Subject: Re: Struts2 (caching, valuestack, etc...) problem
 
Are you using spring plugin?
Looks like you are using a previous initialized instance of your action
class.
If yes, ensure that the scope is prototype and not the default one (which
is singletone)

Sent from my mobile device, so please excuse typos and brevity.

Maurizio Cucchiara
Il giorno 04/giu/2012 20.10, "Omar Ngarigari"  ha
scritto:

> Hi All,
>
> I have developed an application using struts2.3.1.2, but I
> am experiencing a weird situation that I have bumping my head for a week
> now, but It does not go away.
>
> Scenario 1 - I have a query page (jsp) where I have to query database
> based on the quarter date an input. If I entered a quarter that does not
> have data in the database, I receive an appropriate error message saying
> there is no record found. (That is fine!).
>
> Scenario 2 - On the same query page,  I entered a quarter date that has
> record in the database, then a report is generated. (That is fine!)
>
> Scenario 3 - This is where I am having problem. I click on the back button
> of the IE browser to navigate from the report page back to the query page,
> and at the query page, I entered the same quarter date that I entered at
> the scenario 1, I get the report that was generated on scenario2 rather
> than error message as scenario1.
>
> I have searching all over the place, but not luck. I would appreciate any
> help or clue to the problem.
>
> Thanks,
>
> Omar N.

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Omar Ngarigari
I added the scope to prototype in my spring beans definitions. However, the 
problem persisting. I deleted my browser history and ran the application.



 From: Maurizio Cucchiara 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, June 4, 2012 2:42 PM
Subject: Re: Struts2 (caching, valuestack, etc...) problem
 

Are you using spring plugin?
Looks like you are using a previous initialized instance of your action class.
If yes, ensure that the scope is prototype and not the default one (which is 
singletone)
Sent from my mobile device, so please excuse typos and brevity.
Maurizio Cucchiara
Il giorno 04/giu/2012 20.10, "Omar Ngarigari"  ha 
scritto:

Hi All,
>
>I have developed an application using struts2.3.1.2, but I 
>am experiencing a weird situation that I have bumping my head for a week now, 
>but It does not go away. 
>
>Scenario 1 - I have a query page (jsp) where I have to query database based on 
>the quarter date an input. If I entered a quarter that does not have data in 
>the database, I receive an appropriate error message saying there is no record 
>found. (That is fine!).
>
>Scenario 2 - On the same query page,  I entered a quarter date that has record 
>in the database, then a report is generated. (That is fine!)
>
>Scenario 3 - This is where I am having problem. I click on the back button of 
>the IE browser to navigate from the report page back to the query page, and at 
>the query page, I entered the same quarter date that I entered at the scenario 
>1, I get the report that was generated on scenario2 rather than error message 
>as scenario1.
>
>I have searching all over the place, but not luck. I would appreciate any help 
>or clue to the problem.
>
>Thanks,
>
>Omar N. 

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Omar Ngarigari
You might be right.  I am using spring-plugin and my beans definition are not 
set to any scope. I will try to use prototype. Thanks a lot, let me make the 
changes and I will let you know my findings.



 From: Maurizio Cucchiara 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, June 4, 2012 2:42 PM
Subject: Re: Struts2 (caching, valuestack, etc...) problem
 
Are you using spring plugin?
Looks like you are using a previous initialized instance of your action
class.
If yes, ensure that the scope is prototype and not the default one (which
is singletone)

Sent from my mobile device, so please excuse typos and brevity.

Maurizio Cucchiara
Il giorno 04/giu/2012 20.10, "Omar Ngarigari"  ha
scritto:

> Hi All,
>
> I have developed an application using struts2.3.1.2, but I
> am experiencing a weird situation that I have bumping my head for a week
> now, but It does not go away.
>
> Scenario 1 - I have a query page (jsp) where I have to query database
> based on the quarter date an input. If I entered a quarter that does not
> have data in the database, I receive an appropriate error message saying
> there is no record found. (That is fine!).
>
> Scenario 2 - On the same query page,  I entered a quarter date that has
> record in the database, then a report is generated. (That is fine!)
>
> Scenario 3 - This is where I am having problem. I click on the back button
> of the IE browser to navigate from the report page back to the query page,
> and at the query page, I entered the same quarter date that I entered at
> the scenario 1, I get the report that was generated on scenario2 rather
> than error message as scenario1.
>
> I have searching all over the place, but not luck. I would appreciate any
> help or clue to the problem.
>
> Thanks,
>
> Omar N.

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Omar Ngarigari
I am running the application on jboss6 app server. I don't see anything on 
server console. I have debugged the app, I can see that the new input quarter 
date is returned when the request is made on the app log file. I tried your 
suggestions by adding ?something=kskdsds at the end of the url, but I got no 
record found. Can you show me how to clean a cache?



 From: Chris Pratt 
To: Struts Users Mailing List ; Omar Ngarigari 
 
Sent: Monday, June 4, 2012 2:17 PM
Subject: Re: Struts2 (caching, valuestack, etc...) problem
 
Are you watching your server console?  Are you sure it's actually making
the request and not displaying the cached page.  If it is just showing you
the cached page, try appending some nonsense parameter to the end of the
URL (i.e. ?dummy=aalskdjfkal).

Otherwise, you'll have to look into your action processing, you must be
retrieving something from a cache somewhere.
  (*Chris*)

On Mon, Jun 4, 2012 at 11:09 AM, Omar Ngarigari wrote:

> Hi All,
>
> I have developed an application using struts2.3.1.2, but I
> am experiencing a weird situation that I have bumping my head for a week
> now, but It does not go away.
>
> Scenario 1 - I have a query page (jsp) where I have to query database
> based on the quarter date an input. If I entered a quarter that does not
> have data in the database, I receive an appropriate error message saying
> there is no record found. (That is fine!).
>
> Scenario 2 - On the same query page,  I entered a quarter date that has
> record in the database, then a report is generated. (That is fine!)
>
> Scenario 3 - This is where I am having problem. I click on the back button
> of the IE browser to navigate from the report page back to the query page,
> and at the query page, I entered the same quarter date that I entered at
> the scenario 1, I get the report that was generated on scenario2 rather
> than error message as scenario1.
>
> I have searching all over the place, but not luck. I would appreciate any
> help or clue to the problem.
>
> Thanks,
>
> Omar N.

Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Omar Ngarigari
Hi All,

I have developed an application using struts2.3.1.2, but I 
am experiencing a weird situation that I have bumping my head for a week now, 
but It does not go away. 

Scenario 1 - I have a query page (jsp) where I have to query database based on 
the quarter date an input. If I entered a quarter that does not have data in 
the database, I receive an appropriate error message saying there is no record 
found. (That is fine!).

Scenario 2 - On the same query page,  I entered a quarter date that has record 
in the database, then a report is generated. (That is fine!)

Scenario 3 - This is where I am having problem. I click on the back button of 
the IE browser to navigate from the report page back to the query page, and at 
the query page, I entered the same quarter date that I entered at the scenario 
1, I get the report that was generated on scenario2 rather than error message 
as scenario1.

I have searching all over the place, but not luck. I would appreciate any help 
or clue to the problem.

Thanks,

Omar N.