Re: Problem using tag

2009-11-26 Thread shekher awasthi
Thanks Friends! Following tag resolved the issue:


On Mon, Nov 23, 2009 at 7:58 PM, Greg Lindholm wrote:

> Check the doc for property *struts.url.includeParams*  for the version of
> struts you are using.
> You may want to change it's value to none.
>
> 
>
>
>
>
> On Sat, Nov 21, 2009 at 12:48 AM, shekher awasthi <
> shekher.awas...@gmail.com
> > wrote:
>
> > Hi Friends,
> >
> > I am using the url tag as follows:
> >
> > 
> >
> > LocalInvoice
> >
> > 
> >
> > Local Invoice
> >
> > The problem is the parameter defined in param tag is getting appended in
> > all
> > others  urls on the JSP page so affecting other url's implementation.
> >
> > Please help me / guide me in resolving this issue.
> >
> >
> >
> > Thanks,
> >
> > Shekher.
> >
>


Problem using tag

2009-11-20 Thread shekher awasthi
Hi Friends,

I am using the url tag as follows:



LocalInvoice



Local Invoice

The problem is the parameter defined in param tag is getting appended in all
others  urls on the JSP page so affecting other url's implementation.

Please help me / guide me in resolving this issue.



Thanks,

Shekher.


Re: Strange Problem With Struts2 Action

2009-11-01 Thread shekher awasthi
Thnaks Musachy,
i was about to write mail for this, that was my silly mistake probably lack
of sleep
:)


On 11/1/09, Musachy Barroso  wrote:
>
> null pointer exception in your code.
>
> On Sun, Nov 1, 2009 at 8:18 AM, shekher awasthi
>  wrote:
> > java.lang.NullPointerException
>
> >
> > com.raisonne.billsmart.challan.action.CreateChallanJob.execute(CreateChallanJob.java:41)
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Strange Problem With Struts2 Action

2009-11-01 Thread shekher awasthi
Hi All,

i am facing a strange problem with struts2 action from a webpage i am
opening up a popup window.
there are some simplle input fields in the popup window and a submit button
this is the action call from the popup window



and in the xml configuration file



/Templates/Challan/CreateJob.jsp

/Templates/Challan/CreateJob.jsp



but when ever i am hitting save button from my popup window i am getting
error with error code 500 below is the output from the console.


*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*

*exception*

javax.servlet.ServletException

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

 *root cause*

java.lang.NullPointerException

com.raisonne.billsmart.challan.action.CreateChallanJob.execute(CreateChallanJob.java:41)
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)

com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)

com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)

com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)

org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:186)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:

Re: Application Design(architecture)

2009-06-12 Thread shekher awasthi
Some of my questions are

Is there any Use of UML
How to think in terms of Design Patterns while designing the process
or any tool(s) which can help me a bit in this process

2009/6/12 shekher awasthi 

> Thanks Pawel for quick reply regarding the application how it will look
> like i have some information about it and yes i am a bit known about the
> different layers but my main point is that i worked on them level by level i
> am not aware about the whole designing process that is my main point
>
> 2009/6/12 Paweł Wielgus 
>
> Hi Shekher,
>> i'm no expert in this subject but,
>> You might read something abut RUP (rational unified process),
>> then read abut Agile and XP and SCRUM - it's not strictly about design
>> but it will give some light about the whole process.
>> In the mean time try to imagine how this app will look like,
>> and how You can present it to others - there are many tools for that,
>> and most likely You will use more than one.
>> You can take a look at Rails framework,
>> and how are common problems solved there.
>>
>> Think about such things as:
>> - presentation layer (You have stated it will be struts)(maybe do some
>> wireframes)
>> - persistence
>> - bussiness logic
>> - comunication with outside world - maybe?
>> - environement to run it
>>
>> This is very wide subject, but in the end it's all about a common sense.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>>
>> 2009/6/12 shekher awasthi :
>>  > Hi All,
>> >
>> > I would like to say sorry if u think this question is out of list, but
>> since
>> > my problem also have relation with struts2 so i thought to give a try
>> here
>> > and hope to get some positive replies.
>> >
>> > We are planning so strat a new project and yes Struts will be the
>> building
>> > block for this. I have been assigned the task for the Application Design
>> and
>> > later to lead the development team.From the last so many years, i am
>> only
>> > invloved in develpoment whatever i have been asked to develop i just
>> > followed that.
>> >
>> > Now i have to first design the Application than have to lead the
>> development
>> > process,i know most of the people here are invloved in designing process
>> so
>> > my question from all of you are how can i start this process and i am
>> > clueless at the moment.the basic question are
>> >
>> > 1. Where to start
>> > 2 How to design Application i.e what needs to be taken care of, any
>> tools
>> > that can help in designing or any other important points
>> > 3 How To redirect from Designing to Development (What should be taken
>> care
>> > when we start Develpoment Process)
>> >
>> > I can explore furthure if i get some starting point so any help in this
>> > regard will be much appriciated
>> >
>> >
>> > Thanks in advance
>> > shekher
>> >
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>


Re: Application Design(architecture)

2009-06-12 Thread shekher awasthi
Thanks Pawel for quick reply regarding the application how it will look like
i have some information about it and yes i am a bit known about the
different layers but my main point is that i worked on them level by level i
am not aware about the whole designing process that is my main point

2009/6/12 Paweł Wielgus 

> Hi Shekher,
> i'm no expert in this subject but,
> You might read something abut RUP (rational unified process),
> then read abut Agile and XP and SCRUM - it's not strictly about design
> but it will give some light about the whole process.
> In the mean time try to imagine how this app will look like,
> and how You can present it to others - there are many tools for that,
> and most likely You will use more than one.
> You can take a look at Rails framework,
> and how are common problems solved there.
>
> Think about such things as:
> - presentation layer (You have stated it will be struts)(maybe do some
> wireframes)
> - persistence
> - bussiness logic
> - comunication with outside world - maybe?
> - environement to run it
>
> This is very wide subject, but in the end it's all about a common sense.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2009/6/12 shekher awasthi :
>  > Hi All,
> >
> > I would like to say sorry if u think this question is out of list, but
> since
> > my problem also have relation with struts2 so i thought to give a try
> here
> > and hope to get some positive replies.
> >
> > We are planning so strat a new project and yes Struts will be the
> building
> > block for this. I have been assigned the task for the Application Design
> and
> > later to lead the development team.From the last so many years, i am only
> > invloved in develpoment whatever i have been asked to develop i just
> > followed that.
> >
> > Now i have to first design the Application than have to lead the
> development
> > process,i know most of the people here are invloved in designing process
> so
> > my question from all of you are how can i start this process and i am
> > clueless at the moment.the basic question are
> >
> > 1. Where to start
> > 2 How to design Application i.e what needs to be taken care of, any tools
> > that can help in designing or any other important points
> > 3 How To redirect from Designing to Development (What should be taken
> care
> > when we start Develpoment Process)
> >
> > I can explore furthure if i get some starting point so any help in this
> > regard will be much appriciated
> >
> >
> > Thanks in advance
> > shekher
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Application Design(architecture)

2009-06-12 Thread shekher awasthi
Hi All,

