Re: Problem with encoding

2007-01-02 Thread Tom Schneider
Does it have anything to do with HTML escaping? There is no way to turn off html escaping in the s:text tag. (I probably should file a bug) I didn't see anything for textfield--I'm not sure what the escaping behavior is. What shows up on the screen in the non-working case, escaped HTML or

Re: Ideal solution to pagination (long lists)?

2007-01-04 Thread Tom Schneider
For struts2 tags, checkout https://issues.apache.org/struts/browse/WW-1569 The problem I have with displaytag is that in an effort to satisfy everyone's needs, it is infinitely configurable. IMHO, that makes it hard to figure out and hard to use. The other issue we had with display tags is

Re: Redirect with Struts 2

2007-01-08 Thread Tom Schneider
Interesting question. I had the same question when I started looking at webwork. Here's what I do when I need to redirect to a different domain. If it's a static url, you can just hard code the full url in your struts.xml with a result type of redirect. If it's dynamic, there's a little

Re: Redirect with Struts 2

2007-01-08 Thread Tom Schneider
: How about passing parameters along with the redirect? On 1/8/07, Tom Schneider [EMAIL PROTECTED] wrote: Interesting question. I had the same question when I started looking at webwork. Here's what I do when I need to redirect to a different domain. If it's a static url, you can just hard

Re: Action without interceptors

2007-01-09 Thread Tom Schneider
One option is the create a NullInterceptor that doesn't do anything. It would be trivial to create and would allow you to override a default interceptor stack with an interceptor that does nothing. Tom On 1/9/07, Dave Newton [EMAIL PROTECTED] wrote: From: Juan Espinosa [mailto:[EMAIL

Re: Action without interceptors

2007-01-09 Thread Tom Schneider
Don's solution is good if you don't want any of your actions to have interceptors. My solution was for the cases where most of the actions use the default stack and only a handful of actions shouldn't have any interceptors. Which brings up a more interesting question: Can you have an empty

Re: Moving from struts-1 to struts-2 or spring mvc

