Re: automatic periodic execution of code

2005-02-15 Thread Andrew Hill
I think Quartz has been the general consensus most times this has been debated on the list. Sng Wee Jim wrote: Hi, What would be the recommended way to execute some code periodically on tomcat/appserver? Should I 1. start a thread (not recommended in appserver and tomcat?) and do it in the ru

url rewriting problem

2005-02-15 Thread Brian Moseley
(i don't think this made it through the first time i sent it, so i'm trying again. apologies if you get this twice.) i'm getting some weird problems with url rewriting in a struts 1.2.4 webapp. specifically, the urls generated by the form, link, and rewrite tags have an extra "/" prepended to the

automatic periodic execution of code

2005-02-15 Thread Sng Wee Jim
Hi, What would be the recommended way to execute some code periodically on tomcat/appserver? Should I 1. start a thread (not recommended in appserver and tomcat?) and do it in the run method 2. use third party tool like Quartz 3. or is there existing struts plugin to do it?

Re: javascript validation in struts

2005-02-15 Thread Kumar deepak
Hi, Please visit http://www.roseindia.net/struts/struts_validator_framework.shtml Regards Deepak kumar Jonathan M Z <[EMAIL PROTECTED]> wrote: Hi folks, I am trying to understand struts validation from some example code, it has something like this: action="signin" method="post"> validateSign

RE: Constants for property names - am I barking up an insignificant tree?

2005-02-15 Thread Daffin, Miles (Company IT)
Am I alone in finding this issue significant, or was it my tone 8-) Anyone got anything to add? Anything at all? TIA -Miles > -Original Message- > From: Daffin, Miles (Company IT) > Sent: 11 February 2005 17:29 > To: Struts Users Mailing List > Subject: RE: Constants for property nam

Re: javascript validation in struts

2005-02-15 Thread Carlos Cajina
Hi Jonathan. A quick "dissection" of the code you posted might clarify some of your doubts.. onsubmit="return validateSigninForm(this)" * This piece of code calls a dynamically generated JavaScript function that's created when the page is rendered (for this to happen you have to include withi

RE: issue

2005-02-15 Thread Fogleson, Allen
Wrap it in a tag -Original Message- From: Eric Lemle [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 6:13 PM To: user@struts.apache.org Subject: Fwd: issue Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City,

Fwd: issue

2005-02-15 Thread Eric Lemle
Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] >>> Eric Lemle 2/15/2005 5:10:00 PM >>> STRUTS project. OK I have some normal text tha

javascript validation in struts

2005-02-15 Thread Jonathan M Z
Hi folks, I am trying to understand struts validation from some example code, it has something like this: validateSigninForm is a javascript validation. I looked up in validation.xml and validator-rules, neither this javascript function nor anything contain the word "signin" is to be found, so

Re: form bean exception -RESOLVED

2005-02-15 Thread Jonathan M Z
I made a mistake in the Action mapping. thank you all --- Saul Qunming Yuan <[EMAIL PROTECTED]> wrote: > Do you have the action mapping defined for logon.do > in your struts-config > file? what's it like? > > > BTW, just a friendly reminder, you probably don't > want to use that email > id in

Re: formbean with List field

2005-02-15 Thread Wendy Smoak
From: "Hamster" <[EMAIL PROTECTED]> > I'm wondering if I can have a formbean containing a List of Strings. Is > that recognized by Struts correctly? I have had more luck with String[] than ArrayList. > I need that for a shopping cart implementation, where the user can > modify the amount of the

Re: AW: formbean with List field

2005-02-15 Thread Eric Lemle
In the jsp you can iterate your list and give unique identifier to each one maybe via the index. In the form bean you would have each of the unique names available. May want to use the LazyDynaBean. -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street,

Re: bean:include

2005-02-15 Thread Eric Lemle
Well, what I need is the results of complete actions, the final HTML and I want to include a few of those in a report page. So tiles is not really the solution because you only get one action again. -Eric Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street,

AW: formbean with List field

2005-02-15 Thread Hamster
Hello struts users! I still have this issue... can anyone help me with this? -- I'm wondering if I can have a formbean containing a List of Strings. Is that recognized by Struts correctly? I need that for a shopping cart implementation, where the user can modify the amount of the articles in

RE: Proper n tiered exception handling -- RESOLVED -- I think.