I would like to say sorry if u think this question is out of list, but since
my problem also have relation with struts2 so i thought to give a try here
and hope to get some positive replies.

We are planning so strat a new project and yes Struts will be the building
block for this. I have been assigned the task for the Application Design and
later to lead the development team.From the last so many years, i am only
invloved in develpoment whatever i have been asked to develop i just
followed that.

Now i have to first design the Application than have to lead the development
process,i know most of the people here are invloved in designing process so
my question from all of you are how can i start this process and i am
clueless at the moment.the basic question are

1. Where to start
2 How to design Application i.e what needs to be taken care of, any tools
that can help in designing or any other important points
3 How To redirect from Designing to Development (What should be taken care
when we start Develpoment Process)

I can explore furthure if i get some starting point so any help in this
regard will be much appriciated


Thanks in advance
shekher


Re: username availability check

2009-03-06 Thread shekher awasthi
i did this using struts 2.0.11 and AJAX but for ajax i used YUI
inmy case when user was putting his/her tinnumber i was checking that
availability in the database before proceeding furthur.

if you need any help in this regard i can help you


On 3/6/09, sajidbigler  wrote:
>
>
> hi friends,
>
> can some one help me to  do username availability check using struts2.1.6
> and ajax.where user enter user name ajax call will check availability from
> database and if user aleady in database throws error otherwise allow  user
> to enter other details.i tried to accomplish it by using bind but i was
> unable to succesed on textfield using onClick event:(
>
> Thanks
>
> Sajid
> --
> View this message in context:
> http://www.nabble.com/username-availability-check-tp22372427p22372427.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Handling Browser Back/Forward Button in Struts2

2009-01-26 Thread shekher awasthi
Thanks Pawel for such detalied description

i did all the things as mentioned by you but still its not working for me

regarding SSL its working for me bt still caching problem is there

i will again dig deep in to it and if you can provide me a small app that
will be wonderfull i can use that to compare my functionality so that i can
find out where i am doing wrong or whats going wrong in my application.


On 1/26/09, Paweł Wielgus  wrote:
>
> Hi Shekher,
> what i did is:
> 1. I added on every page:
>
>  
>  
>  
>
> - in  section at the begining of page and after  just
> before  i added:
>
> 
>  
>  
>  
> 
> - so it is doubled!
>
> 2. I added to every response:
>
>response.setHeader("Pragma", "no-cache");
>response.setHeader("Cache-Control", "no-cache");
>response.setHeader("Expires", "-1");
>
> And that's working for me under ssl. As for ssl it has nothing to do
> with struts2, it's controlled by tomcat or any other server You are
> using, i know there is ssl-plugin for s2 but i honestly don't know
> what for, maybe it is targeted for checking if request is under ssl
> and if not redirecting to ssl connection, but it's not turning ssl on
> for sure.
>
> If that won't help i can make a little app and pack it up for You, but
> it can take some time.
>
> Best greetings,
> Paweł Wielgus.
>
> 2009/1/25 shekher awasthi :
> > Hi Hi Paweł,
> >
> > i tried all the way in secure way
> >
> > i implimented SSL and now my tomcat is running on port 8443 usinh https
> > protocol
> > i have created a custom interceptor for setting the header values
> >
> > when user click logg off button this custom interceptor is working
> setting
> > the header values below is the code i am using
> >
> > ActionContext context=invocation.getInvocationContext();
> >HttpServletResponse
> > response=(HttpServletResponse)context.get(StrutsStatics.HTTP_RESPONSE);
> >if(response!=null){
> >System.out.println("**setting
> > header**");
> >response.setHeader("Cache-Control", "must-revalidate");
> >response.setHeader("Cache-Control", "max-age=0");
> >response.setHeader("Pragma", "no-cache");//HTTP 1.1
> >response.setDateHeader ("Expires", 0); //prevents caching
> at
> > the proxy
> >        response.setHeader("Cache-Control","no-store"); //HTTP 1.1
> >
> >}
> >
> > and on my logot message i have something like this
> >
> > 
> > 
> > 
> > 
> >
> > but still results are same
> > i can go back to secure page using browser back button
> > any idea  why this is going on??
> >
> > or do i need to set anything apart from this?
> >
> > -shekher
> >
> > On Fri, Jan 23, 2009 at 9:06 PM, shekher awasthi
> > wrote:
> >
> >> Can you guide me the way how to use SSL in struts2 i am looking in to
> this
> >>
> >> IDE i am using is MyEclispe
> >>
> >> and i am testing it using tomcat
> >>
> >> On Fri, Jan 23, 2009 at 7:33 PM, Paweł Wielgus 
> wrote:
> >>
> >>> Hi Shekher,
> >>> all my testing was under SSL connection. So without pragma and cache
> >>> control it's not working - sadly.
> >>>
> >>> Best greetings,
> >>> Paweł Wielgus.
> >>>
> >>> 2009/1/22 shekher awasthi :
> >>>  > Hi Paweł,
> >>> >
> >>> > another way we can do this by using SSL
> >>> > as we are dealing in secure zone so using SSL for this might be a
> good
> >>> case.
> >>> >
> >>> > the application i have seen so far who have dealt with this
> back/forward
> >>> > button always using HTTPS protocol.
> >>> >
> >>> > i am also diving in to this case study and will share the results
> >>> >
> >>> >
> >>> > On 1/22/09, shekher awasthi  wrote:
> >>> >>
> >>> >> one of the banking application site which i tested today
> >>> >>
> >>> >> when user get logged off from and try to hit the back button he will
> be
> >>> >> shown a different page
> >>> >

Re: Handling Browser Back/Forward Button in Struts2

2009-01-24 Thread shekher awasthi
Hi Hi Paweł,

i tried all the way in secure way

i implimented SSL and now my tomcat is running on port 8443 usinh https
protocol
i have created a custom interceptor for setting the header values

when user click logg off button this custom interceptor is working setting
the header values below is the code i am using

ActionContext context=invocation.getInvocationContext();
HttpServletResponse
response=(HttpServletResponse)context.get(StrutsStatics.HTTP_RESPONSE);
if(response!=null){
System.out.println("**setting
header**");
response.setHeader("Cache-Control", "must-revalidate");
response.setHeader("Cache-Control", "max-age=0");
response.setHeader("Pragma", "no-cache");//HTTP 1.1
response.setDateHeader ("Expires", 0); //prevents caching at
the proxy
response.setHeader("Cache-Control","no-store"); //HTTP 1.1

}

and on my logot message i have something like this






but still results are same
i can go back to secure page using browser back button
any idea  why this is going on??

or do i need to set anything apart from this?

-shekher

On Fri, Jan 23, 2009 at 9:06 PM, shekher awasthi
wrote:

> Can you guide me the way how to use SSL in struts2 i am looking in to this
>
> IDE i am using is MyEclispe
>
> and i am testing it using tomcat
>
> On Fri, Jan 23, 2009 at 7:33 PM, Paweł Wielgus  wrote:
>
>> Hi Shekher,
>> all my testing was under SSL connection. So without pragma and cache
>> control it's not working - sadly.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>> 2009/1/22 shekher awasthi :
>>  > Hi Paweł,
>> >
>> > another way we can do this by using SSL
>> > as we are dealing in secure zone so using SSL for this might be a good
>> case.
>> >
>> > the application i have seen so far who have dealt with this back/forward
>> > button always using HTTPS protocol.
>> >
>> > i am also diving in to this case study and will share the results
>> >
>> >
>> > On 1/22/09, shekher awasthi  wrote:
>> >>
>> >> one of the banking application site which i tested today
>> >>
>> >> when user get logged off from and try to hit the back button he will be
>> >> shown a different page
>> >> instead the one in the cache
>> >> so i am also loking in to this aspect.
>> >>
>> >>
>> >>  On 1/22/09, shekher awasthi  wrote:
>> >>>
>> >>> using javascript is not a sure short solution
>> >>> as i tested it throughly and javascript behaviour is not consistent
>> >>> throught
>> >>>
>> >>> regarding setting header i did this i developed a custom interceptor
>> which
>> >>> is doing this
>> >>>
>> >>> but again its not worked as expected.
>> >>> i am still clueless how online banking application doing this trick
>> >>>
>> >>> i am still on R&D mode for this if find anything will share it
>> >>>
>> >>>
>> >>>  On 1/22/09, Paweł Wielgus  wrote:
>> >>>>
>> >>>> Hi Ehtesham,
>> >>>> it was said before on this thread that user can simply turn of
>> >>>> javascript whenever he wants,
>> >>>> thats why i was looking for more server controlled solution. But
>> thank
>> >>>> You for pointing it out, You made me to add it to my blog post.
>> >>>>
>> >>>> Best greetings,
>> >>>> Paweł Wielgus.
>> >>>>
>> >>>> 2009/1/22 Ehteshamul Haque :
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > Hi,
>> >>>> >
>> >>>> > I am not that much expert I I used the following javascript code
>> before
>> >>>> in each page and it workded fine.
>> >>>> >
>> >>>> >
>> >>>> > 
>> >>>> > var x=window.history.length;
>> >>>> > if (window.history[x]!=window.location)
>> >>>> > {
>> >>>> > window.history.forward();
>> >>>> > }
>> >>>> > 
>> >>>> >
>> >>>> > If it work for you I will be very happy.
>> >>>>

Struts2 and SSL

2009-01-23 Thread shekher awasthi
HI All,

i am trying to impliment SSL in my application using struts2-ssl-plugin


i am using o interceptor  for SSL implimentation which is a part of the SSL
plugin a

when i am testing my application browser first time providing information
abt the security certificate

console is giving the following log information


10:32:33,296 INFO com.googlecode.sslplugin.interceptors.SSLInterceptor
-Going to SSL mode, redirecting to
No result returned for action com.opensymphony.xwork2.ActionSupport at
action -
file:/F:/EclipseProjects2009/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/BillSmart/WEB-INF/classes/com/raisonne/billsmart/user/action/user.xml:79:29


do any one have idea where i am doing wrong

thanks in advance


Problem in sending mail to mailing list

2009-01-23 Thread shekher awasthi
Hi All,

I am unable to send new mail in struts2 mailing list while i was able to
reply to one of the post in the mailing list

when i am trying to paste content of my xml file it is giving me the
following error

Google tried to deliver your message, but it was rejected by the recipient
domain. We recommend contacting the other email provider for further
information about the cause of this error. The error that the other server
returned was: 552 552 spam score (5.0) exceeded threshold (state 18).

can any body poin tme the reason

even i susbcribed mailing list to my alternative id butsame problem is
coming there also

any help in this regard?


Re: Handling Browser Back/Forward Button in Struts2

2009-01-23 Thread shekher awasthi
Can you guide me the way how to use SSL in struts2 i am looking in to this

IDE i am using is MyEclispe

and i am testing it using tomcat

On Fri, Jan 23, 2009 at 7:33 PM, Paweł Wielgus  wrote:

> Hi Shekher,
> all my testing was under SSL connection. So without pragma and cache
> control it's not working - sadly.
>
> Best greetings,
> Paweł Wielgus.
>
> 2009/1/22 shekher awasthi :
>  > Hi Paweł,
> >
> > another way we can do this by using SSL
> > as we are dealing in secure zone so using SSL for this might be a good
> case.
> >
> > the application i have seen so far who have dealt with this back/forward
> > button always using HTTPS protocol.
> >
> > i am also diving in to this case study and will share the results
> >
> >
> > On 1/22/09, shekher awasthi  wrote:
> >>
> >> one of the banking application site which i tested today
> >>
> >> when user get logged off from and try to hit the back button he will be
> >> shown a different page
> >> instead the one in the cache
> >> so i am also loking in to this aspect.
> >>
> >>
> >>  On 1/22/09, shekher awasthi  wrote:
> >>>
> >>> using javascript is not a sure short solution
> >>> as i tested it throughly and javascript behaviour is not consistent
> >>> throught
> >>>
> >>> regarding setting header i did this i developed a custom interceptor
> which
> >>> is doing this
> >>>
> >>> but again its not worked as expected.
> >>> i am still clueless how online banking application doing this trick
> >>>
> >>> i am still on R&D mode for this if find anything will share it
> >>>
> >>>
> >>>  On 1/22/09, Paweł Wielgus  wrote:
> >>>>
> >>>> Hi Ehtesham,
> >>>> it was said before on this thread that user can simply turn of
> >>>> javascript whenever he wants,
> >>>> thats why i was looking for more server controlled solution. But thank
> >>>> You for pointing it out, You made me to add it to my blog post.
> >>>>
> >>>> Best greetings,
> >>>> Paweł Wielgus.
> >>>>
> >>>> 2009/1/22 Ehteshamul Haque :
> >>>> >
> >>>> >
> >>>> >
> >>>> > Hi,
> >>>> >
> >>>> > I am not that much expert I I used the following javascript code
> before
> >>>> in each page and it workded fine.
> >>>> >
> >>>> >
> >>>> > 
> >>>> > var x=window.history.length;
> >>>> > if (window.history[x]!=window.location)
> >>>> > {
> >>>> > window.history.forward();
> >>>> > }
> >>>> > 
> >>>> >
> >>>> > If it work for you I will be very happy.
> >>>> >
> >>>> > Thank you.
> >>>> >
> >>>> > -Ehtesham
> >>>> >
> >>>> >
> >>>> > --- On Thu, 1/22/09, Paweł Wielgus  wrote:
> >>>> >
> >>>> > From: Paweł Wielgus 
> >>>> > Subject: Re: Handling Browser Back/Forward Button in Struts2
> >>>> > To: "Struts Users Mailing List" 
> >>>> > Date: Thursday, January 22, 2009, 12:34 AM
> >>>> >
> >>>> > Hi Shekher,
> >>>> > it was very interesting subject, so i dig a little more.
> >>>> > Here [1] is what i found, with some tests.
> >>>> > Basicly it turns out that You should add headers in page and to
> >>>> response.
> >>>> >
> >>>> > [1] -
> >>>>
> http://poulwiel.blogspot.com/2009/01/browser-back-button-and-caching-problem.html
> >>>> >
> >>>> > Best greetings,
> >>>> > Paweł Wielgus.
> >>>> >
> >>>> > 2009/1/21 shekher awasthi :
> >>>> >> Is it possible that either i should only put these header in the
> >>>> logout
> >>>> >> action
> >>>> >>
> >>>> >> where i am removing the session and den redirecting the user to
> index
> >>>> page
> >>>> >> something like this
> >>>> >>
> >>>> >> HttpServletResponse response=null;
> &

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread shekher awasthi
Hi Paweł,

another way we can do this by using SSL
as we are dealing in secure zone so using SSL for this might be a good case.

the application i have seen so far who have dealt with this back/forward
button always using HTTPS protocol.

i am also diving in to this case study and will share the results


On 1/22/09, shekher awasthi  wrote:
>
> one of the banking application site which i tested today
>
> when user get logged off from and try to hit the back button he will be
> shown a different page
> instead the one in the cache
> so i am also loking in to this aspect.
>
>
>  On 1/22/09, shekher awasthi  wrote:
>>
>> using javascript is not a sure short solution
>> as i tested it throughly and javascript behaviour is not consistent
>> throught
>>
>> regarding setting header i did this i developed a custom interceptor which
>> is doing this
>>
>> but again its not worked as expected.
>> i am still clueless how online banking application doing this trick
>>
>> i am still on R&D mode for this if find anything will share it
>>
>>
>>  On 1/22/09, Paweł Wielgus  wrote:
>>>
>>> Hi Ehtesham,
>>> it was said before on this thread that user can simply turn of
>>> javascript whenever he wants,
>>> thats why i was looking for more server controlled solution. But thank
>>> You for pointing it out, You made me to add it to my blog post.
>>>
>>> Best greetings,
>>> Paweł Wielgus.
>>>
>>> 2009/1/22 Ehteshamul Haque :
>>> >
>>> >
>>> >
>>> > Hi,
>>> >
>>> > I am not that much expert I I used the following javascript code before
>>> in each page and it workded fine.
>>> >
>>> >
>>> > 
>>> > var x=window.history.length;
>>> > if (window.history[x]!=window.location)
>>> > {
>>> > window.history.forward();
>>> > }
>>> > 
>>> >
>>> > If it work for you I will be very happy.
>>> >
>>> > Thank you.
>>> >
>>> > -Ehtesham
>>> >
>>> >
>>> > --- On Thu, 1/22/09, Paweł Wielgus  wrote:
>>> >
>>> > From: Paweł Wielgus 
>>> > Subject: Re: Handling Browser Back/Forward Button in Struts2
>>> > To: "Struts Users Mailing List" 
>>> > Date: Thursday, January 22, 2009, 12:34 AM
>>> >
>>> > Hi Shekher,
>>> > it was very interesting subject, so i dig a little more.
>>> > Here [1] is what i found, with some tests.
>>> > Basicly it turns out that You should add headers in page and to
>>> response.
>>> >
>>> > [1] -
>>> http://poulwiel.blogspot.com/2009/01/browser-back-button-and-caching-problem.html
>>> >
>>> > Best greetings,
>>> > Paweł Wielgus.
>>> >
>>> > 2009/1/21 shekher awasthi :
>>> >> Is it possible that either i should only put these header in the
>>> logout
>>> >> action
>>> >>
>>> >> where i am removing the session and den redirecting the user to index
>>> page
>>> >> something like this
>>> >>
>>> >> HttpServletResponse response=null;
>>> >> response=ServletActionContext.getResponse();
>>> >>
>>> >> response.setHeader("Pragma", "no-cache");
>>> >> response.setHeader("Cache-Control", "no-cache");
>>> >> response.setHeader("Expires", "0");
>>> >>
>>> >> or can we create a interceptor which can do this for all the request
>>> wheer
>>> >> we want this feature??
>>> >>
>>> >> 2009/1/21 shekher awasthi 
>>> >>
>>> >>> i tried using setting the eader values but they are not working as
>>> expected
>>> >>> i can even
>>> >>>
>>> >>> go and move back using broswer back button.
>>> >>>
>>> >>> if i will find anything helpfull will share with you
>>> >>> till then hard luck
>>> >>> :)
>>> >>>
>>> >>> 2009/1/21 Paweł Wielgus 
>>> >>>
>>> >>> Hi Shekher,
>>> >>>> what i meant is that it can be done from server side.
>>> >>>> Check for example Yo

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread shekher awasthi
one of the banking application site which i tested today

when user get logged off from and try to hit the back button he will be
shown a different page
instead the one in the cache
so i am also loking in to this aspect.


On 1/22/09, shekher awasthi  wrote:
>
> using javascript is not a sure short solution
> as i tested it throughly and javascript behaviour is not consistent
> throught
>
> regarding setting header i did this i developed a custom interceptor which
> is doing this
>
> but again its not worked as expected.
> i am still clueless how online banking application doing this trick
>
> i am still on R&D mode for this if find anything will share it
>
>
>  On 1/22/09, Paweł Wielgus  wrote:
>>
>> Hi Ehtesham,
>> it was said before on this thread that user can simply turn of
>> javascript whenever he wants,
>> thats why i was looking for more server controlled solution. But thank
>> You for pointing it out, You made me to add it to my blog post.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>> 2009/1/22 Ehteshamul Haque :
>> >
>> >
>> >
>> > Hi,
>> >
>> > I am not that much expert I I used the following javascript code before
>> in each page and it workded fine.
>> >
>> >
>> > 
>> > var x=window.history.length;
>> > if (window.history[x]!=window.location)
>> > {
>> > window.history.forward();
>> > }
>> > 
>> >
>> > If it work for you I will be very happy.
>> >
>> > Thank you.
>> >
>> > -Ehtesham
>> >
>> >
>> > --- On Thu, 1/22/09, Paweł Wielgus  wrote:
>> >
>> > From: Paweł Wielgus 
>> > Subject: Re: Handling Browser Back/Forward Button in Struts2
>> > To: "Struts Users Mailing List" 
>> > Date: Thursday, January 22, 2009, 12:34 AM
>> >
>> > Hi Shekher,
>> > it was very interesting subject, so i dig a little more.
>> > Here [1] is what i found, with some tests.
>> > Basicly it turns out that You should add headers in page and to
>> response.
>> >
>> > [1] -
>> http://poulwiel.blogspot.com/2009/01/browser-back-button-and-caching-problem.html
>> >
>> > Best greetings,
>> > Paweł Wielgus.
>> >
>> > 2009/1/21 shekher awasthi :
>> >> Is it possible that either i should only put these header in the logout
>> >> action
>> >>
>> >> where i am removing the session and den redirecting the user to index
>> page
>> >> something like this
>> >>
>> >> HttpServletResponse response=null;
>> >> response=ServletActionContext.getResponse();
>> >>
>> >> response.setHeader("Pragma", "no-cache");
>> >> response.setHeader("Cache-Control", "no-cache");
>> >> response.setHeader("Expires", "0");
>> >>
>> >> or can we create a interceptor which can do this for all the request
>> wheer
>> >> we want this feature??
>> >>
>> >> 2009/1/21 shekher awasthi 
>> >>
>> >>> i tried using setting the eader values but they are not working as
>> expected
>> >>> i can even
>> >>>
>> >>> go and move back using broswer back button.
>> >>>
>> >>> if i will find anything helpfull will share with you
>> >>> till then hard luck
>> >>> :)
>> >>>
>> >>> 2009/1/21 Paweł Wielgus 
>> >>>
>> >>> Hi Shekher,
>> >>>> what i meant is that it can be done from server side.
>> >>>> Check for example Your e-banking application, i did it on mine :-).
>> >>>> There, when You press back button browser won't serve You cached page
>> >>>> but ask server for fresh one - this is controlled with content-cache
>> >>>> and pragma, but i can't be more helpfull to You here because i
>> haven't
>> >>>> done it before.
>> >>>>
>> >>>> Best greetings,
>> >>>> Paweł Wielgus.
>> >>>>
>> >>>>
>> >>>> 2009/1/21 shekher awasthi :
>> >>>>  > Hi Paweł,
>> >>>> >
>> >>>> > thats true it only send request to server if  i will refresh the
>> page
>&

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread shekher awasthi
using javascript is not a sure short solution
as i tested it throughly and javascript behaviour is not consistent throught