2007-01-10 Thread Tom Schneider
I don't think it's that trivial. For every struts 1 action, you have to configure an action entry in the struts.xml. (At least as far as I can tell based on the plugin documentation at http://cwiki.apache.org/S2PLUGINS/struts-1-plugin.html) Remember that struts 1 and struts 2 are completely

Re: Struts2 + Cookies

2007-01-23 Thread Tom Schneider
I seem to remember a CookieInterceptor: https://issues.apache.org/struts/browse/WW-669. It doesn't look like it has made it into the core framework yet. Emmanuel KOJE wrote: Hi Guys, I tried without sucess to get some information about the management of cookie using struts2. Could you

Re: [s2] Question about SessionAware docs.

2007-01-23 Thread Tom Schneider
Actually your explanation is not quite 100% correct. The interceptor injects a Map that is backed by the HttpSession. So puts and gets to the Map will actually be puts and gets to the HttpSession. (Very clever IMO) You have a valid point about the javadoc. My guess is that at one point it

Re: [s2] String comparison with OGNL

2007-01-23 Thread Tom Schneider
#parameters.addrType is of type String correct? If not, e.g. if it were an enum, then I would expect all the comparisons to fail. You might try #parameters.addrType.toString().equals('billing') and see if that gets it to work. Tom On 1/23/07, Wesley Wannemacher [EMAIL PROTECTED] wrote: Nope,

Re: [s2] String comparison with OGNL

2007-01-23 Thread Tom Schneider
gambit of syntaxes and I still can't find one that works. If I'm using the correct syntax, let me know because it could just be a bad set of struts jars (which I can replace). -Wes -Original Message- From: Tom Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 1:50 PM

Re: How do I configure wildcard action definitions in Struts 2.x?

2007-01-23 Thread Tom Schneider
Are you looking for something more than this: http://struts.apache.org/2.x/docs/action-configuration.html#ActionConfiguration-WildcardAliases It seems to give a pretty decent overview with a few examples. Are we looking for something more extensive than this? Tom Don Brown wrote: Yes, and it

Re: Why struts2 and not spring mvc

2007-01-23 Thread Tom Schneider
Hello, I wrote the Spring MVC plugin (and the Spring Webflow plugin) for Struts 2, so I'm familiar with both frameworks. Here are some of the advantages that I see: * Better interceptors - the interceptors in Spring MVC are very crude and hard to configure--the interceptor architecture for

Re: Type Conversion Messages i18n

2007-01-24 Thread Tom Schneider
I'm assuming this is for Struts 2. If not, please ignore me. :) This is one thing I wish they would improve in Struts 2--it's certainly not as obvious or trivial as I would expect it, but this little tidbit was buried deep in the book: 'Webwork in Action'. Here is an example of one of our

Re: Make Struts set form data onto the action in same order as the form's fields

2007-01-25 Thread Tom Schneider
This is an issue with the typical edit/save scenario. The problem we are discussing is that the domain model is needed in some form before the parameter can be repopulated from the form save. The technique you are using is to reread the data from the database before the parameters are set. An

Re: Make Struts set form data onto the action in same order as the form's fields

2007-01-25 Thread Tom Schneider
parameters on the url--so depending on how the app server handled it, we would get one or the other value. I can't imagine that any java web framework could do this successfully. Tom On 1/25/07, Célio Cidral Junior [EMAIL PROTECTED] wrote: 2007/1/25, Tom Schneider [EMAIL PROTECTED

Re: Make Struts set form data onto the action in same order as the form's fields

2007-01-25 Thread Tom Schneider
I think your best bet would be to break up the parameter setting into 2 parts. (A variation on the paramsPrepareParamsStack) The first part would set all parameters needed to load the data from the data. Then in the prepare, you would have the id's needed to load the data from the database. The

Re: Struts 2.0 vs Struts 1.3.5 vs Struts 1.2

2007-01-26 Thread Tom Schneider
Joe Germuska wrote: Struts 1.3.5 is intended to be essentially backwards compatible with 1.2.x; information on the details is here: http://wiki.apache.org/struts/StrutsUpgradeNotes12to13 Struts 2 is substantially different. I would not expect a Struts 1 developer to implement a project on the

Re: Dynamically redirect to a page

2007-01-28 Thread Tom Schneider
http://marc.theaimsgroup.com/?l=struts-userm=116826570319911w=2, Omer Basar wrote: Hi all, I have another problem. I want to redirect my action to a link but the link must be gathered from database and it can be chosen randomly. So I cannot staticly put a definition for this action in

Re: [s2] Cannot create a session after the response has been committed: struts or tomcat ?

2007-01-29 Thread Tom Schneider
Does this http://jira.opensymphony.com/browse/WW-291 have anything to do with this? It seems like if Struts 2 is doing a sendError when it should be throwing a ServletException like WW currently is, you would get results like this. It still means that there is another error that is the root

Re: upgrade to 2.0.4

2007-01-29 Thread Tom Schneider
Does this: http://marc.theaimsgroup.com/?l=struts-userm=117002603126715w=2 help you? Tom xiao jie wrote: hi: I tried to update my application from 2.0.1 to 2.0.4 and I have downloaded all the nightly built 2.0.4 jar files and plugins i needed and put them under WEB-INF/lib (do I have to

Re: [s2] Finding a URL of an Action within execute()

2007-01-30 Thread Tom Schneider
Take a look at ServletActionRedirectResult, something like this might do it: @Inject public void setActionMapper(ActionMapper mapper) { this.actionMapper = mapper; } to inject the action mapper. I've coined the phrase 'magic injector' to describe this. Then String uri =

Re: [s2] getting servletContext in actions

2007-01-31 Thread Tom Schneider
It would be very easy to create a Spring FactoryBean for this. (Checkout the Spring Documentation if that doesn't make sense) Then, to access the servlet context, just do a: ServletContext servletContext = ServletActionContext.getServletContext(); The FactoryBean would allow you to use

Re: [ot] [s2] getting servletContext in actions

2007-01-31 Thread Tom Schneider
ServletActionContext needs to the executed within the context of a webwork request, i think the problem is related to that. Do you know how can i make my StrutsServletcontextLoader be executed within a webwork request? many thanks Jeff On 31 Jan 2007, at 13:52, Tom Schneider wrote: It would be very easy

Re: Producing links

2007-02-04 Thread Tom Schneider
I think the idea here is that you'd want to do something like: a action=preference_prepare bundle_key=preferences param name=param1 value=value1/ /a To me, this makes sense because there were many places where I used an ww:url tag and a ww:a tag directly after it, so having one tag that

Re: Producing links

2007-02-04 Thread Tom Schneider
Joe you're assessment is correct. There is usually a 1 to 1 mapping between JSP tag and UI component. Right now the form tag and url tag duplicate several pieces of key url building logic. I spent some time abstracting away url building this weekend. I'm not far enough along to actually

Re: Struts 2 and Spring AOP using ProxyFactoryBean

2007-02-04 Thread Tom Schneider
This is a bug I just fixed in xwork 1.2.x and xwork 2.0.x. See http://jira.opensymphony.com/browse/XW-465 for details. Tom Shih Lee wrote: Hello, I have downloaded struts-blank to play around. I was trying to use Spring AOP with Struts 2. However, I am getting the following error: 2007-02-04

Re: s2 Select listValue with message bundle key

2007-02-06 Thread Tom Schneider
s:select name=languageCode list=languageList listKey=iso2Code listValue=%{getText(iso2Code)} / This code will iterate over the languageList and look for a iso2Code property on each bean within the languageCode. Based on your description, I don't think that's the intent.

Re: s:textfield tag breaking line in page

2007-02-07 Thread Tom Schneider
or constant name=struts.ui.theme value=simple / as a global setting. Tom On 2/7/07, Dariusz Wojtas [EMAIL PROTECTED] wrote: s: textfield name=... theme=simple / It generates 2 cell row + optional error message for field if parent form is of theme 'xhtml' or 'ajax'. You may override cild

Re: [struts 2] Simplifying the interceptor stack

2007-02-08 Thread Tom Schneider
I can confirm these results based on my own webwork profiling experience. I wouldn't worry too much about interceptors that you don't use--the penalty is very minimal. David H. DeWolf wrote: mraible wrote: Also, are there any performance reasons to have separate stacks for display only

Re: Spring AOP X-work Error

2007-02-14 Thread Tom Schneider
I believe this is a bug that is already fixed in trunk. Please take a look at the xwork forum(s) if you need more details. (There a long thread on dynamic proxy invocation over there about this issue.) Tom thomas_ramapuram wrote: Hi, I was using Spring AOP along with Struts 2.0.5. The

Re: IS struts 2 websphere compatible?

2007-02-17 Thread Tom Schneider
Actually Websphere 6.1 runs on IBM's JDK 1.5. It's only Websphere 5.1 and 6.0 that use JDK 1.4.2. Praveen, Galagali (IE10) wrote: Hi, If struts2 needs jdk version 5 and if websphere 5.x or 6.x is not compatible with jdk 1.5 can we still use struts 2 for our application and still get it

Re: [S2] how do I handle upload larger than struts.multipart.maxSize

2007-02-17 Thread Tom Schneider
Please see the section on Parameters: http://struts.apache.org/2.x/docs/file-upload-interceptor.html And the multipart section of: http://struts.apache.org/2.x/docs/strutsproperties.html Nagraj Rao wrote: cant we override the max size in the struts.properties file... i guess we should be able

Re: [S2] Equivalent of Servlet init() method?

2007-02-22 Thread Tom Schneider
I see a couple of options. The first would be to create an interceptor for your singleton factory. In the init of the interceptor you would initialize this factory and then provide some mechanism to inject that factory into your actions. (possibly via a FactoryAware interface) Another

Re: Struts 2 and QueryString

2007-02-23 Thread Tom Schneider
Might this be the issue: https://issues.apache.org/struts/browse/WW-1563 This was an issue for websphere, but other app servers may act the same. (Not jetty or jboss though) Tom On 2/23/07, Matt Filion [EMAIL PROTECTED] wrote: I sent an post about this a few days ago and didnt really get a

Re: [DESIGN] struts dialog / wizard

2007-02-25 Thread Tom Schneider
Mark Menard has done some work in this area for struts2: http://www.vitarara.org/cms/node/84 For webwork I implemented something similar called a model repository. The problem that's being solved is that when the domain model reaches a certain complexity, using the null instantiation feature

Re: [s2] sitemesh PageFilter

2007-02-26 Thread Tom Schneider
I don't think you need a plugin for jsp support. In webwork, there wasn't any specific support for sitemesh--it just worked. I believe the same is true for struts2. On 2/26/07, C. Adams [EMAIL PROTECTED] wrote: I have just begun looking into sitemesh, and was pleased to see a struts2 plugin.

Re: [S2] The performance issue about OGNL

2007-02-27 Thread Tom Schneider
This is not a bug per se. The xhtml theme extends the simple theme. If a template doesn't exist in the xhtml theme it will fall back the simple theme. From a performance perspective, you simple need to copy the simple theme hidden.ftl to the xhtml directory. This will allow freemarker to cache

Re: [FRIDAY] OGNL Viewer

2007-10-26 Thread Tom Schneider
Musachy is is our javascript expert! I would demand a Web 2.0 compliant viewer with animation, fade-in/out and other whizbang features. :) Tom newton.dave wrote: --- Musachy Barroso [EMAIL PROTECTED] wrote: I would pay a couple large btw where is my cash? :) You're rich! It'd