2005-02-15 Thread Brian McGovern
Many thanks to everyone who responded, all very helpfull. The approach I've taken looks like this. I still think I've got an issue with nested exceptions. But this is a good start. Data Conn Class Snippet --- try{ //make the conn here }catch(NamingExce

RE: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses

2005-02-15 Thread Manuchehar Khan
Thanks it works now . We are using 2.3. -Original Message- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 3:58 PM To: Manuchehar Khan Cc: Struts Users Mailing List Subject: Re: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has

Re: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses

2005-02-15 Thread Craig McClanahan
On Tue, 15 Feb 2005 15:53:15 -0500, Manuchehar Khan <[EMAIL PROTECTED]> wrote: > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> This is the problem ... the element was added in Servlet 2.3, so you need to use the 2.3 version of the DTD: http://java.sun.com/dtd/web-app_2_3.dtd";

RE: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses

2005-02-15 Thread Manuchehar Khan
I am using HttpSessionListener and works fine. But problem is when I compile my project I have to remove it from web.xml as compilation fails. I am using JDeveloper . This is first entry in my web.xml file. http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> OLDCSessionListener

Re: form bean exception

2005-02-15 Thread Wendy Smoak
From: "Jonathan M Z" <[EMAIL PROTECTED]> > I have a simple form in struts: > > > > I get an exception when the jsp page is rendered > [Servlet Error]-[/Login.jsp]: > javax.servlet.jsp.JspException: Cannot retrieve > definition for form bean null > what's wrong? Try it without the ".do": If

Re: form bean exception

2005-02-15 Thread Saul Qunming Yuan
Do you have the action mapping defined for logon.do in your struts-config file? what's it like? BTW, just a friendly reminder, you probably don't want to use that email id in this list, the audience are global. I happen to catch it and know what it means :-( thanks, Saul > hi folks, > I have

RE: Construting HTML Email from Struts

2005-02-15 Thread Nils Liebelt
Ok got it! >> do you mean creating custom tags? That's what I meant. I mean you don't need recursive degression in order parse a file like this. ;-) GreetZ Nils -Original Message- From: Todd Nine [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 4:26 PM To: Struts Users Mail

RE: Construting HTML Email from Struts

2005-02-15 Thread Nils Liebelt
Ok got it! >> do you mean creating custom tags? That's what I meant. I mean you don't need recursive degression in order parse a file like this. ;-) GreetZ Nils -Original Message- From: Todd Nine [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 4:26 PM To: Struts Users Mail

RE: Proper n tiered exception handling

2005-02-15 Thread Brian McGovern
This worked for me for the most part. I now have a global exception and am able to get the last trace within your comment tags. But in my data class I'm closing my db connections and result sets in try catch blocks, so in this case, the user would see the global error page in the following cas

Re: Name of JSP in Request

2005-02-15 Thread Craig McClanahan
On Tue, 15 Feb 2005 14:53:40 -0500, Matt Hughes <[EMAIL PROTECTED]> wrote: > When I am inside a JSP page, is there any way to access the forward path > in the action mapping: > > type="com.xyz.actions.admin.COLDCacheAction" > scope="request"> >

form bean exception

2005-02-15 Thread Jonathan M Z
hi folks, I have a simple form in struts: I get an exception when the jsp page is rendered [Servlet Error]-[/Login.jsp]: javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null what's wrong? thanks __ Do you Yahoo!? The a

Name of JSP in Request

2005-02-15 Thread Matt Hughes
When I am inside a JSP page, is there any way to access the forward path in the action mapping: In other words, does Struts, when it forwards control to the JSP page, put a variable in the request scope like request.setAttribute("path","/pages/admin/COLDCache.jsp");

Re: Caching Appliction Level Data?

2005-02-15 Thread Craig McClanahan
Caching or not is also a decision that you sometimes want to change after you see your application used in anger for a while. I like to provide a getter method on some application scoped bean that returns things like this, so I can change my decision to implement caching (or not), for any given se

Re: bean:include

2005-02-15 Thread Wendy Smoak
From: "wo shi ni baba" <[EMAIL PROTECTED]> > so essentially there's no replacement of jsp:include > in struts, right? I suppose you could use Tiles to do the same thing as a jsp:include, but if all you need is a simple include, Tiles is overkill. -- Wendy Smoak ---

Re: Caching Appliction Level Data?

2005-02-15 Thread Soaring Eagle
Without contesting the good points. I would say memory is cheap. For an application i worked on, we had about 6 different applications sitting on two 4 by 16 machines. The -xmx arguments of all apps put together came up to about 10 gigs RAM and the rest was left open. i dont think serious applicati

Re: Construting HTML Email from Struts

2005-02-15 Thread Niall Pemberton
Its just the name of the scripting variable that you use in the where the body of whats enclosed in the will be written to (in this case the genrated email). Niall - Original Message - From: "Shey Rab Pawo" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, February 15

Problem validating form

2005-02-15 Thread Mike Miller
I am fairly new to Struts and using the 1.1 version. I have a form bean that didn't have a validate method and just tried adding it (validate()) and now getting errors which I guess I kind-of understand but need to know how people generally work around this issue. The page has fields for title

Re: Antwort: Re: Antwort: bean:include

2005-02-15 Thread wo shi ni baba
Hi thanks, so essentially there's no replacement of jsp:include in struts, right? --- Karsten Krieg <[EMAIL PROTECTED]> wrote: > > Hi! > > Nothing special here. Let's say you've an struts > action like this: > > name="variableForm" > path="/editVariable" >

Re: Problems with Tomcat 4.1.30 (Linux)

2005-02-15 Thread Jeff Beal
What does the generated HTML source look like? Frank Schaare wrote: Sorry, i wrote that example right out of your mind. is nested inside the that is not my problem. Jeff Beal schrieb: The renders an HTML element. The renders a single element The renders several elements. should not contain

Re: Problems with Tomcat 4.1.30 (Linux)

2005-02-15 Thread Frank Schaare
Sorry, i wrote that example right out of your mind. is nested inside the that is not my problem. Jeff Beal schrieb: The renders an HTML element. The renders a single element The renders several elements. should not contain , both should be included inside of an tag: ... -- Jeff Fra

RE: Proper n tiered exception handling

2005-02-15 Thread Mark Bennett
I think you are missing out on some usefull features by using this. You can't use the ActionMapping Parameter property to distinguish operations and you will have to reimplement a solution if you use DispatchAction. I think there are benefits to declaritive exception handling, flexibility. Mar

Re: Problems with Tomcat 4.1.30 (Linux)

2005-02-15 Thread Jeff Beal
The renders an HTML element. The renders a single element The renders several elements. should not contain , both should be included inside of an tag: ... -- Jeff Frank Schaare wrote: please select ... Now, i deployed my app in Tomcat 4.1.30 (Linux) and all my selects are us

AW: Proper n tiered exception handling

2005-02-15 Thread Ole Hildebrandt
Hi. My personal opinion is, that the Struts Exception handling doesn't bring any benefits. I use an approch based on inheritance and the "Template Method"-Pattern from the GoF: I create an abstract Class extended from "Action". All application-Specific Actions extend that class. The Abstract Ac

Problems with Tomcat 4.1.30 (Linux)

2005-02-15 Thread Frank Schaare
Hi, IÂve developed my Struts application with Tomcat 4.1.30 (Windows). Everything works fine, i tested my stuff withe different browsers, different Eclipseversions etc. There is a fomularBean whitch holds some prefetched data in key-value maps, some as a vector, some as RowSetDynaBeans, some as

RE: Design pattern for struts.

2005-02-15 Thread Barnett, Brian W.
Struts itself is an example of the Service to Worker Pattern, which is a macro pattern using a combination of a controller and dispatcher with views and helpers. -Original Message- From: Sandip Khetle [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:25 AM To: user@struts.apac

RE: Proper n tiered exception handling

2005-02-15 Thread jgkennedy
I'm sure your right Dan. That code is pretty old now and I would do it differently today. But at the time given my understanding, this is what I came up with. Actually couldn't tell you why I did it that way :) The thing to focus on here in the example is the use of HTML comments to "embed"

RE: Proper n tiered exception handling

2005-02-15 Thread Daniel Lipofsky
Why do you do all that work to print the stack trace? Shouldn't exception.printStackTrace(out) do what you want? This also follows the exception.getCause() chain and prints out nested exceptions. As a side note, if you really want to log all nested exceptions then you have to do a little extra wor

RE: html-el oddities

2005-02-15 Thread Woodchuck
that is odd. make sure your tag definition is pointing to the EL tld, you may have updated the tag handle but not the tld reference? --- Trevor Hill <[EMAIL PROTECTED]> wrote: > Thanks -- your option (2) seems to be working fairly well for me now. > I still have to see if struts will accept th

Re: Proper n tiered exception handling

2005-02-15 Thread Antony Joseph
Different applications have different requirements. Take a look at the exception handling in the workeffort application download http://www.logicden.com to get an idea. The files you may want to look at are: ApplicationExceptionHandler.java, files in package com.logicden.workeffort.service.exc

RE: Proper n tiered exception handling

2005-02-15 Thread jgkennedy
I probably have not shown you enough in terms of setup. There is more to configure this completely. I will try to outline this shortly. To answer your question , I don't rethrow anything. It's not necessary. Your struts actions have the following signature: public ActionForward exe

RE: Construting HTML Email from Struts

2005-02-15 Thread McCormack, Chris
http://article.gmane.org/gmane.comp.jakarta.taglibs.user/6038 I helped someone a while back with a similar requirement. Hope its useful. Chris McCormack -Original Message- From: Todd Nine [mailto:[EMAIL PROTECTED] Sent: 15 February 2005 12:50 To: Struts Users Mailing List Subject: Constr

RE: Proper n tiered exception handling

2005-02-15 Thread Brian McGovern
Jim, So in this approach you really dont use any try catch blocks at all? or you just re - throw the original exception that you caught? How do you grab the error on the JSP page? Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 20

Re: Proper n tiered exception handling

2005-02-15 Thread jgkennedy
I use declaritive exception handling which is built into Struts. Works great for me. I really don't use custom exceptions that much any more because it's harder to track the original error. Also, I don't clutter my code with alot of try/catch blocks unless it's absolutely necessary. I allow

RE: html-el oddities

2005-02-15 Thread Trevor Hill
Thanks -- your option (2) seems to be working fairly well for me now. I still have to see if struts will accept the faked up input tag and stick the data into the form bean, but I don't see any reason why that shouldn't work. I wonder why (1) wouldn't work for me though -- it gave me the same r

Re: Caching Appliction Level Data?

2005-02-15 Thread Bill Schneider
>> how do you manage cross container caches if you are clustered - when >> you are using static members on classes? How do guarantee sameness on >> different physical machines? We do have a few caches in our >> application and are facing issues due to this design or an improperly >> implemented ver

Validator, Indexed Properties and error messages.

2005-02-15 Thread Cruz, Edward J.
Hello all, In review various documentation and several google search's I have found how to use the validator framework to validate indexed properties. In looking at the javadocs for the validator framework I see that the field class has an attribute called 'property' which (I think) tell

Re: html-el oddities

2005-02-15 Thread Wendy Smoak
From: "Trevor Hill" <[EMAIL PROTECTED]> > I'm limited to using 1.1 only, but cannot find any old 1.1 documentation to work from. There should be a 'struts-documentation.war' contained in the 1.1 distribution. That will have docs that match what's in 1.1, as opposed to the more current ones on the

RE: html-el oddities

2005-02-15 Thread Woodchuck
i can think of 2 things you can try: 1) use instead of i have found that jstl-scoped objects do not always work well with struts tags 2) simply don't use the tag you can achieve the same result with: hth, woodchuck --- Trevor Hill <[EMAIL PROTECTED]> wrote: > To try and attack this