regarding setting header i did this i developed a custom interceptor which
is doing this

but again its not worked as expected.
i am still clueless how online banking application doing this trick

i am still on R&D mode for this if find anything will share it


On 1/22/09, Paweł Wielgus  wrote:
>
> Hi Ehtesham,
> it was said before on this thread that user can simply turn of
> javascript whenever he wants,
> thats why i was looking for more server controlled solution. But thank
> You for pointing it out, You made me to add it to my blog post.
>
> Best greetings,
> Paweł Wielgus.
>
> 2009/1/22 Ehteshamul Haque :
> >
> >
> >
> > Hi,
> >
> > I am not that much expert I I used the following javascript code before
> in each page and it workded fine.
> >
> >
> > 
> > var x=window.history.length;
> > if (window.history[x]!=window.location)
> > {
> > window.history.forward();
> > }
> > 
> >
> > If it work for you I will be very happy.
> >
> > Thank you.
> >
> > -Ehtesham
> >
> >
> > --- On Thu, 1/22/09, Paweł Wielgus  wrote:
> >
> > From: Paweł Wielgus 
> > Subject: Re: Handling Browser Back/Forward Button in Struts2
> > To: "Struts Users Mailing List" 
> > Date: Thursday, January 22, 2009, 12:34 AM
> >
> > Hi Shekher,
> > it was very interesting subject, so i dig a little more.
> > Here [1] is what i found, with some tests.
> > Basicly it turns out that You should add headers in page and to response.
> >
> > [1] -
> http://poulwiel.blogspot.com/2009/01/browser-back-button-and-caching-problem.html
> >
> > Best greetings,
> > Paweł Wielgus.
> >
> > 2009/1/21 shekher awasthi :
> >> Is it possible that either i should only put these header in the logout
> >> action
> >>
> >> where i am removing the session and den redirecting the user to index
> page
> >> something like this
> >>
> >> HttpServletResponse response=null;
> >>     response=ServletActionContext.getResponse();
> >>
> >> response.setHeader("Pragma", "no-cache");
> >> response.setHeader("Cache-Control", "no-cache");
> >> response.setHeader("Expires", "0");
> >>
> >> or can we create a interceptor which can do this for all the request
> wheer
> >> we want this feature??
> >>
> >> 2009/1/21 shekher awasthi 
> >>
> >>> i tried using setting the eader values but they are not working as
> expected
> >>> i can even
> >>>
> >>> go and move back using broswer back button.
> >>>
> >>> if i will find anything helpfull will share with you
> >>> till then hard luck
> >>> :)
> >>>
> >>> 2009/1/21 Paweł Wielgus 
> >>>
> >>> Hi Shekher,
> >>>> what i meant is that it can be done from server side.
> >>>> Check for example Your e-banking application, i did it on mine :-).
> >>>> There, when You press back button browser won't serve You cached page
> >>>> but ask server for fresh one - this is controlled with content-cache
> >>>> and pragma, but i can't be more helpfull to You here because i haven't
> >>>> done it before.
> >>>>
> >>>> Best greetings,
> >>>> Paweł Wielgus.
> >>>>
> >>>>
> >>>> 2009/1/21 shekher awasthi :
> >>>>  > Hi Paweł,
> >>>> >
> >>>> > thats true it only send request to server if  i will refresh the
> page
> >>>> and
> >>>> > for that i have already custom interceptor places which is checking
> the
> >>>> user
> >>>> > object in session in order to confirm that the request is from
> >>>> authorized
> >>>> > user
> >>>> >
> >>>> > but when i make use of back button it serve the page from the local
> >>>> > chache,so the problem is related to client side more than that of
> server
> >>>> > handling
> >>>> >
> >>>> > still trying to find a firm solution for it
> >>>> >
> >>>> > 2009/1/20 Paweł Wiel

