RE: struts 2.1 beta

2007-09-28 Thread Wesley Wannemacher
How are you trying to download/build the beta? Maven? What sort of problems are you having? Compile issues, deployment issues? Did you try the nightly build? If you are building from SVN using Maven, this might be helpful - http://www.nabble.com/struts-2.1-beta-tf4509951.html#a12880737

RE: If Tag: testing for an enumerated value

2007-09-27 Thread Wesley Wannemacher
Try - s:if test=%{interval == @[EMAIL PROTECTED] anno s:date name=dataInizio format= / /s:if -Original Message- From: setecastronomy [mailto:[EMAIL PROTECTED] Sent: Thursday, September 27, 2007 7:35 AM To: user@struts.apache.org Subject: If Tag: testing for

RE: [S2]Actions with onLoad() and onSubmit() instead of execute()

2007-09-27 Thread Wesley Wannemacher
Check here - http://struts.apache.org/2.0.9/docs/action-configuration.html#ActionConf iguration-WildcardMethod -Wes -Original Message- From: Victor Neo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 27, 2007 12:15 PM To: user@struts.apache.org Subject: [S2]Actions with

RE: OGNL runtime viewer

2007-09-26 Thread Wesley Wannemacher
Scott, Using the OGNL console is like working interactively with perl or python, you just issue commands in OGNL and they will be evaluated and printed in the console. Here is a quick sample session - Welcome to the OGNL console! :- #request [EMAIL PROTECTED], __cleanup_recursion_counter=1,

RE: [S2] Iterator Tag and Status Count

2007-09-26 Thread Wesley Wannemacher
I think you may be interpreting it's purpose incorrectly. If you are looking for the size of the iterated collection, why not use OGNL to find it - '%{iterableList.size()}' ? From what I can tell, the 'count' is meant to tell you where you are in the iteration. -Wes -Original

RE: struts 2.1 beta

2007-09-25 Thread Wesley Wannemacher
I was having the same problem last week. To fix it, what I did was pull xwork2 from SVN and build with maven (although in some cases, I had to disable the unit tests because one failed sometimes [probably my fault]). Then once it is built, maven will use it. After that, make sure you have the

RE: struts 2.1 beta

2007-09-25 Thread Wesley Wannemacher
Stupid line breaks! svn co http://svn.opensymphony.com/svn/xwork/trunk xwork ; cd xwork ; mvn -Dmaven.test.skip=true -Pall ; cd .. ; svn co https://svn.apache.org/repos/asf/struts/current/ struts ; cd struts/struts2 ; mvn -Dmaven.test.skip=true -Pall (in case things get re-wrapped

RE: ModelDriven

2007-09-24 Thread Wesley Wannemacher
Yikes, what if getModel() is doing actual work, you're calling it twice for no apparent reason. Wouldn't it be significantly safer to: public String intercept(ActionInvocation invocation) throws Exception { Object action = invocation.getAction(); if (action instanceof

RE: OGNL runtime viewer

2007-09-24 Thread Wesley Wannemacher
Scott, Are you looking for the debug console? Try adding ?debug=console to your request. -Wes -Original Message- From: stanlick [mailto:[EMAIL PROTECTED] Sent: Monday, September 24, 2007 2:55 PM To: user@struts.apache.org Subject: OGNL runtime viewer I remember a J1

RE: Accessing Request Parameters from Action (Newbie Question)

2007-09-24 Thread Wesley Wannemacher
Make sure that the class that you have mapped to 'steptwo' has a getter/setter for previousaction Then, in your execute method (or whichever method you may have mapped in your struts.xml file), you should be able to retrieve the values because the setter(s) are called beforehand. There are a

RE: Accessing Request Parameters from Action (Newbie Question)

2007-09-24 Thread Wesley Wannemacher
(); Thanks, Cory On 9/24/07, Wesley Wannemacher [EMAIL PROTECTED] wrote: Make sure that the class that you have mapped to 'steptwo' has a getter/setter for previousaction Then, in your execute method (or whichever method you may have mapped in your struts.xml file), you should

RE: Struts 2 tutorial

2007-09-18 Thread Wesley Wannemacher
It is in the xwork jar file. It comes with any of the struts apps (struts2-blank, struts2-showcase). Struts2 is heavily based on WebWork, which uses xwork. I am not sure if this will be re-factored out. -Wes -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent:

RE: Know of any good custom tag tutorials for struts 2?

2007-09-13 Thread Wesley Wannemacher
I like to think the ones I wrote are good :) http://www.wantii.com/wordpress/?cat=3 I don't consider it complete yet, since I haven't covered tags/freemarker/spring/etc. But it covers basics and will keep you reading for a while. -Wes -Original Message- From: kkjacks [mailto:[EMAIL

[OT] RE: Know of any good custom tag tutorials for struts 2?

2007-09-13 Thread Wesley Wannemacher
On 9/13/07, Wesley Wannemacher [EMAIL PROTECTED] wrote: I like to think the ones I wrote are good :) http://www.wantii.com/wordpress/?cat=3 Wesley, I don't see anything up there on writing Custom Tags, which was the original caller's question. Did I miss them? (*Chris*) You're

RE: Iterate Hashmap with s:iterate

2007-09-12 Thread Wesley Wannemacher
If I remember correctly, to use the s:iterator tag, you have to use an object that has an 'iterator()' method. HashMap does not implement java.util.List... To iterate over a Hashmap, get the keyset [tempMap.ketSet()] from it. The keyset is a List and you can get an iterator from there. -Wes

RE: Struts url problem

2007-09-06 Thread Wesley Wannemacher
This may work - s:url id=url value=${mypath} s:param name=solutions:property value=solution//s:param ... (other params) /s:url -Original Message- From: TonyD [mailto:[EMAIL PROTECTED] Sent: Thursday, September 06, 2007 8:57 AM To: user@struts.apache.org Subject: Struts url

RE: iterator tag

2007-08-10 Thread Wesley Wannemacher
First off, do you have a 'public List getFiles()' in your action? The iterator tag looks for a getter that returns an object implementing java.util.List. For troubleshooting, I would put something static in your iterator tag just to see if the loop even starts (of course, sans getFiles(), you

RE: [S2] Design Advice Needed

2007-08-02 Thread Wesley Wannemacher
Having used FOP briefly, I would add only one thing. It is generally considered a good practice to generate traditional XML first, then transform your data to XSLFO using a transform (pardon me if I am getting the terms wrong). Basically, create your XML data, then have an XSL file that transforms

RE: Struts tags help

2007-07-30 Thread Wesley Wannemacher
Try - s:property value=#session.user.username / -Wes -Original Message- From: Diego Ezquerro [mailto:[EMAIL PROTECTED] Sent: Monday, July 30, 2007 11:30 AM To: struts Subject: Struts tags help Hi to everybody. I'm developing a web app using struts and wanna know if there is a way to

RE: Unable to get started with Struts2

2007-07-25 Thread Wesley Wannemacher
There appears to be a few things that may be causing your problem - First off, is your class not qualified with a package, or maybe you're using the spring-plugin? If not, in your action configuration, it seems like the action is configured incorrectly - action name=Test class=Test Maybe

RE: Don't expose .action to user?

2007-07-20 Thread Wesley Wannemacher
The only problem is that recent versions of Tomcat don't seem to support *.action to be directory index. I think it has come up on this list before, but unless there is a file named main.action, Tomcat will throw a 404 before allowing Struts to handle it. -Wes -- Discussion of Struts 2.x

RE: slowing down action execution time [Friday]

2007-07-17 Thread Wesley Wannemacher
I've found the most effective way to slow down the execution time is ask an intern to optimize it... /zing -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 17, 2007 10:38 AM To: Struts Users Mailing List Subject: Re: slowing down action execution

RE: Action names unique across packages? Why?

2007-07-09 Thread Wesley Wannemacher
Maybe I am reading your question wrong, but I can't see why you would want to do that... Struts2 will have to pick one or the other. Perhaps maybe you are looking for the namespace attribute? http://struts.apache.org/2.x/docs/namespace-configuration.html -Wes -- Discussion of Struts2, Spring,

RE: Excellent Struts 2 Tutorial

2007-07-03 Thread Wesley Wannemacher
It's funny that you mention this, I just finished a set of articles on Struts2. I would appreciate feedback if you don't mind reading it... Hopefully I can help out some newbs. http://www.wantii.com/wordpress/?cat=3 -Wes -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: Excellent Struts 2 Tutorial

2007-07-03 Thread Wesley Wannemacher
/tutorials.html musachy On 7/3/07, Wesley Wannemacher [EMAIL PROTECTED] wrote: It's funny that you mention this, I just finished a set of articles on Struts2. I would appreciate feedback if you don't mind reading it... Hopefully I can help out some newbs. http://www.wantii.com/wordpress

RE: Struts 2 Login example using a session

2007-06-27 Thread Wesley Wannemacher
Hello Session, See replies in context below - -Original Message- From: Session Mwamufiya [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 11:58 PM To: 'Struts Users Mailing List' Subject: Struts 2 Login example using a session Hi, I tried to follow the simple login

RE: [S2] login action w/FORM authentication?

2007-06-27 Thread Wesley Wannemacher
-Original Message- From: Jon Wilmoth [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 8:24 PM To: Struts Users Mailing List Subject: Re: [S2] login action w/FORM authentication? [snip] This is a major bummer to say the least. I'm not sure if the tomcat implementation of

RE: Struts 2 and using frames

2007-06-25 Thread Wesley Wannemacher
I'm going to guess that your web-app is not called '/pages' and that URL is relative to your context root. Here is how this page should probably look - %@ taglib prefix=s uri=/struts-tags % html head titleZen Server Main View/title /head frameset cols=200,* frame src=s:url

RE: [S2] Problem with ! notation

2007-05-21 Thread Wesley Wannemacher
Yes, Tiger is the webapp. My struts.xml contains action name=StartOrder class=com.mysite.ecommerce.actions.StartOrderAction method=input result/startOrder.jsp/result /action My struts.properties is located in WEB_INF/classes along with the struts.xml file and contains

RE: How to change the Context Root of a webapplication

2007-04-20 Thread Wesley Wannemacher
IIRC, if you rename your web-app to ROOT then the container will treat it special. I've used this in Tomcat, but I fiddled around with it before I got into Struts. I can't say for sure, but I would assume that if your web-app is called ROOT then Struts would treat it special as well. Since those

[s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

2007-04-06 Thread Wesley Wannemacher
Hello, I'm feeling a bit lazy right now and was wondering if anyone here has an example that can help me out. If you are using Eclipse WebTools (Callisto) and you have an ant build file that takes your dynamic web project and creates a deployable war file (and if it runs unit tests and deploys

RE: [s2] [Friday] [OT] [BBQ] ant build file eclipse webtools

2007-04-06 Thread Wesley Wannemacher
://moskito.dev.java.net/source/browse/*checkout*/moskito/ moskito-demo/build.xml not the best probably but it works. leon On 4/6/07, Wesley Wannemacher [EMAIL PROTECTED] wrote: Hello, I'm feeling a bit lazy right now and was wondering if anyone here has an example that can help me out

RE: ldap access

2007-03-20 Thread Wesley Wannemacher
--- Philippe Le Gal [EMAIL PROTECTED] wrote: I'm looking for an example for implementing a LDAP user authentification inside a struts application. I think I've to test java.naming.ldap classes. Am i right ? Oh, gotcha. IIRC it's javax.naming.ldap but anything I know about it is

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

2007-02-22 Thread Wesley Wannemacher
I looked for something similar a while back and didn't find anything simple. There are servlet context listeners (but that isn't really struts-2-ish). What I did (and I know it's inelegant) is to create a static initializer block. One main difference to remember between servlets and actions is

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

2007-02-22 Thread Wesley Wannemacher
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Germuska Sent: Thursday, February 22, 2007 11:58 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [S2] Equivalent of Servlet init() method? On 2/22/07, Wesley Wannemacher [EMAIL

RE: Ajax - obtaining a method result

2007-02-13 Thread Wesley Wannemacher
Struts 1 or Struts 2? Assuming Struts 2, I'll answer as best as I can. You'll have to code an action around calling this 'method.' For instance, say the method you want to call is in a class called Foo and the method is called bar(). If the result of bar() is a String and this result is what

RE: Ajax - obtaining a method result

2007-02-13 Thread Wesley Wannemacher
(newResult); } public getResult() { return result; } public setResult(String newResult) { this.result = newResult; } } -Original Message- From: Wesley Wannemacher [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13

RE: [S2] s:text issue

2007-02-02 Thread Wesley Wannemacher
I could be wrong, but you may be misunderstanding the poster's intent. He has a variable on the value stack that indicates which property key he wants to retrieve. If my understanding is correct, then I would not really be any help, but has the OP tried: s:text name=%{myKey} / ? P.S. I have a

RE: [s2] Actions in different Namespaces

2007-01-26 Thread Wesley Wannemacher
If you are looking for general configuration tips on mapping results check this - http://struts.apache.org/2.x/docs/result-types.html I found this particular snippet here - http://struts.apache.org/2.x/docs/redirect-action-result.html -Wes -Original Message- From: Elie Ciment

[s2] String comparison with OGNL

2007-01-23 Thread Wesley Wannemacher
Hello, This seems like a n00bie problem, but I can't seem to figure it out. I have a parameter that I want to read, when I have the following: s:property value=#parameters.addrType/ The output is `billing` However, I want to test it to see if it is indeed `billing` later in the code... I've

RE: [s2] String comparison with OGNL

2007-01-23 Thread Wesley Wannemacher
- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 1:36 PM To: Struts Users Mailing List Subject: RE: [s2] String comparison with OGNL From: Wesley Wannemacher [mailto:[EMAIL PROTECTED] s:property value=#parameters.addrType == 'billing'/ Does wrapping

RE: [s2] String comparison with OGNL

2007-01-23 Thread Wesley Wannemacher
When I read your message, it occurred to me that OGNL couldn't know what type `addrType' was because my Action is only a stub. #parameters is a magical variable containing all of the request parameters, so I hadn't thought of making getters/setters on my Action before. So, I added a

RE: [s2] String comparison with OGNL -- Learning OGNL by stabbing in the dark.

2007-01-23 Thread Wesley Wannemacher
='%{#parameters.addrType == billing}'/ Alexandre Lima - Original Message - From: Wesley Wannemacher [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, January 23, 2007 3:44 PM Subject: RE: [s2] String comparison with OGNL Nope, same result... Here is the code

RE: Struts, JasperReports and AWT in headless mode

2007-01-12 Thread Wesley Wannemacher
There is generally a 'Virtual Framebuffer' available in both Linux and Solaris IIRC. http://www.die.net/doc/linux/man/man1/xvfb.1.html This may help, my situation was running a build task that required AWT, so I am not familiar with Jasper, but it sounds like the same issue (AWT needs an

[FRIDAY] DBCP configuration

2007-01-05 Thread Wesley Wannemacher
Hello, I have a Lazy Friday question for everyone... When configuring the database connections, where do you tend to put them? In my situation, I usually configure the connection pool in the web-app context and find them with JNDI. However, I am moving to iBATIS for my most recent project and

RE: [FRIDAY] DBCP configuration

2007-01-05 Thread Wesley Wannemacher
-Original Message- From: Gareth Evans [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 11:39 AM To: Struts Users Mailing List Subject: Re: [FRIDAY] DBCP configuration Hi, I had a very similar problem using hibernate and a jndi datasource, the way I got around this for

RE: [FRIDAY] DBCP configuration

2007-01-05 Thread Wesley Wannemacher
There's one additional advantage to using JNDI for this ... in many shops you have two or even three environments to worry about (development, staging, production), each with its own database instance. Having the database configuration for each instance in its own server means you

[s2] implement Parameterizable versus ServletContextListener versus another solution

2006-12-27 Thread Wesley Wannemacher
Hello, Seeking some advice... I am hoping to create a standard method for passing configuration snippets to Actions. For instance, let's say I have a method that among other things, sends an email message. I don't want to hard-code which email server I am planning on using, so how do I tell the

index.action problem

2006-12-22 Thread Wesley Wannemacher
Hello, I have a small problem and was wondering if anyone else has come across it. In Tomcat 5.5 (and possibly other versions), tomcat will check for the existence of a file and if it doesn't exist send out a 404 before it can be handled by struts when it comes to welcome-files... For instance,

RE: OFF RECORD

2006-12-21 Thread Wesley Wannemacher
Have you looked at Tomcat's Jasper compiler? http://www.docjar.com/docs/api/org/apache/jasper/compiler/Compiler.html I would assume that with the jars in place and some coding to setup the context, it could be pretty easy to do as you wish. -Wes -Original Message- From: Juan

RE: S2 with eclipse/WTP

2006-12-15 Thread Wesley Wannemacher
I did things the easy way and just imported struts2-blank-2.0.1.war as a dynamic web project. This has worked fine in wtp-all-in-one-sdk-R-1.5.1-200609230508-win32.zip. -Wes -Original Message- From: Rick Schumeyer [mailto:[EMAIL PROTECTED] Sent: Friday, December 15, 2006 1:32 PM

RE: The first request

2006-12-05 Thread Wesley Wannemacher
Could it be done in a regular Custom Tag? -Original Message- From: Thom Burnett [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 05, 2006 2:59 PM To: Struts Users Mailing List Subject: The first request I need to set up my first page with a sequence of database interactions

RE: Cannot create JDBC driver of class '' for connect URL 'null'

2006-12-04 Thread Wesley Wannemacher
Could you also copy/paste the code that attempts to construct the database connection? I've found that it is a bit tricky to pull a connection out of the JNDI context. It appears that the datasource is configured correctly, so my thought is that the problem may be in the Java code. -Wes [SNIP]

RE: html:link newbie problem

2006-11-21 Thread Wesley Wannemacher
Instead of html:link ... /.../html:link Try: html:link ../html:link Notice the lack of slash in the example. Basically, you are closing the html:link tag before you intend to close it. -Wes -Original Message- From: priya [mailto:[EMAIL PROTECTED] Sent: Monday, November 20,

RE: [Struts 2] execute() method not firing in Action

2006-11-09 Thread Wesley Wannemacher
Hello, [Ted Husted wrote:] Valiation isn't passing. That's why input is being returned, and why the Action class is never invoked. If the messages are not displaying, the most likely cause is that a property is being validated that is not present on the page (so there is no where to display

RE: Input and results on the same JSP

2006-11-09 Thread Wesley Wannemacher
I've done this sort of AJAX-y in the past... You have 2 DIVs one that contains the form you want, then another DIV that contains the data table. Then you create a Javascript global variable that acts as a switch to indicate which div should be visible. Then, instead of having your form post

[Struts 2] execute() method not firing in Action

2006-11-07 Thread Wesley Wannemacher
Hello, I've been racking my brain for a bit and hoping that someone will point out my (probably obvious) mistake. [background] This is my first Struts project. I downloaded the Struts 2.0.1 build and started with struts-blank. I am basing my first action on the bootstrap example. I have an

RE: [Struts 2] execute() method not firing in Action

2006-11-07 Thread Wesley Wannemacher
up . 2006/11/7, Mark Menard [EMAIL PROTECTED]: On 11/7/06 9:07 AM, Wesley Wannemacher [EMAIL PROTECTED] wrote: [question] Below, I have copy/pasted the Source for the Action as well as my struts.xml file (actually another file that is included from the struts.xml file

RE: Struts2 set data to session

2006-10-30 Thread Wesley Wannemacher
In struts2, you have to have your action implement the 'SessionAware' interface. This interface means implementing one method (void setSession( java.util.Map session)). This will/should give you access to the true session object. There is also 'RequestAware,' but you should note that unit

RE: why hardcode the path of web.xml?

2006-10-18 Thread Wesley Wannemacher
A quick search of the servlet spec doesn't mention web.xml as being configurable. In fact, page 70 suggests that the contents of 'WEB-INF/' should include it. If you choose not to call it 'web.xml' and place it in 'WEB-INF/' that's really your choice, but I wouldn't expect portability. -Wes

OT (but only slightly) mailreader struts2 tutorial

2006-10-17 Thread Wesley Wannemacher
Hello, I would like to go through the mailreader tutorial for Struts 2.0, but it appears that the link on the Wiki page is broken. http://planetstruts.org/struts2-mailreader/Tour.do only takes me to a 404. Does anyone know where I can find this tutorial? -Wes -- Wes Wannemacher Director of

RE: FRIDAY #1 JavaBeans/Model

2006-10-09 Thread Wesley Wannemacher
-Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Saturday, October 07, 2006 10:19 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: FRIDAY #1 JavaBeans/Model Good Morning Martin- I would say you're definitely on the right track and would

FRIDAY #1 JavaBeans/Model

2006-10-06 Thread Wesley Wannemacher
Hello, I'm exercising the 'Casual Friday' rule here to ask some general questions. I apologize in advance if I break any list etiquette, but I subscribed on Monday and have been waiting patiently for Friday so that I can get these questions off my chest. Thanks! I've been working on Java/JSP for

FRIDAY #2 non-MVC pages

2006-10-06 Thread Wesley Wannemacher
Hello, This is my next question... When building a struts application, is it a good idea to base everything on actions? For instance, let's say I'm writing an 'About Us' page or 'Terms Of Service'... Should I build an action to handle them, or just write the JSP. My assumption is that it would

RE: FRIDAY #1 JavaBeans/Model

2006-10-06 Thread Wesley Wannemacher
Hello, I am not really a Java Guru, but have made the experience that in effect the name Bean is - in the context of Struts-based Webapps - really nothing more than a POJO following the naming conventions of JavaBeans for getters/setters. Awesome, thanks! I figured as much, but I

FRIDAY #3 Struts 2.0 or Struts 1.x ?

2006-10-06 Thread Wesley Wannemacher
Last question (until next week) is probably pretty obvious from the subject. I figure if I am going to build from scratch, I should consider Struts 2.0. The disadvantage though seems to be that the book I bought doesn't seem to deal with 2.0. Will this be a problem? Or, is most of the code close

RE: FRIDAY #1 JavaBeans/Model

2006-10-06 Thread Wesley Wannemacher
Hello, First, I am going to design a database, then build a bunch of beans that more or less represent the data in the database by going mostly one bean for each table. There will likely be a few cases where one bean will represent two tables (1:n relationship, where the