Re: Construting HTML Email from Struts

2005-02-15 Thread Shey Rab Pawo
Niall, What is the origin of the "emailStuff" in this wiki page? Thanks. On Tue, 15 Feb 2005 14:25:29 -, Niall Pemberton <[EMAIL PROTECTED]> wrote: > I posted this for someone who asked a similar quesiton recently. > > http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html > > Niall --

Proper n tiered exception handling

2005-02-15 Thread Brian McGovern
I'm looking to get a handle on best exception handling practices in my app. Kinda beginner question i guess, sorry. Im catching the various sql and naming exceptions in the data classes and logging and throwing a custom exception called ApplicationException which is blank and provided below.

RE: html-el oddities

2005-02-15 Thread Trevor Hill
To try and attack this question from another angle, is there any reason that this wouldn't work (or would work differently) in Struts(-el) 1.1 as opposed to 1.2.x? I'm limited to using 1.1 only, but cannot find any old 1.1 documentation to work from. Thanks, --Trevor -Original Message---

Re: Construting HTML Email from Struts

2005-02-15 Thread Joe Germuska
At 7:50 AM -0500 2/15/05, Todd Nine wrote: Hi all, Does anyone know of a way to construct an HTML formatted email using a struts jsp and a DynaForm? I want our visual designers to be able to updload an email "template", which is just a Struts jsp with the dynabean properties. We would then upl