Re: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread shekher awasthi
Is it possible that either i should only put these header in the logout
action

where i am removing the session and den redirecting the user to index page
something like this

HttpServletResponse response=null;
 response=ServletActionContext.getResponse();

 response.setHeader("Pragma", "no-cache");
 response.setHeader("Cache-Control", "no-cache");
 response.setHeader("Expires", "0");

or can we create a interceptor which can do this for all the request wheer
we want this feature??

2009/1/21 shekher awasthi 

> i tried using setting the eader values but they are not working as expected
> i can even
>
> go and move back using broswer back button.
>
> if i will find anything helpfull will share with you
> till then hard luck
> :)
>
> 2009/1/21 Paweł Wielgus 
>
> Hi Shekher,
>> what i meant is that it can be done from server side.
>> Check for example Your e-banking application, i did it on mine :-).
>> There, when You press back button browser won't serve You cached page
>> but ask server for fresh one - this is controlled with content-cache
>> and pragma, but i can't be more helpfull to You here because i haven't
>> done it before.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>>
>> 2009/1/21 shekher awasthi :
>>  > Hi Paweł,
>> >
>> > thats true it only send request to server if  i will refresh the page
>> and
>> > for that i have already custom interceptor places which is checking the
>> user
>> > object in session in order to confirm that the request is from
>> authorized
>> > user
>> >
>> > but when i make use of back button it serve the page from the local
>> > chache,so the problem is related to client side more than that of server
>> > handling
>> >
>> > still trying to find a firm solution for it
>> >
>> > 2009/1/20 Paweł Wielgus 
>> >
>> >> Hi Shekher,
>> >> first try this scenario:
>> >> 1. logout user
>> >> 2. back button - check for logs if action was fired
>> >> 3. refresh page - check for logs if action was fired
>> >> Most likely only the 3. will fire action because browser will serve
>> >> cached version of that page.
>> >> I was about to write that to deal with it You can use https scheme,
>> >> but i just got it checked and it's not true. So maybe using pragma and
>> >> or cache-control will do?
>> >>
>> >> Still user can disable javascript so solution with script might not
>> work.
>> >> If You find out anything more please let us know.
>> >>
>> >> Best greetings,
>> >> Paweł Wielgus.
>> >>
>> >>
>> >> 2009/1/20 Robert Graf-Waczenski :
>> >>  > You don't write if the browser back button is supposed to be
>> functional
>> >> in
>> >> > your application (in many cases it is not, but YMMV).
>> >> >
>> >> > If you want to disable the browser back button, use the code below in
>> all
>> >> > your pages:
>> >> >
>> >> > 
>> >> > history.forward();
>> >> > 
>> >> >
>> >> > I'm not aware of any feature in Struts2 that deals with the browser
>> back
>> >> > button.
>> >> >
>> >> > Robert
>> >> >
>> >> >
>> >> > shekher awasthi wrote:
>> >> >>
>> >> >> Hi All,
>> >> >>
>> >> >> in the process of developing application using struts 2.0.11, i came
>> >> >> across
>> >> >> the problem of handling browser back/forward button.
>> >> >>
>> >> >> This problem is occurring when we will logout the user.On Clicking
>> the
>> >> >> logout button we are currently removing the user from the session
>> >> >>
>> >> >> and it worked fine for us. After the successful logout process user
>> will
>> >> >> be
>> >> >> redirected to the index page(which have the login field),
>> >> >>
>> >> >> but when user hits the browser back button he is getting himself
>> there
>> >> in
>> >> >> the secure page even we have remove the user object from the session
>> >> >>
>> >> >> bel

