Re: How to get Login page while submitting a data form

2009-11-14 Thread Dale Newfield
Sanjaya Kumar Patel wrote: Curious to know what is the common practice. Would like to hear if people are using some established libraries or pattern etc. ACEGI^H^H^H^H^HSpring Security. -Dale - To unsubscribe, e-mail: user-un

Re: How to get Login page while submitting a data form

2009-11-16 Thread Dale Newfield
Sanjaya Kumar Patel wrote: I saw ACEGI a bit and then am thinking to first try writing own interceptor - basically extending the suggestion in the book "Apache Struts 2 Web 2.0 Projects." Will post the code once successful. For security this is pretty much always a mistake. You don't want bugs

Re: (clearly O/T) use of ThreadLocal vs Synchronized

2009-11-21 Thread Dale Newfield
I think that Martin is a turing test...and I'm beginning to feel that he might indeed be human...which can only mean the AIs are winning. Can Skynet be far behind? ObXKCD: http://xkcd.com/329/ -Dale P.S.: Even more clearly O/T. --

Re: S2.1.8.1: Need something similar to struts.el.throwExceptionOnFailure for and

2009-12-02 Thread Dale Newfield
Robert Graf-Waczenski wrote: Musachy Barroso wrote: so setting doesnt fail? No, it doesn't fail, the text input field is rendered with empty contents. That is the appropriate way for it to render if the property is indeed missing. Is a warning generated in your logs? -Dale ---

Re: S2.1.8.1: Need something similar to struts.el.throwExceptionOnFailure for and

