Re: AJAX & Sessions

2011-01-27 Thread Steven Yang
Like Dave said The way I did it is in the LoginInterceptor I check the header to see if its an XHR (i have special header for all my XHR calls, I dunno any other way to distinguish between normal http call and xhr, if anyone has better way please do share), and if it is return a special header, th

Re: AJAX & Sessions

2011-01-27 Thread Chris Pratt
Here's a couple of the ways I handle it: ingredients 401 500 factors 401 500 Then on the JavaScript side you need to check the xmlHttpRequest.status field to see what you need to do, 200 means

RE: getRequestURL and action

2011-01-27 Thread Doctor John Carter
Ty very much, it works > Subject: Re: getRequestURL and action > From: ken.mcwilli...@aerose.com > To: user@struts.apache.org > Date: Thu, 27 Jan 2011 15:46:21 -0700 > > As mentioned earlier in the thread the s2 a tag and s2 url tag have many > very simila

Re: AJAX & Sessions

2011-01-27 Thread Dave Newton
Your Ajax call checks for an error status and redirects. I used to handle this with a filter that checks for XHR and send back something more appropriate. Dave On Thursday, January 27, 2011, CRANFORD, CHRIS wrote: > Depends on the page; but yes many are user initiated. > > All the AJAX tutorial

RE: AJAX & Sessions

2011-01-27 Thread CRANFORD, CHRIS
Depends on the page; but yes many are user initiated. All the AJAX tutorial examples I have seen always seem to return SUCCESS in the call; however I have yet to see how I would return an error to my AJAX call. Lets take an example, I have a LoginInterceptor which checks the HttpSession to see i

RE: AJAX & Sessions

2011-01-27 Thread Scott
Are these Ajax requests *not* human initiated? IOW, are they timers? From: CRANFORD, CHRIS [mailto:chris.cranf...@setech.com] Sent: Thursday, January 27, 2011 8:29 PM To: Struts Users Mailing List Subject: AJAX & Sessions In our application upon a successful authentication, the HttpSessio

AJAX & Sessions

2011-01-27 Thread CRANFORD, CHRIS
In our application upon a successful authentication, the HttpSession property setMaxInactiveInterval is set to whatever our application's idle time out is so that if this value is reached, the session is destroyed and upon the next request to the server, the user will be redirected to a login page.

Re: getRequestURL and action

2011-01-27 Thread Ken McWilliams
As mentioned earlier in the thread the s2 a tag and s2 url tag have many very similar attributes. On Thu, 2011-01-27 at 17:36 -0500, Dave Newton wrote: > On Thu, Jan 27, 2011 at 5:26 PM, Doctor John Carter wrote: > > > The only little thing I Don't like... > >en_US > > "> > > English > >

RE: s:submit to display results in a new window ?

2011-01-27 Thread Doctor John Carter
http://stackoverflow.com/questions/1458080/how-to-open-a-new-window-without-using-window-open-and-a-href-in-struts2 > Date: Thu, 27 Jan 2011 16:12:52 -0500 > From: em...@encs.concordia.ca > To: user@struts.apache.org > Subject: s:submit to display results

RE: [S 1.3.8] Simple Struts Example

2011-01-27 Thread Doctor John Carter
http://www.mkyong.com/tutorials/struts-tutorials/ > Date: Thu, 27 Jan 2011 16:37:27 -0500 > From: anji...@hotmail.com > To: user@struts.apache.org > Subject: Re: [S 1.3.8] Simple Struts Example > > 1. JSP Files > = > a) Calling page > -

RE: getRequestURL and action

2011-01-27 Thread Doctor John Carter
Hi Dave, I'm a Newbee can you explain that by an example > Date: Thu, 27 Jan 2011 17:36:16 -0500 > Subject: Re: getRequestURL and action > From: davelnew...@gmail.com > To: user@struts.apache.org > > On Thu, Jan 27, 2011 at 5:26 PM, Doctor John Carter wrot

Re: getRequestURL and action

2011-01-27 Thread Dave Newton
On Thu, Jan 27, 2011 at 5:26 PM, Doctor John Carter wrote: > The only little thing I Don't like... >en_US > "> > English > It's JSTL included in Html.. > and not pure JSTLIs it possible to improve that? > Maybe make the URL a variable and access it w/ JSP EL in the anchor tag? Dave

RE: getRequestURL and action

2011-01-27 Thread Doctor John Carter
OK, thanks to Stack Overflow and , I solved my problem :)The only little thing I Don't like... en_US "> English It's JSTL included in Html.. and not pure JSTLIs it possible to improve that? Thank you for everything Florent > Subject: RE: getRe

Re: Struts 2 replacement for Struts 1 message bundles (resources)

2011-01-27 Thread Dave Newton
On Thu, Jan 27, 2011 at 1:11 PM, Alexander Muss wrote: > Hi, > > I don't think this is what we need. > > at the time we have this lines in struts-config.xml > > > null="false"/> > null="false"/> > null="false"/> > null="false"/> > > and in jsp we a

Re: Struts 2 replacement for Struts 1 message bundles (resources)

2011-01-27 Thread Alexander Muss
Hi, I don't think this is what we need. at the time we have this lines in struts-config.xml and in jsp we access this message-resources in following way. <% // this string is usually read from business logic layer String bundleName =

Re: [S 1.3.8] Simple Struts Example

2011-01-27 Thread Anjib Mulepati
1. JSP Files = a) Calling page - <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic" %> b) Result Pa

[S 1.3.8] Simple Struts Example

2011-01-27 Thread Anjib Mulepati
Hi All, I am looking for the simple example of using beans and tag in Struts to avoid using scriptlets. I am trying to get concept of using tag to access result from back end using the beans. It will be very helpful if some one can provide me a link or example which I can look into. Thanks