Re: Construting HTML Email from Struts

2005-02-15 Thread Todd Nine
Nils, When you say special tags, do you mean creating custom tags? The reason I want to have this dynamic environment is so that we can upload content without the need to deploy another ear. This way when the business people change the content of the email, we can easily upload a new format a

Re: Construting HTML Email from Struts

2005-02-15 Thread Niall Pemberton
I posted this for someone who asked a similar quesiton recently. http://www.niallp.pwp.blueyonder.co.uk/emailTemplate.html Niall - Original Message - From: "Todd Nine" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, February 15, 2005 12:50 PM Subject: Construting HTM

RE: Construting HTML Email from Struts

2005-02-15 Thread Nils Liebelt
Sounds a bit complicated! Why do you need to have struts tags? I would go for plain html and add special tags for whatever you need. Path of least resistence... GreetZ Nils -Original Message- From: Todd Nine [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 2:50 PM To: Stru

RE: Construting HTML Email from Struts

2005-02-15 Thread Nils Liebelt
Sounds a bit complicated! Why do you need to have struts tags? I would go for plain html and add special tags for whatever you need. Path of least resistence... GreetZ Nils -Original Message- From: Todd Nine [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 2:50 PM To: Stru

Construting HTML Email from Struts

2005-02-15 Thread Todd Nine
Hi all, Does anyone know of a way to construct an HTML formatted email using a struts jsp and a DynaForm? I want our visual designers to be able to updload an email "template", which is just a Struts jsp with the dynabean properties. We would then upload a mapping (something like hql in nature

RE: How to pass variable from servlet to jsp?

2005-02-15 Thread jj endenburg
I suppose that 'crazy'/'bad' refers to the classical jsp-way of working, without using the struts-framework. When using struts, I would advise to use forms (a subject that I am starting to tackle right now as well...) Jan-Jaap --- "Daffin, Miles (Company IT)" <[EMAIL PROTECTED]> wrote: > Why is t

RE: How to pass variable from servlet to jsp?

2005-02-15 Thread Daffin, Miles (Company IT)
Why is that 'crazy' or 'bad'? Please elaborate. > -Original Message- > From: Larry Meadors [mailto:[EMAIL PROTECTED] > Sent: 11 February 2005 16:43 > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: Re: How to pass variable from servlet to jsp? > > No offense, but that is *cr

Antwort: Re: Antwort: bean:include

2005-02-15 Thread Karsten Krieg
Hi! Nothing special here. Let's say you've an struts action like this: The referenced variable.jsp itself has a java scriptlet like this: <% String typePage = "/variable/detail_" + container.getType() + ".jsp"; %> In my html-table o

Re: MESSAGES_KEY not found in request

2005-02-15 Thread René Thol
I finally found them. After going through some struts sources. The messages are stored under: session.getServletContext().getAttribute(Action.MESSAGES_KEY) I was mislead by some examples in the web where you are told to fetch them via: request.getAttribute(Action.MESSAGES_KEY); Best regards René

Re: Antwort: bean:include

2005-02-15 Thread wo shi ni baba
hi, thanks, but would you tell me how to do it in struts? --- Karsten Krieg <[EMAIL PROTECTED]> wrote: > > Hi! > > Why not just use jsp:include. There's nothing wrong > with it. You can even > use a request attribute for setting the jsp page. > > > > Regards > Karsten Krieg > intarsys consul

MESSAGES_KEY not found in request

2005-02-15 Thread René Thol
Hello again, since I'm stuck to struts1.0.2 and there's no way to disable filtering when using bean:message I'm trying to access MessageResources directly within my JSPs. But there is no entry regarding the Action.MESSAGES_KEY. Neither within the request nor within the session. I'm going throug

Antwort: bean:include

2005-02-15 Thread Karsten Krieg
Hi! Why not just use jsp:include. There's nothing wrong with it. You can even use a request attribute for setting the jsp page. Regards Karsten Krieg intarsys consulting GmbH Fon +49 (0)721 3 84 79 - 28 Fax +49 (0)721 3 84 79 - 60 e-mail [EMAIL PROTECTE