Re: Validation Best Practices?

2007-10-28 Thread Tom Schneider
This is essentially what we're doing as well, but it is far from an ideal situation. The issue I've seen is that you can't easily use the validators from the xml in the validate() method. Another disadvantage is that validation is in 2 different places. Also, some of our validate() methods get

Re: any struts 2 unit testers out there?

2007-10-28 Thread Tom Schneider
My first suggestion is the make sure that the package.properties files are on the classpath when you run your junit test. Secondly, it would be helpful for us to help you figure this out if you post the stack trace for the null pointer exception. Third, you may want to debug into the getText()

Re: struts 2.1 - Is good enought ?

2007-10-28 Thread Tom Schneider
What's missing is an official release. If I were you, I would wait until there is a GA release for the 2.1.x series before running it in production. Pedro Herrera wrote: Is struts 2.1 good enought to a productuion environment ? what´s missing ? Herrera -- View this message in

Re: Validation Best Practices?

2007-10-29 Thread Tom Schneider
. (And as I stated before, I would love to use this both at the UI level and at the business logic/component level) Tom Gary Affonso wrote: Tom Schneider wrote: This is essentially what we're doing as well, but it is far from an ideal situation. The issue I've seen is that you can't easily use

Re: Validation Best Practices?

2007-10-29 Thread Tom Schneider
Just wanted to point out: http://jcp.org/en/jsr/detail?id=303 which is relevant to our discussion. No activity on this JSR since July of '06. I'm not convinced that annotations really solve the problem. I think for anything more than simple type checking you need a true programming language to