Re: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread shekher awasthi
i tried using setting the eader values but they are not working as expected
i can even

go and move back using broswer back button.

if i will find anything helpfull will share with you
till then hard luck
:)

2009/1/21 Paweł Wielgus 

> Hi Shekher,
> what i meant is that it can be done from server side.
> Check for example Your e-banking application, i did it on mine :-).
> There, when You press back button browser won't serve You cached page
> but ask server for fresh one - this is controlled with content-cache
> and pragma, but i can't be more helpfull to You here because i haven't
> done it before.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2009/1/21 shekher awasthi :
>  > Hi Paweł,
> >
> > thats true it only send request to server if  i will refresh the page and
> > for that i have already custom interceptor places which is checking the
> user
> > object in session in order to confirm that the request is from authorized
> > user
> >
> > but when i make use of back button it serve the page from the local
> > chache,so the problem is related to client side more than that of server
> > handling
> >
> > still trying to find a firm solution for it
> >
> > 2009/1/20 Paweł Wielgus 
> >
> >> Hi Shekher,
> >> first try this scenario:
> >> 1. logout user
> >> 2. back button - check for logs if action was fired
> >> 3. refresh page - check for logs if action was fired
> >> Most likely only the 3. will fire action because browser will serve
> >> cached version of that page.
> >> I was about to write that to deal with it You can use https scheme,
> >> but i just got it checked and it's not true. So maybe using pragma and
> >> or cache-control will do?
> >>
> >> Still user can disable javascript so solution with script might not
> work.
> >> If You find out anything more please let us know.
> >>
> >> Best greetings,
> >> Paweł Wielgus.
> >>
> >>
> >> 2009/1/20 Robert Graf-Waczenski :
> >>  > You don't write if the browser back button is supposed to be
> functional
> >> in
> >> > your application (in many cases it is not, but YMMV).
> >> >
> >> > If you want to disable the browser back button, use the code below in
> all
> >> > your pages:
> >> >
> >> > 
> >> > history.forward();
> >> > 
> >> >
> >> > I'm not aware of any feature in Struts2 that deals with the browser
> back
> >> > button.
> >> >
> >> > Robert
> >> >
> >> >
> >> > shekher awasthi wrote:
> >> >>
> >> >> Hi All,
> >> >>
> >> >> in the process of developing application using struts 2.0.11, i came
> >> >> across
> >> >> the problem of handling browser back/forward button.
> >> >>
> >> >> This problem is occurring when we will logout the user.On Clicking
> the
> >> >> logout button we are currently removing the user from the session
> >> >>
> >> >> and it worked fine for us. After the successful logout process user
> will
> >> >> be
> >> >> redirected to the index page(which have the login field),
> >> >>
> >> >> but when user hits the browser back button he is getting himself
> there
> >> in
> >> >> the secure page even we have remove the user object from the session
> >> >>
> >> >> below is the code we are using for removing the user
> >> >>
> >> >> session.remove(BSConstant.USER);
> >> >>
> >> >> i am clueless where we are doing wrong , as we think we are having
> two
> >> >> points
> >> >>
> >> >> 1) Either the user is not getting removed from the session,but the
> >> chances
> >> >> are very less as for all other call after logout it is forcing the
> user
> >> to
> >> >> login first.
> >> >>
> >> >> 2) Back button handling is not there
> >> >>
> >> >> my question is, Is there any way in struts2 to handle browser
> >> back/forward
> >> >> button or do i need to use some other technique like
> >> >>
> >> >> setting response header
> >> >>
> >> >> any suggestion in this regard will be much appreciated.
> >> >>
> >> >> -s
> >> >>
> >> >>
> >> >
> >> >
> >> > -
> >> > 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: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread shekher awasthi
Hi Paweł,