2009-12-02 Thread Dale Newfield
Robert Graf-Waczenski wrote: which correctly yields a runtime error Unless you're in devMode, I don't want anything yielding a runtime error, I want it to proceed as best it can, and let me know so I can address any potential issue (the logging is a step forward from earlier versions where

Re: S2.1.8.1: Need something similar to struts.el.throwExceptionOnFailure for and

2009-12-02 Thread Dale Newfield
Robert Graf-Waczenski wrote: This is not a bug, it's a feature in Struts2 2.1.8.1 that you explicitly have to enable via a configuration option (which is what we did). Oh! My bad. You're right, that could be a useful feature given certain policies, I'm glad it's now there for those that want

Re: blank app under jetty7

2009-12-02 Thread Dale Newfield
Milos Negovanovic wrote: http://pastie.org/723875 Says: > Caused by: java.lang.ClassNotFoundException: > javax.servlet.jsp.JspWriter So, is there a .jar in your application's classpath that contains this? -Dale - To unsubscr

Re: blank app under jetty7

2009-12-02 Thread Dale Newfield
Milos Negovanovic wrote: javax.servlet.jsp.JspWriter Which jar would that be? I have all jars distributed with jetty7 and struts2 by default. I don't know which servlet api you're using. 2.3: jsp-api.jar 2.5: jsp-api-2.0.jar 2.4: I don't know, but I would guess that "jsp" and "api" are in the

ognl method lookup failure

2009-12-12 Thread Dale Newfield
Often when I'm stumped writing a detailed "help!" message leads me to the bug and I never have to send it. This time I was not so lucky, and since I've already wasted two days on this I was hoping someone here might have an idea to get me out of the weeds. I've got an abstract class "Comment"

Re: ognl method lookup failure

2009-12-13 Thread Dale Newfield
Musachy Barroso wrote: I would suggest to put a breakpoint in XWorkMethodAccessor.callMethod and see why it is not finding it. Thanks for the nudge. I finally got a more detailed message ("Method "isUserSubscribedViaBulletin" failed for object mumble.model.CommunityClassified) which has as i

Re: ognl method lookup failure

2009-12-15 Thread Dale Newfield
Musachy Barroso wrote: I would suggest Thank you. After all my frustrations my bug was a typo in an EL expression. Argh. -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: focusElement in s:form

2009-12-28 Thread Dale Newfield
CRANFORD, CHRIS wrote: Is there anything special I could be missing here to get FF to focus on the field when the page is rendered? There's no magic. The only way for this to happen is by executing a snippet of javascript in the browser. Therefore this will not work in a browser that has ja

Re: focusElement in s:form

2009-12-28 Thread Dale Newfield
CRANFORD, CHRIS wrote: I have removed all javascript from the JSP page and installed Firebug. No errors show up and Javascript is enabled. I get the same result in IE as well where my form isn't focusing on my userName field. So put a breakpoint on the javascript line that is making the focus(

Re: focusElement in s:form

2009-12-28 Thread Dale Newfield
CRANFORD, CHRIS wrote: I don't see any Javascript code in the Source file in the browser at all. That's what is not making any sense to me for the form tag. It is as if the focusElement doesn't cause the tag to do anything at all. I would expect to see some stuff in the source file tha

Re: focusElement in s:form

2009-12-29 Thread Dale Newfield
The only two places I found focus() called in the templates are in css_xhtml/form-close.ftl and xhtml/form-close.ftl. You can look there to see the "magic" behind the scenes. Also note, while you're setting the theme globally, it can also be changed on a tag-by-tag basis with the theme attrib

Re: Struts 2.0 to 2.1 Migration problem

2010-01-02 Thread Dale Newfield
OP wrote: 2.0.6 ... 2.1.6 Any reason you'd upgrade to an old version, and not the most recently released 2.1.8.1? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...

Re: Distinguish between request parameters and struts.xml parameters in Struts2

2010-01-13 Thread Dale Newfield
Musachy Barroso wrote: No way to distinguish, that I know off. Perhaps simply inserting a custom interceptor between params and actionMappingParams/staticParams so you can track which are set before the custom interceptor runs and which are set afterwards? -Dale ---

Re: REST Plugin only for some actions

2010-01-14 Thread Dale Newfield
Lotsopa wrote: Is there anything new about NamespaceBasedActionMapper :) I mean, does this thing work? Someone convinced me a better name was "PrefixBasedActionMapper", but yes, it works fine. The code can be found as an attachment to this JIRA issue: https://issues.apache.org/struts/browse

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Dale Newfield
On Thu, Jan 14, 2010 at 8:00 PM, Musachy Barroso wrote: > I would expect that, FreeMarker templates(+ struts code) will always > be slower than java code. If you are using the simple tags, give a try > to the Java Tags: > > http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html I assume thi

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Dale Newfield
Musachy Barroso wrote: Not really, you can mix the tags using the "theme" attribute, not very pretty, but that should work. Just to make sure I understand: If I set , then any time a tag is being processed with the simple theme it'll use the java implementation, but for any tags not using th

Re: Session help

2010-01-19 Thread Dale Newfield
emil thushanga wrote: if namespace is 'Barbados' session ='Barbados' if namespace is 'Antigua' session ='Antigua' One simple way to do this would be to write an interceptor that takes the namespace from the action mapping and sets the appropriate value in session scope. -Dale

Re: select box dynamic loads depends on another select box

2010-01-20 Thread Dale Newfield
nani2ratna wrote: I have 2 select boxes. If user changes one select box, then data in second one should be changed and reload from database. I believe http://struts.apache.org/2.1.8.1/docs/doubleselect.html sends it all in the original page rather than using subsequent asynchronous requests..

Re: Session help

2010-01-20 Thread Dale Newfield
emil thushanga wrote: Thanks for the solutions. i prefer to do it in interceptors way. if any resources available for me to grab the thing please let me know. any way thanks a lot. A good place to start: http://struts.apache.org/2.1.8.1/docs/interceptors.html and http://struts.apache.org/2.1.8.

Re: Problem with excel download file from Action (S 2.1.8)

2010-01-21 Thread Dale Newfield
Oscar Calderon wrote: a question about downloading files from struts action. I would suggest using the stream result type rather than hand-constructing the servlet response. In either case, though, you want to look into the "contentDisposition" result parameter. Probably you want a value s

Re: Problem with excel download file from Action (S 2.1.8)

2010-01-22 Thread Dale Newfield
Glad you were able to get that working. Where did you find the documentation that suggested this part of your stream result? Oscar wrote: filename="nameoffile.xls" The filename can also be specified, but the only valid "contentDisposition" values are "inline" or "attachment". So you wa

Re: Problem with excel download file from Action (S 2.1.8)

2010-01-22 Thread Dale Newfield
Stephen Turner wrote: Oscar's syntax is described in the Struts docs: http://struts.apache.org/2.0.8/docs/stream-result.html It's been updated in http://struts.apache.org/2.1.8.1/docs/stream-result.html Too bad the docs are versioned like that so that bad documents don't "go away" once they'v

Re: Chain Getting Original URI

2010-01-27 Thread Dale Newfield
CRANFORD, CHRIS wrote: That doesn't solve my original problem Gabriel. It does if you are not tied to using chaining, which is almost always a bad idea. Why isn't this implemented simply as an interceptor? -Dale P.S.: Patient: Doctor, doctor! It hurts when I do *this*. Doctor: Stop doin

Re: [Q] Enable Freemarker template caching

2010-02-15 Thread Dale Newfield
Hoying, Ken wrote: In Struts versions prior to 2.0.10, you had to copy the /template directory from the Struts 2 jar in your WEB_APP root to utilize Freemarker's built in chaching mechanism in order to achieve similar results. And I think as a result of following this old advice I've now got ol

Re: s:if inside s:url

2010-02-25 Thread Dale Newfield
CRANFORD, CHRIS wrote: That still renders "&department=" on the request when the department field is null which is not what I want. I understand the desire to have "pretty" urls, but technically the presence or absence of "&department=" in the url is not distinguishable by the action created

Re: s:if inside s:url

2010-02-25 Thread Dale Newfield
CRANFORD, CHRIS wrote: -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Nabble and mailing list archives

2010-02-25 Thread Dale Newfield
Greg Lindholm wrote: This mailing list on Nabble seems to be gone, at least I can't find it. http://old.nabble.com/Struts-f203.html -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e

Re: jsp out to a differnet outputstream

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

Re: optiontransferselect and cssStyle

2010-03-11 Thread Dale Newfield
David Crespo Arroyo wrote: I want don't display the red area in my view (http://imagebin.ca/view/j6G3MClp.html) until I do click in a select of this view. So put that inside a span or div with display:none, and add javascript to change that when appropriate. -Dale

Re: How can one use OGNL on custom .tag files?

2010-03-12 Thread Dale Newfield
wild_oscar wrote: However, EL security doesn't allow for expressions in the s:date tag. This is true no matter where the tag resides (.jsp or .tag). If you have an EL value you can use c:set to put it someplace (request scope might be simplest) where you can also address it using ognl. ${d

Re: Weird behavior in getText()

2010-03-23 Thread Dale Newfield
Chris Pratt wrote: for some reason, in my current instance it's trying to evaluate the resource bundle key as an OGNL expression. A couple weeks ago I finally took the time to look at lots of the warning output in my log files and was able to use that to fix a few buggy ognl expressions (yay

Re: s:if tag syntax help needed

2010-03-31 Thread Dale Newfield
Felipe A. Lorenz wrote: Im not sure that you can use it (instanceof). The problem might not be with instanceof but rather StringElement. Did you try a fully qualified classname? On 31/3/2010 06:49, RogerV wrote: is the closest you listed. Try that one (or replace "structure.elements[#

Re: struts 2 tag confution

2010-04-07 Thread Dale Newfield
Supratim Bandyopadhyaya wrote: But the parameter direction which is assigned a value "forward" does not show. The param "direction" is assigned the value resulting from evaluating "forward" against the valuestack. FOO works because anything inside the tag is evaluated to a stri

Re: Render jsp to web browser and char[]

2010-04-08 Thread Dale Newfield
Jason Pyeron wrote: I am scratching my head on this one. Maybe a filter declared in web.xml akin to sitemesh? Hell, if you're already using sitemesh, a decorator that wraps the whole page in a tag, followed by a scriptlet (or custom tag or something) that takes that value and stuffs it where

Re: s:iterator status doubt

2010-04-12 Thread Dale Newfield
Burton Rhodes wrote: fieldValue="%{notificationID}" onclick="%{'javascript:markNotification('+#stat.index+');'}"/> -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h.

Re: Webapp runs under Windows, throws OGNL error under Linux

2010-04-13 Thread Dale Newfield
Are you certain that there's not more than one version of the OGNL jar in one of those deployment environments that's causing one to environment to find classes with different methods than the other? I'd see if you can get detailed logging info from the classloader so you know where all the cl

Re: previous action

2010-04-15 Thread Dale Newfield
lucas owen wrote: An easy one: how can I figure out the struts 2 previous action, the one I come from? You could be asking for either of two different things: The action related to the current request? The action related to the URL being displayed in the browser's address bar when the curre

Re: Basic security problem

2010-04-16 Thread Dale Newfield
Hand-rolled security almost always has many holes. I would suggest using spring security. Cimballi wrote: One way to do it it to have a super action with a permission property, and you set the permission property with a static param in your struts xml files using the StaticParameters intercepto

Re: Using json in Struts 2.1.8.1

2010-04-16 Thread Dale Newfield
Or just -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Counter question

2010-04-20 Thread Dale Newfield
On 4/20/10 5:21 AM, Ganesh wrote: I have a integer value and i have to show that many number of images. Could any one help me how to use the Counter tag. More recent struts2 versions have more useful iterator use cases, so now you can just use begin, end, and step http://struts.apache.org/2.x

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Dale Newfield
On 4/19/10 2:14 PM, sharath karnati wrote: Can you please send me sample example using AJAX in struts 2.1.8, where action method returns json list to a page. Trying to catch up from being out of town all weekend (and Monday), so I'm just going to throw some results of searching google at you:

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Dale Newfield
On 4/20/10 11:34 AM, sharath karnati wrote: json-default extends struts-default, so no reason do list both (and I don't even know if that works). json-default defines the result type json, so no reason to redefine it again. json I don't know if action names can

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Dale Newfield
On 4/20/10 2:11 PM, sharath karnati wrote: but facing same problem... Because your problem doesn't appear to be a server-side one, but rather what's going on inside the browser. In struts.properties file having below line *struts.enable.DynamicMethodInvocation = **true* If that's true, th

Re: struts action related query

2010-04-20 Thread Dale Newfield
Sounds like you want the browser to submit a request without attempting to replace the current page with the results. The way the browser does that is by using javascript and specifically a javascript object called XMLHttpRequest. Use of that has become called AJAX, and there are lots of libr

Re: Question on WW-2272 fixed by musachy

2010-04-29 Thread Dale Newfield
On 4/29/10 12:08 PM, Bhaarat Sharma wrote: https://issues.apache.org/jira/browse/WW-2272 Fixed on xwork. rv1780 I am just trying to figure out what rv1780 means and how can I traslate that to which xwork jar would have this issue fixed? If you hit the "All" tab you'll see: Fix Version/s: 2

Re: Submit not passing the form input to the action

2010-04-29 Thread Dale Newfield
On 4/29/10 2:13 PM, Kartik Kumar wrote: @Nikhil No action form used as I am using Struts2. Each row has a submit button. Each row should have it's own form. -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org F

Re: Building Menu's in Struts Applications

2010-04-30 Thread Dale Newfield
On 4/30/10 6:31 AM, RogerV wrote: What tools/techniques are people using these days to build menus for their struts applications, particularly where menu/sub-menu contents are dynamic? Is the struts-menu project still active/relevant or is everyone rolling their own? How about Jquery and Json?

Re: Where is the documentation for Struts tags ....

2010-04-30 Thread Dale Newfield
On 4/30/10 10:43 AM, RogerV wrote: Where is the latest documentation for using Struts 2 tags? I had a problem earlier in the week trying to use the optiontransferselect tag http://struts.apache.org/2.x/docs/optiontransferselect.html But there appears to be a bug with the snippets right now...

Re: Validate without submit?

2010-04-30 Thread Dale Newfield
On 4/30/10 6:50 PM, Ozu Natsu wrote: Anyone have any ideas? Debugging from the client side: Firebug in Firefox. Debugging from the server side: log messages (log4j or other). -Dale - To unsubscribe, e-mail: user-unsubscr...

Re: Validate without submit?

2010-05-01 Thread Dale Newfield
On 5/1/10 11:58 AM, Ozu Natsu wrote: I'm also puzzled why the JSONValidationInterceptor validationAware.hasErrors() is always returning the entire validation rule set. Is params in the interceptor stack? Are the arguments being passed? (Look at the request from the client side with firefox.)

Re: Where is the documentation for Struts tags ....

2010-05-04 Thread Dale Newfield
On 5/3/10 2:54 AM, RogerV wrote: So what html does this generate for the client to render/submit? If you set the form action to be GET it's even easier to see what it is submitting. Once you know it's submitting the right set of values, then you can focus on where those values go. Thi

Re: input fields with dynamic names

2010-05-04 Thread Dale Newfield
On 5/3/10 10:08 AM, Mitch Claborn wrote: Bump. Any other ideas? Yes. ParameterAware allows you to handle parameters without the setters and getters you think are necessary. Look there again. -Dale Mitch Claborn wrote: That works for setting parameter names, but not so well when the tag

Re: Where is the documentation for Struts tags ....

2010-05-04 Thread Dale Newfield
On 5/4/10 10:08 AM, RogerV wrote: The rendering is a bit odd, which makes me feel I'm still missing something. Due to the fact that there are three checkboxes with the right values and the right pre-selection, we know that the list attribute and the value attribute of the tag are w

Re: Where is the documentation for Struts tags ....

2010-05-05 Thread Dale Newfield
On 5/5/10 2:57 AM, RogerV wrote: The final clue! I changed my jsp to; checkbox?selectedroles=ROLE_ADMIN&selectedroles=ROLE_USER&selectedroles=ROLE_UBER&__multiselect_selectedroles= is sent. I saw an exception being thrown "No such method for setSelectedRoles(String) and the message Very

Re: ExecAndWait interceptor parameters lost

2010-05-05 Thread Dale Newfield
I believe that your problem isn't with execAndWait -- it's with the chain result type. The way that execAndWait works is that there's only one job runnable at a time in any given session with any given action name. The intermediate requests don't need the arguments as it's just using the acti

Re: Where is the documentation for Struts tags ....

2010-05-05 Thread Dale Newfield
On 5/5/10 9:58 AM, RogerV wrote: I'd be happy to contribute I'd think the best place is: https://cwiki.apache.org/confluence/display/WW/Struts+2+Form+Tags I forget what hoops you have to jump through to get a working wiki account...if it doesn't "just work" when you try to register you might

Re: and the CheckBox Interceptor

2010-05-06 Thread Dale Newfield
On 5/6/10 4:15 AM, RogerV wrote: The documentation says that the checkbox interceptor "Looks for a hidden identification field that specifies the original value of the checkbox. If the checkbox isn't submitted, insert it into the parameters as if it was with the value of 'false'." So let's thin

Re: ognl syntax to populate maps

2010-05-06 Thread Dale Newfield
On 5/6/10 8:38 PM, Dave Evans wrote: My action has a rankMap property with a getter and setter. And is setRankMap()'s argument Map? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e

Re: Iterate over an ArrayList of arrays

2010-05-11 Thread Dale Newfield
On 5/11/10 5:59 AM, Steven Yang wrote: try ${top[0]} Except you're using EL here to access OGNL. I'd suggest this is cleaner: value="%{top[0]}"/> -Dale - To unsubscribe, e-mail

Re: Catch all method for actions?

2010-05-11 Thread Dale Newfield
On 5/11/10 11:34 AM, Mitch Claborn wrote: A security scan on our site is sending a request like /emailalink!"XxxX.html I'd advise setting struts.enable.DynamicMethodInvocation=false as a first step. I'd like to be able to somehow capture those requests into a catch-all or default method on

Re: Some Spring/Struts questions

2010-05-12 Thread Dale Newfield
On 5/12/10 9:32 AM, Wes Wannemacher wrote: I've seen a few responses, but I think the best way would be to write an interceptor that places the bean into the session. Give it a known name in the session, then you can use OGNL to access it... That all sounds reasonable, except the part about put

Re: Some Spring/Struts questions

2010-05-13 Thread Dale Newfield
On 5/13/10 7:10 AM, Andy Law wrote: Following up on that thought process, if I use an interceptor then is there any difference/tradeoff/efficiency gain or loss from stuffing the object in question onto the Value Stack instead of dropping it into the request or the session? I guess that "explicitn

Re: Help, struts 2.1.8 with Struts 2 Full Hibernate Plugin 2.1.3 GA

2010-05-16 Thread Dale Newfield
On 5/16/10 1:13 PM, Fabio Perfetti wrote: Hi! I am having problems with struts 2.1.8 and the plugin for integrate hibernate. java.lang.NullPointerException at it.tesina.model.DipendenteService.getByUsername(DipendenteService.java:42) public Dipendente getByUsername(String username){ Dipende

Re: Help, struts 2.1.8 with Struts 2 Full Hibernate Plugin 2.1.3 GA

2010-05-17 Thread Dale Newfield
ction directly utilizing DAOs, and I wouldn't suggest that you ever make the service layer and the DAO layer synonymous, both of which you appear to be doing... -Dale 2010/5/16 Dale Newfield mailto:d...@newfield.org>> On 5/16/10 1:13 PM, Fabio Perfetti wrote: Hi! I am havi

Re: Session object null

2010-05-18 Thread Dale Newfield
On 5/18/10 12:35 PM, Ken wrote: What I don't understand is I have an object who's constructor needs session data... So it calls: Map session = ActionContext.getContext().getSession(); But session is always null... http://struts.apache.org/2.1.8.1/struts2-core/apidocs/com/opensymphony/xwork2/Ac

Re: Session object null

2010-05-18 Thread Dale Newfield
On 5/18/10 2:17 PM, Ken wrote: Let me see if I understand this correctly. Since the action object has not been created yet, and this is in a different thread... I can not get the correct context... Although the session objects _is_ someplace... It will also not work in the constructor even if t

Re: Session object null

2010-05-19 Thread Dale Newfield
On 5/18/10 6:55 PM, Ken wrote: The problem has been resolved with what you said... Glad to hear it. However I'll fill you as I am new and looking for best practise. I can offer my advice, but I don't have the hubris to claim that's necessarily what others would agree to as best practice. :

Re: Exec & Wait

2010-06-02 Thread Dale Newfield
On 6/2/10 7:29 AM, RogerV wrote: I'm using the Exec&Wait interceptor in a couple of places. I've noticed that while the long running process is in progress, every time the wait screen polls the action I get [WARN,TokenHelper] Could not find token mapped to token name struts.token in my logs. Ex

Re: Encrypting parameters

2010-06-02 Thread Dale Newfield
On 6/2/10 11:22 PM, Stephane Cosmeur wrote: I would like to improve the security of my web application. My problem is I would like to encrypt the visible parameters in the URL to prevent user to change it to access data he should not see. No amount of obfuscation can prevent someone from eventu

Re: Exec & Wait

2010-06-03 Thread Dale Newfield
On 6/2/10 3:04 PM, Roger wrote: I was more, kind of wondering, what does using exec&wait with Token support buy me over using exec&wait without Token support? (I've never used the in- built token support before) https://issues.apache.org/jira/browse/WW-1741 appears to be where this code snippe

Re: tag attributes evaluation

2010-06-14 Thread Dale Newfield
On 6/13/10 2:02 PM, Oleg Mikheev wrote: I really think that this notation must be documented specifically on this page: http://struts.apache.org/2.1.8.1/docs/ognl.html It's a wiki. Please feel free to offer the modifications you think are appropriate. -Dale

Re: tag attributes evaluation

2010-06-14 Thread Dale Newfield
On 6/14/10 4:25 PM, Emi Lu wrote: On 06/14/2010 09:59 AM, Dale Newfield wrote: On 6/13/10 2:02 PM, Oleg Mikheev wrote: I really think that this notation must be documented specifically on this page: http://struts.apache.org/2.1.8.1/docs/ognl.html It's a wiki. Please feel free to offe

Re: Migrating from Struts 2.0.x to 2.1.8.x

2010-06-16 Thread Dale Newfield
On 6/16/10 9:04 AM, Frans Thamura wrote: but migrate and mix with REST, is still a problem Huh? On Wed, Jun 16, 2010 at 7:53 PM, Greg Lindholmwrote: It should be a pretty easy migration and all the issues are documented here https://cwiki.apache.org/confluence/display/S2WIKI/Troubleshooting+

Re: Get a list stored in the session to the struts tag

2010-06-23 Thread Dale Newfield
On 6/23/10 6:55 AM, Kushan Jayathilake wrote: Thank you very much for your quick reply, i have found the way, no need of that # sign there. That probably means that your action has a getSession() method. Since you may use that view layer page from a different action, or you may want to

Re: Page composition strategy

2010-06-24 Thread Dale Newfield
On 6/24/10 5:33 PM, Brian Thompson wrote: Out of curiosity, has anyone on the list actually used both Tiles and Sitemesh? I'd really like to read a comparison of the two I used tiles with Struts1 about 6 years ago. I've been using sitemesh with Struts2 for the last several years. I think that

Re: How to modify Struts2 start up process.

2010-06-25 Thread Dale Newfield
On 6/25/10 2:36 PM, hisameer wrote: I have to implement a logic so that when the server starts I can execute some database scripts using my DAO service layer. implement a ServletContextListener that includes the method contextInitialized(ServletContextEvent event). You should be able to get

Re: How to modify Struts2 start up process.

2010-06-25 Thread Dale Newfield
Oh, and I forgot to mention, add a segment to your web.xml so the application server knows to instantiate and call it. -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h.

Re: s:if test condition

2010-06-27 Thread Dale Newfield
lucas owen wrote: Bill Bohnenberger Since 'activated' is a String, try swapping your single& double quotes, e.g. > > that was it!!! The key is understanding *why* it makes a difference. The reason is that a single character demarcated by single quotes is not a String, it is a character. T

Re: How to render HTML in Form Tag Label?

2010-06-28 Thread Dale Newfield
On 6/28/10 4:16 AM, David Lu wrote: I ended up just rendering that particular checkbox myself using standard JSP and HttpServletRequest, doing things the "old fashioned" way. :) If you want the checkbox interceptor to work, you need a corresponding hidden input field...you might want to render

Re: Struts time picker does not render in IE7/IE8

2010-06-29 Thread Dale Newfield
On 6/29/10 9:03 AM, john.vargh...@smartonline.com wrote: Hi friendsany suggesstions? My suggestion is "don't use dojo". -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: u

Re: Page composition strategy

2010-06-29 Thread Dale Newfield
On 6/26/10 4:26 AM, Paweł Wielgus wrote: as a long time tiles user it would be very interesting for me to read about some specific problem that can be easily solved in sitemesh and hard or impossible to solve in tiles. One thing that's difficult to get right if you have to generate the page in

Re: Page composition strategy

2010-06-29 Thread Dale Newfield
On 6/29/10 6:23 PM, Chris Pratt wrote: I think the decision really comes down to which model you like better. No argument. I'm mainly using sitemesh with this project because I jump started it with appfuse, and that's what it used :-) -Dale -

Re: OGNL to get list of keys

2010-07-01 Thread Dale Newfield
On 7/1/10 3:51 PM, Ken wrote: This produced the desired effect: (added var="header" to iterator tag) If you have var="header" in the iterator, the appropriate way to reference that value within the iterator is "%{#header}"

Re: OGNL to get list of keys

2010-07-01 Thread Dale Newfield
On 7/1/10 4:08 PM, Ken wrote: Adding 'var="header"' to the tag simply pushed a named object onto the stack. Am I missing something? Yes. Any use of an s:iterator always pushes the current item onto the top of the stack during each iteration of the body. You can refer to that as "top" if

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 7:04 AM, Amol Ghotankar wrote: Authorization will have two parts 1. decide which action are allowed and which are not, Spring Security. 2 . decide how much data to access. Means if I have a database which has 100 rows, then to show 100 or 10 or 50 based on the role of the user an

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 1:28 PM, Amol Ghotankar wrote: 2 . decide how much data to access. This I am really working something where struts2 intercepter will read what role the user has and set some global role for that reqest which will be read by dao to use to fetch the data. The interceptor cannot know in

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 2:11 PM, Ken wrote: This is a hand rolled solution I used: Create an interceptor which checks if a User object exists when accessing a secure package, if it does not exist redirect the user to a login page and record the initial url (will redirect back to that page after login). This

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 2:26 PM, Amol Ghotankar wrote: Part 2 . How to control access of data from back end database based on action/user-role. i.e how much data should be returned through called action, 10 rows, 100 rows or 1000 rows from database, based on user role and/or called action. Whether data sh

Re: Authorization Best Practices

2010-07-08 Thread Dale Newfield
This isn't your architecture review board. This is a mailing list supporting struts, just one of many components in your application. Not a single one of your questions relates to struts. -Dale - To unsubscribe, e-mail: user-

Re: Emailing the contents of a Struts2 view?

2010-07-08 Thread Dale Newfield
On 7/8/10 9:44 AM, ch...@chrismiles.org wrote: Getting the resuling rendered JSP would be something tricky. And not what you want. You'd still have to go through that output and modify all the relative links to make them absolute, and you sure don't want to have any javascript or forms in yo

Re: Authorization Best Practices

2010-07-08 Thread Dale Newfield
On 7/8/10 10:17 AM, MB wrote: "Using Struts 2.x can we do authorization of client request, if yes what are the best practices" That answer has been given 3 times in this thread: Spring Security. The best practices are to learn about architecture and security, which are completely independent

Re: Emailing the contents of a Struts2 view?

2010-07-08 Thread Dale Newfield
On 7/8/10 10:37 AM, Robert Graf-Waczenski wrote: Yes, tricky indeed, but currently the only way to go. Not the only way. Just because you use jsp to render pages doesn't mean that's the only way to render them. You could render that page with freemarker or velocity (or, or, or) which can mo

Re: Emailing the contents of a Struts2 view?

2010-07-08 Thread Dale Newfield
I'm pretty certain this is not a good idea, but it's a hack that's been floating in my head: If you use sitemesh, you could make a decorator that captures the full message, does something with it, then echoes it again. basically: -Dale ---

Re: Struts2 or Struts1?

2010-07-09 Thread Dale Newfield
On 7/9/10 6:42 AM, Alvarito wrote: Does anyone knows what is the support and existing online documentation to work with Struts2 and Hibernate together? Matt Raible has put together quite useful documentation that goes along with his "AppFuse" tool that basically helps you kick start an applic

Re: Accessing scoped variables via tags

2010-07-14 Thread Dale Newfield
On 7/14/10 1:22 PM, mailtolouis2020-str...@yahoo.com wrote: https://cwiki.apache.org/WW/application-session-request-objects-in-jsp.html I think the doc need to update. Done, thanks: https://cwiki.apache.org/confluence/pages/diffpages.action?pageId=14052&originalId=23332622 -Dale -

Re: Dispatch action calling a function multiple times depending on browser

2010-07-16 Thread Dale Newfield
On 7/16/10 1:06 PM, abhishek jain wrote: The dispatch action is calling some of the functions of the action class multiple times, it calls it twice for mozilla and single time in chrome. One common error that will appear to result in this behavior are images without a specified src, resulting

  1   2   3   4   5   6   >