s:submit to display results in a new window ?

2011-01-27 Thread Emi Lu
Good afternoon, Could someone tell me how to use s:submit to open result in a new window? struts2.2.1.1 Thank you, -- Lu Ying - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user

struts2 + JfreeChart

2011-01-27 Thread Emi Lu
Good afternoon list, Could someone tell me where I can see a real online struts2.21 + jfreechart example? The following should be possible with struts2 + jfreechart, right? = | | contents | . | .gif chart result | ... | button1 After click button1: contents and

RE: getRequestURL and action

2011-01-27 Thread Ken McWilliams
This question on Stack Overflow is very similar to your issue: http://stackoverflow.com/questions/4773063/tiles2-struts-switch-locale The parameter name for which the i18n interceptor determines the language is configurable, I have not tried this but it may be possible to specify a session_locale

RE: getRequestURL and action

2011-01-27 Thread Doctor John Carter
   en   nl_BE   fr EnglishNederlandsFrançais /matchDays.action > Subject: Re: getRequestURL and action > From: ken.mcwilli...@aerose.com > To: user@struts.apache.org > Date: Thu, 27 Jan 2011 11

Re: getRequestURL and action

2011-01-27 Thread Ken McWilliams
gives you the current url. gives you the current url with the get parameters. The tag also shares the above properties but is also a link. http://struts.apache.org/2.x/docs/tag-reference.html On Thu, 2011-01-27 at 18:33 +0100, Doctor John Carter wrote: > > > > >

getRequestURL and action

2011-01-27 Thread Doctor John Carter
Struts version 2.1.8.1 All my jsp pages include a header.jsp file. This header file is made for the choice of the languages. There are 3  links with the same action Th problem is that I don 't want to go back to the same

Re: SAMRALA?

2011-01-27 Thread Wendy Smoak
If the posts annoy you, then filter them out so you don't have to read them, but please keep the personal comments off the mailing list -- that's not how Apache communities work. -Wendy - To unsubscribe, e-mail: user-unsubscr...@s

Re: SAMRALA?

2011-01-27 Thread Dave Newton
Sometimes Addlebrains Make Repeated, Annoyingly-Lame Attempts? On Thu, Jan 27, 2011 at 11:41 AM, Brian Thompson wrote: > TBF, if he's not actually asking about Indian geography, Google won't > help him much. > Not convinced it would if he was. I had a bike made of elephantium; thing weighed a t

Re: SAMRALA?

2011-01-27 Thread Antonio Petrelli
2011/1/27 Brian Thompson : > TBF, if he's not actually asking about Indian geography, Google won't help > him much. Brian, Martin Gainty is a well-known presence of several mailing lists, asking dumb questions, and answering using out-of-the-point arguments. We suppose that he is a bot wandering i

Re: SAMRALA?

2011-01-27 Thread Brian Thompson
TBF, if he's not actually asking about Indian geography, Google won't help him much. -Brian On Thu, Jan 27, 2011 at 9:39 AM, Antonio Petrelli < antonio.petre...@gmail.com> wrote: > 2011/1/27 Martin Gainty : > > > > Good Morning Fellow Struts Geeks > > > > Anyone come across the term SAMRALA???

Re: SAMRALA?

2011-01-27 Thread Antonio Petrelli
2011/1/27 Martin Gainty : > > Good Morning Fellow Struts Geeks > > Anyone come across the term SAMRALA??? A bot deserves a very bot answer: http://lmgtfy.com/?q=samrala Antonio - To unsubscribe, e-mail: user-unsubscr...@struts.a

SAMRALA?

2011-01-27 Thread Martin Gainty
Good Morning Fellow Struts Geeks Anyone come across the term SAMRALA??? Thanks, Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az aki

ModelDriven with List

2011-01-27 Thread Jan Fröhlich
Hi After we found a lean solution with ModelDriven in our application to build CRUD functions with simple Objects, I have now a problem with extending it, to be usable with lists. What I want to do is, make the getModel() method in my ModelDriven Action having a return type like List or ma

Notable sites using Struts2

2011-01-27 Thread stanlick
Does anyone know of a reasonably good list of the top 10 or more sites running on Struts2? I have been asked to do a little fact-finding and the tools I am using pretty much stop at Java EE and don't tell much about the details. Job searches compiled yesterday suggest Walt Disney, Netflix and Ban

Re: Struts 2 replacement for Struts 1 message bundles

2011-01-27 Thread Dave Newton
http://struts.apache.org/2.x/docs/localization.html On Thu, Jan 27, 2011 at 1:40 AM, Alexander Muss wrote: > Hi, > > Currently we are using Struts 1 but next version of our application have to > be > implemented with one other framework. Thats why we want to use Struts 2 > instead. > > But the p

Struts 2 replacement for Struts 1 message bundles

2011-01-27 Thread Alexander Muss
Hi, Currently we are using Struts 1 but next version of our application have to be implemented with one other framework. Thats why we want to use Struts 2 instead. But the problem is, there seem to be no way to implement same feature as resource-, message- bundles in Struts 1. My questi

Re: Struts 2 File upload to store the filedata

2011-01-27 Thread PrateekA
Even i was trying implementing the same think but i couldnt make it. I used image/jpeg inputStream filename="${filename}" 1024 But got an exception saying "Can not find a java.io.InputStream with the name [inputStream] in the invocation stac

AW: Problem with character encoding during redirect to another action

2011-01-27 Thread Rafael Karbowski
Thank you very much. This solved my problems. Best Regards, Rafael -Ursprüngliche Nachricht- Von: li wei [mailto:li.wei.linf...@gmail.com] Gesendet: Donnerstag, 27. Januar 2011 04:22 An: Struts Users Mailing List Betreff: Re: Problem with character encoding during redirect to another act