thats true it only send request to server if  i will refresh the page and
for that i have already custom interceptor places which is checking the user
object in session in order to confirm that the request is from authorized
user

but when i make use of back button it serve the page from the local
chache,so the problem is related to client side more than that of server
handling

still trying to find a firm solution for it

2009/1/20 Paweł Wielgus 

> Hi Shekher,
> first try this scenario:
> 1. logout user
> 2. back button - check for logs if action was fired
> 3. refresh page - check for logs if action was fired
> Most likely only the 3. will fire action because browser will serve
> cached version of that page.
> I was about to write that to deal with it You can use https scheme,
> but i just got it checked and it's not true. So maybe using pragma and
> or cache-control will do?
>
> Still user can disable javascript so solution with script might not work.
> If You find out anything more please let us know.
>
> Best greetings,
> Paweł Wielgus.
>
>
> 2009/1/20 Robert Graf-Waczenski :
>  > You don't write if the browser back button is supposed to be functional
> in
> > your application (in many cases it is not, but YMMV).
> >
> > If you want to disable the browser back button, use the code below in all
> > your pages:
> >
> > 
> > history.forward();
> > 
> >
> > I'm not aware of any feature in Struts2 that deals with the browser back
> > button.
> >
> > Robert
> >
> >
> > shekher awasthi wrote:
> >>
> >> Hi All,
> >>
> >> in the process of developing application using struts 2.0.11, i came
> >> across
> >> the problem of handling browser back/forward button.
> >>
> >> This problem is occurring when we will logout the user.On Clicking the
> >> logout button we are currently removing the user from the session
> >>
> >> and it worked fine for us. After the successful logout process user will
> >> be
> >> redirected to the index page(which have the login field),
> >>
> >> but when user hits the browser back button he is getting himself there
> in
> >> the secure page even we have remove the user object from the session
> >>
> >> below is the code we are using for removing the user
> >>
> >> session.remove(BSConstant.USER);
> >>
> >> i am clueless where we are doing wrong , as we think we are having two
> >> points
> >>
> >> 1) Either the user is not getting removed from the session,but the
> chances
> >> are very less as for all other call after logout it is forcing the user
> to
> >> login first.
> >>
> >> 2) Back button handling is not there
> >>
> >> my question is, Is there any way in struts2 to handle browser
> back/forward
> >> button or do i need to use some other technique like
> >>
> >> setting response header
> >>
> >> any suggestion in this regard will be much appreciated.
> >>
> >> -s
> >>
> >>
> >
> >
> > -
> > 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: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread shekher awasthi
i tried with javascript and it worked fine for me
but still i believe that this is not the best solutions and as mentioned
above if javascript is disabled
the solution will no longer work