Re: Struts 2 and JasperReports Integration

2007-10-30 Thread Tom Schneider
Can you post the full stack trace, so we can figure out where this is happening? Looking that the example code, it all looks good, so I'm not sure why the myList is null. carmi_cd wrote: hi i followed this tutorial.. in JasperReports/Struts 2 Integration

Re: changing template for s:text

2007-10-30 Thread Tom Schneider
The s:text tag is considered a data tag, not a UI tag, so there is no ftl template backing that take. Your only option is to extend the tag to add the functionality that you describe. The functionality you describe sounds like it might be useful to others. Have you considered creating a patch

Re: Jasper plugin. Passing additional parameter

2007-11-05 Thread Tom Schneider
Serg, I'm not an expert at jasper reports, but I think parameters are pulled from the datasource. In that case, the jasper report result wraps the datasources in a ValueStackDataSource. (a class located in the jasper reports plugin) I would set a few breakpoints in there to see why the jasper

Re: Login checking before processing any action/class

2007-11-05 Thread Tom Schneider
With Acegi, are you using an interceptor or is there a different way to enforce security? I wouldn't mind seeing an example of this if there's one that you can point to. IMO, this would fit into Struts 2 authentication best practices and a little page describing the general setup wouldn't be a

Re: Validation Best Practices?