so i have to look in to some other solution like setting pragma or
cache-control will do?

i am just removing the  userobject from the session but not invalidating the
session. i am not setting any header on response till now.

Thanks Paweł for the detailed description, i will look in all the aspect as
described by you and will share my findings.



-shekher




On 1/20/09, Nils-Helge Garli Hegvik  wrote:
>
> Did you invalidate the session? Are you setting no cache headers on
> the response?
>
> Nils-H
>
> On Tue, Jan 20, 2009 at 12:46 PM, shekher awasthi
>  wrote:
> > Hi All,
> >
> > in the process of developing application using struts 2.0.11, i came
> across
> > the problem of handling browser back/forward button.
> >
> > This problem is occurring when we will logout the user.On Clicking the
> > logout button we are currently removing the user from the session
> >
> > and it worked fine for us. After the successful logout process user will
> be
> > redirected to the index page(which have the login field),
> >
> > but when user hits the browser back button he is getting himself there in
> > the secure page even we have remove the user object from the session
> >
> > below is the code we are using for removing the user
> >
> > session.remove(BSConstant.USER);
> >
> > i am clueless where we are doing wrong , as we think we are having two
> > points
> >
> > 1) Either the user is not getting removed from the session,but the
> chances
> > are very less as for all other call after logout it is forcing the user
> to
> > login first.
> >
> > 2) Back button handling is not there
> >
> > my question is, Is there any way in struts2 to handle browser
> back/forward
> > button or do i need to use some other technique like
> >
> > setting response header
> >
> > any suggestion in this regard will be much appreciated.
> >
> > -s
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread shekher awasthi
i did what u have suggested

other solution is to use set response type in jsp but i want this
functionality only when user get logged out

in other case it must work

is there any better way to deal with this??

On Tue, Jan 20, 2009 at 5:14 PM, Robert Graf-Waczenski wrote:

> You don't write if the browser back button is supposed to be functional in
> your application (in many cases it is not, but YMMV).
>
> If you want to disable the browser back button, use the code below in all
> your pages:
>
> 
> history.forward();
> 
>
> I'm not aware of any feature in Struts2 that deals with the browser back
> button.
>
> Robert
>
>
>
> shekher awasthi wrote:
>
>> Hi All,
>>
>> in the process of developing application using struts 2.0.11, i came
>> across
>> the problem of handling browser back/forward button.
>>
>> This problem is occurring when we will logout the user.On Clicking the
>> logout button we are currently removing the user from the session
>>
>> and it worked fine for us. After the successful logout process user will
>> be
>> redirected to the index page(which have the login field),
>>
>> but when user hits the browser back button he is getting himself there in
>> the secure page even we have remove the user object from the session
>>
>> below is the code we are using for removing the user
>>
>> session.remove(BSConstant.USER);
>>
>> i am clueless where we are doing wrong , as we think we are having two
>> points
>>
>> 1) Either the user is not getting removed from the session,but the chances
>> are very less as for all other call after logout it is forcing the user to
>> login first.
>>
>> 2) Back button handling is not there
>>
>> my question is, Is there any way in struts2 to handle browser back/forward
>> button or do i need to use some other technique like
>>
>> setting response header
>>
>> any suggestion in this regard will be much appreciated.
>>
>> -s
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread shekher awasthi
Hi All,

in the process of developing application using struts 2.0.11, i came across
the problem of handling browser back/forward button.

This problem is occurring when we will logout the user.On Clicking the
logout button we are currently removing the user from the session

and it worked fine for us. After the successful logout process user will be
redirected to the index page(which have the login field),

but when user hits the browser back button he is getting himself there in
the secure page even we have remove the user object from the session

below is the code we are using for removing the user

session.remove(BSConstant.USER);

i am clueless where we are doing wrong , as we think we are having two
points

1) Either the user is not getting removed from the session,but the chances
are very less as for all other call after logout it is forcing the user to
login first.

2) Back button handling is not there

my question is, Is there any way in struts2 to handle browser back/forward
button or do i need to use some other technique like

setting response header

any suggestion in this regard will be much appreciated.

-s


Re: Application based Security

2008-12-15 Thread shekher awasthi
I am planing to use interceptor for this but not sure how to plan this

as using interceptor can not gurantee a robust authenticate mechanism
what i planned is as below

if user provide the valid information store the user object in the session
scoped map and for all incoming request to secure region check the user
object in the session using the interceptor,but will that be a robust
approach???

any suggestion for this

On Mon, Dec 15, 2008 at 5:55 PM, Andy Law  wrote:

>
>
> Shekher wrote:
> >
> > Hi All,
> >
> > We are developing an application based on Struts2 framework. We are on
> way
> > to develop application based security so that the unauthorized user can
> > not
> > access the secure area,it needs the request to be from the authorized
> > person.We can have the Below mentioed approach
> >
> > 1) For Secure area the user must be logged in to the ysystem and have
> > authorization for accessing that
> > 2) For every request coming to the secured region, we need to put the
> > check
> > if the user is a valid one or not.
> >
> > We cab think of the functionality which checks for the icoming request
> for
> > its authentication and permits only authenticated request.
> >
> > I need your suggestion about the approach we can follow in struts2 so
> that
> > we can achieve the above mentioed points and also maintenance and
> > enterprise
> > integration will be area of concern.
> >
> > IF any one have worked or working on similar area pleaes share his/her
> > view
> > how to achieve that here in struts2
> >
> > Thanks in advance
> > shekher
> >
> >
>
> I think that you need to be looking at Interceptors. You can couple them as
> tightly or as loosely to your Actions as you like. You can also build
> systems using Interceptors that factor out the control of the
> authentication
> and authorisation to completely separate code which makes integrating with
> other enterprise systems a bit easier.
>
> Later,
>
> Andy
> --
> View this message in context:
> http://www.nabble.com/Application-based-Security-tp21010272p21012989.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Application based Security

2008-12-15 Thread shekher awasthi
}
> }
>
> Logout.java - this is how we log someone out
> public class LogoutAction extends UserAwareBaseAction {
>
>  /**
>   * Since user is a session variable simply clear out the pertinent info
> and
>   * the filter will force a new login.
>   */
>  public String executeAction() throws Exception {
>try {
>  this.getUser().setUsername(null);
>}
>catch (Exception e) {
>  return ERROR;
>}
>return SUCCESS;
>  }
> }
>
> Only thing to note is that we set the username to null - we can't remove
> the user from the session since it is a spring session scoped bean. Setting
> the username to null makes sure the next request for a protected page fails.
>
>
> HTH
>
> Allen Fogleson
>
> -Original Message-
> From: shekher awasthi [mailto:shekher.awas...@gmail.com]
> Sent: Monday, December 15, 2008 3:55 AM
> To: Struts Users Mailing List
> Subject: Application based Security
>
> Hi All,
>
> We are developing an application based on Struts2 framework. We are on way
> to develop application based security so that the unauthorized user can not
> access the secure area,it needs the request to be from the authorized
> person.We can have the Below mentioed approach
>
> 1) For Secure area the user must be logged in to the ysystem and have
> authorization for accessing that
> 2) For every request coming to the secured region, we need to put the check
> if the user is a valid one or not.
>
> We cab think of the functionality which checks for the icoming request for
> its authentication and permits only authenticated request.
>
> I need your suggestion about the approach we can follow in struts2 so that
> we can achieve the above mentioed points and also maintenance and
> enterprise
> integration will be area of concern.
>
> IF any one have worked or working on similar area pleaes share his/her view
> how to achieve that here in struts2
>
> Thanks in advance
> shekher
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Application based Security

2008-12-15 Thread shekher awasthi
Hi All,

We are developing an application based on Struts2 framework. We are on way
to develop application based security so that the unauthorized user can not
access the secure area,it needs the request to be from the authorized
person.We can have the Below mentioed approach

1) For Secure area the user must be logged in to the ysystem and have
authorization for accessing that
2) For every request coming to the secured region, we need to put the check
if the user is a valid one or not.

We cab think of the functionality which checks for the icoming request for
its authentication and permits only authenticated request.

I need your suggestion about the approach we can follow in struts2 so that
we can achieve the above mentioed points and also maintenance and enterprise
integration will be area of concern.

IF any one have worked or working on similar area pleaes share his/her view
how to achieve that here in struts2

Thanks in advance
shekher


Re: Creating struts2 form elements dynamically

2008-12-04 Thread shekher awasthi
One more thing i would i like to add

i am using struts2 based select tag and here the list is getting populated
dynamicaly from the back end
 so if i am able to create the tag based on the code generated by struts2
source code how can i provide the values dynamically to them???

On Fri, Dec 5, 2008 at 10:03 AM, shekher awasthi
<[EMAIL PROTECTED]>wrote:

> Hi Dave,
>
> Can you just describe what you mean by this may be i am unable to graspe
> what you have suggested
>
> a little description can help me a lot...
>
> thanks
> -s
>
>
>
>
> On Thu, Dec 4, 2008 at 10:09 PM, Dave Newton <[EMAIL PROTECTED]>wrote:
>
>> Just duplicate what the S2 tags would emit--I think that'd be the easiest.
>>
>> Dave
>>
>>
>> --- On Thu, 12/4/08, shekher awasthi <[EMAIL PROTECTED]> wrote:
>>
>> > From: shekher awasthi <[EMAIL PROTECTED]>
>> > Subject: Creating struts2 form elements dynamically
>> > To: user@struts.apache.org
>> > Date: Thursday, December 4, 2008, 11:36 AM
>>  > Hi All,
>> >
>> > I need to create rows of struts2 form elements in my jsp on
>> > onclick event of
>> > a button.
>> > Whenever user clicks on the button, a new row of input
>> > types struts2 form
>> > elements should be created dynamically.
>> >
>> > I know creating simple html form elements using javascript
>> > but dont know how
>> > to do same for struts2 form elements.
>> >
>> > Any suggestion will be much appriciated!
>> >
>> > Thanks,
>> > Shekher
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: Creating struts2 form elements dynamically

2008-12-04 Thread shekher awasthi
Hi Dave,

Can you just describe what you mean by this may be i am unable to graspe
what you have suggested

a little description can help me a lot...

thanks
-s




On Thu, Dec 4, 2008 at 10:09 PM, Dave Newton <[EMAIL PROTECTED]> wrote:

> Just duplicate what the S2 tags would emit--I think that'd be the easiest.
>
> Dave
>
>
> --- On Thu, 12/4/08, shekher awasthi <[EMAIL PROTECTED]> wrote:
>
> > From: shekher awasthi <[EMAIL PROTECTED]>
> > Subject: Creating struts2 form elements dynamically
> > To: user@struts.apache.org
> > Date: Thursday, December 4, 2008, 11:36 AM
>  > Hi All,
> >
> > I need to create rows of struts2 form elements in my jsp on
> > onclick event of
> > a button.
> > Whenever user clicks on the button, a new row of input
> > types struts2 form
> > elements should be created dynamically.
> >
> > I know creating simple html form elements using javascript
> > but dont know how
> > to do same for struts2 form elements.
> >
> > Any suggestion will be much appriciated!
> >
> > Thanks,
> > Shekher
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Creating struts2 form elements dynamically

2008-12-04 Thread shekher awasthi
Hi All,

I need to create rows of struts2 form elements in my jsp on onclick event of
a button.
Whenever user clicks on the button, a new row of input types struts2 form
elements should be created dynamically.

I know creating simple html form elements using javascript but dont know how
to do same for struts2 form elements.

Any suggestion will be much appriciated!

Thanks,
Shekher


Struts2+YUI

2008-10-16 Thread shekher awasthi
Hi All,

I am trying to integrate struts2 with YUI ,but facing some problems with
this. I want that when my action get called by YUI it must return a
arrayList of string which i must be able to handle using the YUI.

For this i took the help of example from YUI site and able to hit the action
but my problem is that how can i get the access to the arraylist which my
action is populating when its execute methos is called .below i m pasting
the code from my action calss as well as the YUI code.
Plaese let me know how can i get this arraylist in my YUI code
*
YUI CODE*




var div = document.getElementById('container');

var handleSuccess = function(o){
alert("pass");


if(o.responseText !== undefined){
alert("test11");

div.innerHTML = "
  • Transaction id: " + o.tId + "
  • "; div.innerHTML += "
  • HTTP status: " + o.status + "
  • "; div.innerHTML += "
  • Status code message: " + o.statusText + "
  • "; div.innerHTML += "
  • HTTP headers:
      " + o.getAllResponseHeaders + "
  • "; div.innerHTML += "
  • Server response: " + o.getList().toString + "
  • "; div.innerHTML += "
  • Argument object: Object ( [foo] => " + o.argument.foo + " [bar] => " + o.argument.bar +" )
  • "; } } var handleFailure = function(o){ alert("fail"); YAHOO.log("The failure handler was called. tId: " + o.tId + ".", "info", "example"); if(o.responseText !== undefined){ div.innerHTML = "
    • Transaction id: " + o.tId + "
    • "; div.innerHTML += "
    • HTTP status: " + o.status + "
    • "; div.innerHTML += "
    • Status code message: " + o.statusText + "
    "; } } var callback = { success:handleSuccess, failure:handleFailure, argument: { foo:"foo", bar:"bar" } }; var sUrl = "YUITestAction.action"; function makeRequest(){ alert("test"); var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); } *MY ACTION CLASS* public class YUITestAction extends ActionSupport{ /** * */ private static final long serialVersionUID = 1926031204500756104L; ArrayList list=new ArrayList(); public String execute() throws Exception{ System.out.println("inside the execute method"); return SUCCESS; } public ArrayList getList(){ list.add("test1"); list.add("test2"); list.add("aum"); list.add("arun"); list.add("mannu"); list.add("umesh"); return list; } } any help in this regard is much appricaited --shekher