2007-11-06 Thread Tom Schneider
That looks like an interesting project. There are a lot of things that I like about what they are doing. There are a lot of things that could be handle that way. My fear with making everything a seperate Rule class is that some things cannot be encoded as a simple rule. Somevalidation needs

Re: [s2] LabelValueBean

2007-11-11 Thread Tom Schneider
Ted, I think in webwork, were you only needed name value pairs, you would typically use a Map. All tags have built-in support for dealing with maps. Is there a specific use case that you've encountered where you needed that? Tom Ted Husted wrote: Is there a corollary to the Struts 1

Re: captcha + struts2

2007-11-17 Thread Tom Schneider
This might be a good starting point: http://appfuse.org/display/APF/CAPTCHA+Integration Brian Relph wrote: I was wondering if anyone could help with a captcha implementation in struts2. i have seen plenty of stuff on the acegi + captcha implementation in appfuse, but i am not using acegi

Re: Struts2 + JFreeChart Plugin + HttpServletRequest

2007-11-25 Thread Tom Schneider
You don't need the fix to get this to work. You need to add the servletConfig interceptor to the interceptor stack of your action. This is the interceptor that looks for ServletRequestAware and injects the HttpServletRequest onto your action. Kate Fox-2 wrote: The version where it's fixed

Re: Wizard like Screens

2007-11-25 Thread Tom Schneider
Both of those plugins, by default, would need the session to keep track of the state. The webflow plugin can be configured to serialize the state to a hidden field, but there would be a lot of configuration and complication just for 2 fields. I would say your best bet is to have hidden fields

Re: struts2 blank application request parameters

2007-11-25 Thread Tom Schneider
Checkout the I18NInterceptor: http://struts.apache.org/2.0.11/docs/i18n-interceptor.html This interceptor picks up the request_locale parameter and sets the locale. This happens even before the action is executed. Tom slideharmony wrote: I'm really going crazy with struts2 and request

Re: Struts 2 Dependencies

2007-12-03 Thread Tom Schneider
Sounds like an enhancement to the dependency convergence report plugin for maven. All the metadata about which libraries are options is in the pom(s), so it would just be a matter of having a plugin that looked at that additional metadata. I think it would be redundant to try to maintain a

Re: startup action in struts2

2007-12-03 Thread Tom Schneider
In struts 2, the plugin architecture works differently. Off the top of my head, I can't think of similar functionality in s2. An alternative option would be to write a standard J2EE ContextListener and use that. This is how Spring gets loaded in newer versions of J2EE. Tom Christopher

Re: building struts with maven error Java Heap Space

2007-10-08 Thread Tom Schneider
Try: set MAVEN_OPT=-Xmx512m before you run the maven build. The problem is that maven doesn't have enough heap space to run the tests. The environment variable above should increate the maximum java heap space for maven. Tom Pavel Sapozhnikov wrote: Hi I am trying to mvn the checked out

Re: S2: Paging components

2007-10-08 Thread Tom Schneider
Take a look at TableTags: http://cwiki.apache.org/S2PLUGINS/table-tags.html It includes a UI tag that displays a basic pager. (It also does sorting) This is a struts 2 port of what we use for paging and sorting in webwork. Tom Joshua Jackson-3 wrote: Dear all, How do I implement

Re: building struts with maven error Java Heap Space

2007-10-08 Thread Tom Schneider
found error...I wasn't sure and at my work on XP machine I dont think I had to set anything like this and it worked fine. Well also I have laptop at home which has XP and I tried doing the same thing and it failed on this error too. On 10/8/07, Tom Schneider [EMAIL PROTECTED] wrote: Try

Re: GridView - save multiple items at the same time

2007-10-15 Thread Tom Schneider
Figuring out if there were type conversion errors was something we ran into. The bigger issue for us was validation. There is no easy way to do field level validation with an editable grid. (Or I haven't seen a good example of one) Josh Vickery-2 wrote: You can do this with Struts 2, but