Re: newbie problem

2005-01-26 Thread Robin Ericsson
Tim wrote: Rick, While you are at it, I suggest you may consider dynamic Forms, DynaActionForm, or Map backed forms, they give you ways to handle form's properties without even knowing the the property names at development time. Its worth trying. I was going for map backed forms as the contents o

test

2005-01-26 Thread Paul Sundling
disregard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Trying to understand Validate Date

2005-01-26 Thread j o s h !
Hi I am new to struts and got 2 questions 1/ I am trying to understand if the behaviour I am getting from a date validation is right...when I put in an invalid date on my DynaValidatorForm, say 31/11/2000, I get an error (correctly) on the input field. Validation is working as it should. But I

Re: A table on a form from a List of Lists

2005-01-26 Thread Cédric Levieux
true is the good way ... On Tue, 25 Jan 2005 18:15:06 +0100, Olasoji Ajayi <[EMAIL PROTECTED]> wrote: > i thought the property attribute is required in the html:text tag. > - Original Message - > From: "Cedric Levieux" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > > Sent:

Re: A table on a form from a List of Lists

2005-01-26 Thread Olasoji Ajayi
but the object "myField" is a String and not a bean - Original Message - From: "Cédric Levieux" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, January 26, 2005 11:30 AM Subject: Re: A table on a form from a List of Lists true is the good way ... On Tue, 25 Jan 20

Re: PlugIn and the base URL

2005-01-26 Thread Larry Meadors
why does it have to be a plugin? On Tue, 25 Jan 2005 22:18:20 -0800 (PST), Martin Wegner <[EMAIL PROTECTED]> wrote: > > I am looking for the: > > http://blahblahblah.com:8080/AppName/ > > As Craig said I can get that if I have a Request object. But from a > PlugIn I don't have that. I ca

Re: setting beans from a form into a collection.

2005-01-26 Thread Todd Nine
Rick, I realized my error on the set/get for the indexed item. As a result, I changed my id to be id="billingList". Now BeanUtils fails because the collection is not initialized. The only work around I have been able to discover to resolve this is to determine the collection size from the req

RE: PlugIn and the base URL

2005-01-26 Thread David Suarez
Is your plug-in a 3rd party type component? What is the purpose of obtaining the URL? Maybe there's a suitable alternative depending on your requirements (ie. A Filter that would instantiate the objects you need to populate on the first request? A base action that lazy loads your config stuff?)

Re: [OT] a design question.. have a look at this class

2005-01-26 Thread Ashish Kulkarni
Hi My problem is that the class which will need this helper class does not know the values of param1 and param2, and so cannot create the Instance as if it is a java bean, these param1 and param2 values are only know by the initialization class. this is what i have come up with public class GetData

Re: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
I need to find the URL of my web app at start up. I need it as soon as possible in the boot process. So Listerners and Plug Ins are the only two ways I know of that allow me to hook into the startup of the app. Is there another mechanism available? --Marty --- Larry Meadors <[EMAIL PROTECTED

Re: setting beans from a form into a collection.

2005-01-26 Thread Rick Reumann
Todd Nine wrote the following on 1/26/2005 8:21 AM: Rick, I realized my error on the set/get for the indexed item. As a result, I changed my id to be id="billingList". Now BeanUtils fails because the collection is not initialized. The only work around I have been able to discover to resolve t

RE: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
David, My Struts app contains an Axis-based SOAP service. The Struts app initializes the call dispatcher for the SOAP service. This dispatcher needs to know the URL of itself. This is a requirement of the semantics of the SOAP service (outside of my control). So a Listener or a Plug In appear

RE: PlugIn and the base URL

2005-01-26 Thread fzlists
Just thinking out loud here, but... What if from your plug-in you spawn a thread that will: (1) Wait a few second, to allow the app to otherwise initialize completely (2) Make a request to a special Action that will do the rest of the initialization that requires the URL (should be able to do h

RE: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
Frank, Yeah, that was the one hack that came to mind yesterday. It would definitely work. If there is no alternative that is what I will have to do. But I am hoping that the Struts gurus have a better answer in their pocket. Thanks. --Marty --- [EMAIL PROTECTED] wrote: > Just thinking out

Re: PlugIn and the base URL

2005-01-26 Thread Niall Pemberton
Wouldn't the simplest thing be to just add a "url" property to the PlugIn that initializes your SOAP service? http://blahblahblah.com:8080/AppName/"/> Niall - Original Message - From: "Martin Wegner" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, January 26

how to integrate struts project with hibernate?

2005-01-26 Thread Metin Erksan
hi i try to integrate my struts project with hibernate.i m newbie about hibernate.i use jdeveloper10g. i googled but i found a few samples that use hibernate plugin for struts . is there any document or startup sample for struts-hibernate? at the beginning i searched for struts-spring comparison

redirectig to WORD files

2005-01-26 Thread [EMAIL PROTECTED]
Hi all I try to redirect my response to a word doc file.But after setting contexttype and using response.sendRedirect(docWordURL) , I get white page; What I want is open this word document on a click of a link in a normal jsp.I call the action that has to redirecting me to that file. Any idea?

Re: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
Niall, That would. Except it would require our customer to copy the WAR file to the webapps directory, start Tomcat, wait a bit, stop Tomcat, find the struts-config.xml file, edit it, save it and then start Tomcat again. Or I could put the URL is an external config file, outside of the WAR file,

Re: how to integrate struts project with hibernate?

2005-01-26 Thread Sebastian Hennebrueder
We have a basic tutorial showing a possible way of combining Struts and Hibernate. It could serve you as a starter, more advanced solutions will include a Cash Implementation. Regards Sebastian Hennebrueder http://www.laliluna.de Tutorials for JSP, JavaServer Faces, Struts, Hibernate and E

Flow Control, Is there a good way?

2005-01-26 Thread ckl
I am migrating to Struts from an existing webapp. One of the issues with the old architecture was managing the flow control logic. Currently we track in the session which flow and page the user is on. To enforce flow control each Servlet method must check the session to see if the flow and page are

Re: redirectig to WORD files

2005-01-26 Thread Will Stranathan
Could you show us the relevant parts of your config? And anything in the logs? What I typically do is rather than redirect, make a DownloadAction and put any downloadables under /WEB-INF (or in a database or somewhere) so that the user can't type in a URL to do directly do it. Then, just mak

Re: PlugIn and the base URL

2005-01-26 Thread fzlists
Alternatively, you could create a batch file (or shell script for *nix systems) that updates the WAR with a config file that contains nothing but the URL (maybe just a .properties file in WEB-INF, nothing more). The plugin could use that. Then you ship the batch/script file, WAR and config fil

Re: how to integrate struts project with hibernate?

2005-01-26 Thread Sebastian Hennebrueder
Sorry, I wanted to write cache implementation or better cache usage. ;-) Regards Sebastian Hennebrueder http://www.laliluna.de Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB Sebastian Hennebrueder wrote: We have a basic tutorial showing a possible way of combining Struts and H

Re: Flow Control, Is there a good way?

2005-01-26 Thread Will Stranathan
While the token is ALSO used for double submit protection, it also validates that the user got to your form the right way. i.e., if they don't go to page A and submit, their token won't be valid. w On Wed, 26 Jan 2005 10:28:49 -0500 "ckl" <[EMAIL PROTECTED]> wrote: I have read two books (Strut

Re: Flow Control, Is there a good way?

2005-01-26 Thread Scott Piker
Have you taken a look at the Struts Workflow extension (http://www.livinglogic.de/Struts/) ? >>> [EMAIL PROTECTED] 1/26/2005 10:28:49 AM >>> I am migrating to Struts from an existing webapp. One of the issues with the old architecture was managing the flow control logic. Currently we track in t

Re: redirectig to WORD files

2005-01-26 Thread Guillaume Cottenceau
"[EMAIL PROTECTED]" writes: > Hi all I try to redirect my response to a word doc file.But after > setting contexttype and using response.sendRedirect(docWordURL) , I > get white page; What I want is open this word document on a click of a > link in a normal jsp.I call the action that has to redir

Re: redirectig to WORD files

2005-01-26 Thread Jim Barrows
On Wed, 26 Jan 2005 16:24:21 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi all > I try to redirect my response to a word doc file.But after setting > contexttype and using response.sendRedirect(docWordURL) , I get white page; > What I want is open this word document on a click of a lin

Re: how to integrate struts project with hibernate?

2005-01-26 Thread Jim Barrows
On Wed, 26 Jan 2005 15:24:13 + (GMT), Metin Erksan <[EMAIL PROTECTED]> wrote: > hi > > i try to integrate my struts project with hibernate.i > m newbie about hibernate.i use jdeveloper10g. > i googled but i found a few samples that use hibernate > plugin for struts . > is there any document or

Re: Flow Control, Is there a good way?

2005-01-26 Thread Jim Barrows
On Wed, 26 Jan 2005 10:28:49 -0500, ckl <[EMAIL PROTECTED]> wrote: > I am migrating to Struts from an existing webapp. One of the issues with the > old architecture was managing the flow control logic. Currently we track in > the session which flow and page the user is on. To enforce flow control e

RE: PlugIn and the base URL

2005-01-26 Thread David Suarez
I may be misunderstanding something, is your flow? 1. WS Caller --> Axis --> Struts call 2. WS Caller --> Struts --> Axis call 3. Some funky call-back combination? Sounds like Axis/Struts are on the same box/servlet context as well from your description below. A filter can run on any URL map

Re: how to integrate struts project with hibernate?

2005-01-26 Thread Metin Erksan
hi i check generally apfuse .is it application framework ? you used spring ,struts, hibernate .and what is your opinion in with which framework hibernate should be used ? or how can i compare spring and struts with hibernate ? did you try this? i can check codes but can i integrate them with jd

RE: DisplayTag

2005-01-26 Thread Chaikin, Yaakov Y.
Daniel, This is a side point, but what do you mean when you say "JSTL-enabled"? Everything is JSTL enabled, isn't it? Just drop the jstl.jar into your WEB-INF/lib and you're done. Am I missing something? Thanks, Yaakov. -Original Message- From: Daniel H. F. e Silva [mailto:[EMAIL PROTEC

Re: PlugIn and the base URL

2005-01-26 Thread Cedric Levieux
> My Struts app contains an Axis-based SOAP service. The Struts app > initializes the call dispatcher for the SOAP service. This dispatcher > needs to know the URL of itself. This is a requirement of the semantics > of the SOAP service (outside of my control). So a Listener or a Plug In > appea

Re: PlugIn and the base URL

2005-01-26 Thread Niall Pemberton
What about configuring something at the servlet container level, rather than web app. Tomcat allows you to you to configure JNDI resources, but I have no experiece of other servlet containers: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html Niall - Original Message

RE: Flow Control, Is there a good way?

2005-01-26 Thread Abdullah Jibaly
You may want to look at Apache Beehive, which has Pageflows and sits on top of Struts. I haven't used it yet but it looks promising... -Abdullah -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 9:45 AM To: Struts Users Mailing List; [EMAI

RE: html:select drop downs using LabelValueBean

2005-01-26 Thread Justin Moore
Thanks for the input. I got around the issue by changing my jsp to use the html:optionsCollection tag. Seems to work now. Thanks. -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 8:01 PM To: Struts Users Mailing List Subject: Re:

Re: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
Cedric, No doubt it is confusing. I admit it is an odd requirement. The WS response has to contain the URL that was used to access the WS. This is a requirement of the XML Schema that defines the WS response payload. I have no control over this. So when the WS call comes in the Axis-based cal

Action naming conventions and URL accuracy

2005-01-26 Thread Trevor Hill
Hi all, first time poster here. I'm experiencing a bit of a conundrum here in trying to name my actions appropriately. An example: I have a set of processes to execute, say A B C D, to be executed sequentially (basically in wizard-style), and each page may need pre-processing (page setup) and

Re: Action naming conventions and URL accuracy

2005-01-26 Thread Hubert Rabago
How big of an overhead is it? I've never felt an overhead, then again I've never attempted to measure it either. The "cost" of the redirect just never seemed like such a big deal to me. On the other hand, keep in mind that Struts doesn't recommend you chain actions the way you could be doing now.

RE: DisplayTag

2005-01-26 Thread David G. Friedman
Flavio, A google search on "+LocaleResolver +displaytag" pulled up (first search result) the below thread which seems to mention what you described. Why doesn't it solve your problem? What is missing that makes your problem different from that discussion thread? http://www.mail-archive.com/disp

Test email

2005-01-26 Thread Tim Tront
I am trying to confirm that emails are being sent to the list. Will someone confirm. Thanks Tim Tront Systems Engineer BroadSource, Inc. 75 Fifth Street NW, Suite 220 Atlanta, GA 30308 (404) 920-2000 telephone (404) 969-1128 facsimile [EMAIL PROTECTED] www.broadsource.com -

RE: OT - Evaulating JSP as internal template?

2005-01-26 Thread Chaikin, Yaakov Y.
Niall, I am not following this line 100%: // Get the generated email from the request attribute String emailStuff = (String)request.getAttribute("emailStuff"); How exactly would this retrieve the generated email? Who stuck the generated email into "emailStuff" attribute on the request?? Thanks,

Re: OT - Evaulating JSP as internal template?

2005-01-26 Thread Will Stranathan
In the JSP that you .include - - creates a string called emailStuff, whose content is everything that gets evaluated inside the tag. Personally, I REALLY like the HttpServletResponseWrapper approach better - MUCH more elegant, and looks like less of a hack. w On Wed, 26 Jan 2005 11:23:49 -05

Re: redirectig to WORD files

2005-01-26 Thread [EMAIL PROTECTED]
what i want is open direcltly in a new browser the WORD document? -- Initial Header --- >From : [EMAIL PROTECTED] To : "Struts Users Mailing List" user@struts.apache.org Cc : Date : 26 Jan 2005 16:38:01 +0100 Subject : Re: redirectig to WORD files > "[

directly open a word doc in IE

2005-01-26 Thread [EMAIL PROTECTED]
Ha all I want to directly open a word doc in IE 5.0. I want that my ActionStruts does that direcly without opening the downloading popup window. I click my link and in another browser the doc word is opened. any help? regards 6X veloc

Re: Test email

2005-01-26 Thread Jim Barrows
On Wed, 26 Jan 2005 11:23:33 -0500, Tim Tront <[EMAIL PROTECTED]> wrote: > I am trying to confirm that emails are being sent to the list. Will > someone confirm. Nope, I can't. I'm busy :) > > Thanks > > Tim Tront > Systems Engineer > BroadSource, Inc. > 75 Fifth Street NW, Suite 220 > Atlan

user@struts.apache.org

2005-01-26 Thread Seaman, Sloan
I'm using the html:select tag in a jsp page and I want the set the selected values via the value attribute but I'm not sure how to do it if my allows multiples. I'm using struts-html-el.tld and the values that I want to have selected are available as a comma seperated list in ${treatments}. Idea

Re: OT - Evaulating JSP as internal template?

2005-01-26 Thread Niall Pemberton
I also liked Kris's HttpServletResponseWrapper approach, it is more elegant and if I have a need to do this I'd probably take that approach. The benefit of the hack I put up though is it uses nothing new rather than having to write a "buffered response" object. Niall P.S. Its probably not an issu

RE: Flow Control, Is there a good way?

2005-01-26 Thread ckl
> While the token is ALSO used for double submit protection, it > also validates that the user got to your form the right way. > > i.e., if they don't go to page A and submit, their token > won't be valid. Interesting ... Does the following use case break this? If a malicious user goes to page

Re: Flow Control, Is there a good way?

2005-01-26 Thread Will Stranathan
Yes - there is that possibility. w On Wed, 26 Jan 2005 11:58:23 -0500 "ckl" <[EMAIL PROTECTED]> wrote: Interesting ... Does the following use case break this? If a malicious user goes to page A and submits, gets page B with a valid token as a hidden form field. They then try to submit this valid

[ANN] Dimensions Multi-Channel Framework released

2005-01-26 Thread brenmcguire
I hope you don't mind if I announce a new release of a package in which I contribute with my work. Dimensions 0.6 has been released. Download at: http://mutidimensions.sourceforge.net/ Dimensions extends the Tiles Document Assembly Framework of Struts 1.1/1.2 to become a multi-channel display frame

RE: Flow Control, Is there a good way?

2005-01-26 Thread ckl
> You may want to look at Apache Beehive, which has Pageflows > and sits on top of Struts. > > I haven't used it yet but it looks promising... > > -Abdullah Promising yes, reading through their description of page flows it sounds like what I am trying to do. Unfortunately not yet ready for pro

Re: Flow Control, Is there a good way?

2005-01-26 Thread Don Brown
If you are adventurous, you might try Struts Flow - http://struts.sf.net/struts-flow It is a continuations-based process framework extracted from Cocoon that uses Javascript on the server side and continuations to allow both parallel flows by the same user, and browser back button presses automati

(newbie) html:select problem

2005-01-26 Thread Sudheer
Hi, In the below given code I am populating the html:select property 'from' using a java bean. On clicking the '>>' button I am moving the selected option from ''from' to 'to' html:select using the javascript function move(). The selected values are displayed in the 'to' html:option, but I am

RE: PlugIn and the base URL

2005-01-26 Thread Varley, Roger
> > The WS response has to contain the URL that was used to > access the WS. > This is a requirement of the XML Schema that defines the WS response > payload. I have no control over this. > I know this might be stupid, but whenever I see an odd requirement like this my first experiment is to

RE: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
Agreed. That approach works more often than not. Except in this case. The client of the WS does indeed use the URL that is sent back. That is part of the overal protocol. So it has to be a valid URL that reaches the WS inside of my Struts app. One could argue that the real problem is within

Re:

2005-01-26 Thread Wendy Smoak
From: "Seaman, Sloan" <[EMAIL PROTECTED]> > I'm using the html:select tag in a jsp page and I want the set the selected > values via the value attribute but I'm not sure how to do it if my > allows multiples. In the Action, set the corresponding property in the form bean (which is probably a Stri

RE: PlugIn and the base URL

2005-01-26 Thread David G. Friedman
A Devil's Advocate says: I agree with the theory that the webapp Context name within the application server "/myapp" should be available to the servlet but not the host/port/etc. Why? Imagine you work on a project like mine where you are using virtual host capability to map various paths on vari

RE:

2005-01-26 Thread Seaman, Sloan
That would work if I was using an action to populate the ${treatments} variable. But I am not. The variable is populated via a custom tag and the page is directly accessed, not via an Action. Thanks for the info though. I do use that method in other places. -- Sloan -Original Message-

Re: Action naming conventions and URL accuracy

2005-01-26 Thread Jeff Beal
On the other hand, keep in mind that Struts doesn't recommend you chain actions the way you could be doing now. Hubert From the Struts wiki, "ActionChaining" topic: Ted Husted wrote: IMHO, Action chaining is linking three or more Actions together. (e.g., three points determine a chaine :0) Simply

Tiles: Dynamik Components

2005-01-26 Thread Fred Hauschel
Hey all, how to dynamically replace content in a layout? I've a layout with two components left->menue, right->content. Now I will dynamically build my menue and depending on selection change the content in the content component. But menue and content components are struts modules and

Re: redirectig to WORD files

2005-01-26 Thread Erik Weber
Rather than go into all the details, here is the nuts and bolts of doing this from within an Action. In your Action class' execute implementation, your goal here is not to return an ActionForward as you typically do. You need to have a little bit lower level control over the HTTP response to se

RE: PlugIn and the base URL

2005-01-26 Thread Wiebe de Jong
Hey David, that is a great idea. Let me build on it a bit... When the .war file is deployed, the baseURL property will be blank. When the application starts up, it will check this property. If the property is blank, the app will be in 'inactive' state and the only menu item presented to the user

Re: redirectig to WORD files

2005-01-26 Thread Erik Weber
Jim Barrows wrote: On Wed, 26 Jan 2005 16:24:21 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi all I try to redirect my response to a word doc file.But after setting contexttype and using response.sendRedirect(docWordURL) , I get white page; What I want is open this word document on a c

[OT] a java question

2005-01-26 Thread Ashish Kulkarni
Hi If we need a variable which can be accessed from any class, then we set this variable as static and access it as MyClass.Variable, this variable can be modified from any class if we dont set this variable as final like public static final String Variable = "ABC"; here is the problem, i cannot se

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 20:08, Ashish Kulkarni wrote: how do i protect it from updated by any other class. Just don't. Use a static accessor method instead. Cheers -- PA http://alt.textdrive.com/ - To unsubscribe, e-mail: [EMAIL PROTEC

RE: PlugIn and the base URL

2005-01-26 Thread David G. Friedman
WdJ, I like how you think with those ideas on first-time initalizations. Now if we can get Martin's feedback on if this would work for him. :) Regards, David -Original Message- From: Wiebe de Jong [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 1:52 PM To: 'Struts Users Mail

RE: PlugIn and the base URL

2005-01-26 Thread fzlists
I would personally couple this with the thread idea I mentioned earlier... Spawn a thread to send through a request after a few seconds to check baseURL or set it as appropriate. That would remove the user interaction aspect, and probably would get everything set up quicker, at least in a known

Re: [OT] a java question

2005-01-26 Thread fzlists
You want a private variable and a public static accessor/mutator pair: public class test { private static int var; public static void setVar(int i) { var = i; } public static int getVar() { return var; } } -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Te

RE: Trying to understand Validate Date

2005-01-26 Thread Ruben Cepeda
Hello Josh, I have a thought about your problem with the "exception" thrown by Tomcat at the command line. The first is that it might not be an exception it might just be the some kind of log. Also as a side note you make sure that the hidden field that is collecting the whole date is doing wh

Re: [OT] a java question

2005-01-26 Thread Ashish Kulkarni
so it will be some thing like this public MyClass { private static String data; public static String getData() { return data; } public static setData(String input) { data = input; } } this will work, but how to make sure that setData is called only from initalization class, a

Re: [OT] a java question

2005-01-26 Thread Erik Weber
There is more than one approach. One is this: public static final SOME_STRING_VALUE = someStaticMethodThatLoadsValueFromPropertiesFile(); Another is to use a static getter rather than using a constant at all. Erik Ashish Kulkarni wrote: Hi If we need a variable which can be accessed from any clas

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 20:15, Ashish Kulkarni wrote: public static setData(String input) By making it private perhaps? Alternatively, I would recommend some readings: http://java.sun.com/docs/books/tutorial/java/index.html Cheers -- PA http://alt.textdrive.com/ --

RE: PlugIn and the base URL

2005-01-26 Thread David G. Friedman
Frank, How would you know a URL to check inside the plugIn without editing any files? If you could get that from within the plugIn, you wouldn't need to send a request. Where would you send it? To localhost but with what context? See where my snow-covered (yep, another Boston,MA,USA storm) thi

Re: [OT] a java question

2005-01-26 Thread Cedric Levieux
public MyClass { private boolean isInitialzed = false; private static String data; public static String getData() { return data; } public static setData(String input) { if (! isInitialzed) { data = input; isInitialzed = true; } } } - Original Messag

Re: (newbie) html:select problem

2005-01-26 Thread Will Stranathan
This seems to come up frequently. You have to add some Javascript on the client side to either populate hidden form fields or to iterate through the entire target set and select them all - the values don't get passed in the HTTP request unless it's selected. w On Wed, 26 Jan 2005 23:01:19 +053

Re:

2005-01-26 Thread Wendy Smoak
From: "Seaman, Sloan" <[EMAIL PROTECTED]> > That would work if I was using an action to populate the ${treatments} > variable. > But I am not. > The variable is populated via a custom tag and the page is directly > accessed, not via an Action. It would have been useful to know that in advance, as

RE: PlugIn and the base URL

2005-01-26 Thread fzlists
Well, I guess I made an assumption here... I assumed you would have enough information to construct a URL using localhost as the server name. I guess that's not a safe assumption in this case. So let me understand this scenario further... you are sending a WAR out to a client, right? When the

Re: [OT] a java question

2005-01-26 Thread Ashish Kulkarni
Hi that is what i am going to do, hope it is a good practise Ashish --- Cedric Levieux <[EMAIL PROTECTED]> wrote: > public MyClass > { > private boolean isInitialzed = false; > private static String data; > public static String getData() > { > return data; > } > public static setData(

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 20:16, Erik Weber wrote: There is more than one approach. Alternatively you can still use a final, but only assign a value to it upon initialization. No further change will be allowed after that. So many obscure ways to shot yourself in the foot :o) Cheers -- PA http://alt.te

RE: Action naming conventions and URL accuracy

2005-01-26 Thread Trevor Hill
I'm not sure I totally understand what you mean by "chaining actions". Currently, the application has one action per visual page, but each action handles the processing of the previous page and the setup of the next page. This seems wrong, as it requires me to write a whole new action to handl

Re: [OT] a java question

2005-01-26 Thread fzlists
Are you saying that some other initialization class will call your setter to initialize it? And you only want that class to be able to call it? If so, there's no standard way to do it, but... you could pass in an instance of Class to the setter, and check that it's only your initializer class.

Re: [OT] a java question

2005-01-26 Thread Will Stranathan
Or, keep all your static shared junk in your initializer class, then make the mutator private, accessor public. w On Wed, 26 Jan 2005 11:29:53 -0800 (PST) [EMAIL PROTECTED] wrote: However, as another poster said, why not just set the value in a static initializer block, and only expose a getter

Re: [OT] a java question

2005-01-26 Thread Erik Weber
Yeah, in "bootstrapping" I often run a static initializer right off the bat that loads bootstrap properties from the jar, then I set constants using private static getters that access the loaded properties underneath. Don't know where I picked that up (it's more useful in Swing), but it makes i

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 20:28, Ashish Kulkarni wrote: that is what i am going to do, Gotta do what you gotta do. But at least don't use any spurious boolean to keep track if a variable has or has not been set. After all, Java doesn't define 'null' for nothing. Cheers -- PA http://alt.textdrive.com/

Re: [OT] a java question

2005-01-26 Thread Erik Weber
It is useful to note that it is theoretically possible for two competing Threads to enter the setData method and get past the "if (! isInitialized)" statement before one of them changes the value to true, causing possible data corruption. This is why I prefer to initialize singletons either in

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 20:20, Cedric Levieux wrote: if (! isInitialzed) Shouldn't you throw one exception or two for good measure? Cheers -- PA http://alt.textdrive.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 20:37, Erik Weber wrote: By the way, real nice site you have there (I'm assuming it is yours). Great design. The design came with the stock content management system I'm using: http://www.textpattern.com/ Which perhaps not accidentally looks very much like the one of its creat

Re: [OT] a java question

2005-01-26 Thread jlopez
i don't not it this is a good practice. . Maybe it's a bad practice but.. but this work and int this way you can mantain the constants public static and final . the other problem is tha if you get the value of the constant before yo initialize you allways obtain a null value well sorry fo

html taglib usage

2005-01-26 Thread Thorhauer, John (Contractor)
Hi, Is it possible to use the struts html taglib from version 1.1 without using Struts? I would like to use it in conjunction with my own beans that I am using but can not use all of struts at this point. So I would like to simply put a bean into the session and then make it available to the for

RE: DisplayTag

2005-01-26 Thread Daniel H. F. e Silva
Yaakov, Maybe i didn't make myself clear. As far as i know, Tomcat 4, for instance, isn't JSTL-enabled until you drop the jars in your webapp lib directory but Tomcat 5 is JSTL-enabled out of the box. That was what i meant. Hope it is clearer now. Cheers, Daniel Silva. --- "Chaikin, Yaa

RE: Action naming conventions and URL accuracy

2005-01-26 Thread fzlists
One possible solution to this "page X processes page X and then sets up page Y" situation is to (a) have an Action that logically branches based on the URL and (b) treat one Action as a delegate of another. For instance, let's say I have Action Mappings PageXSetup, PageXPRocess, PageYSetup, Pag

Re: [OT] a java question

2005-01-26 Thread Ashish Kulkarni
Hi how will this class work if there is no public static void main method and have to be initialized by some other class Ashish --- [EMAIL PROTECTED] wrote: > i don't not it this is a good practice. . Maybe it's > a bad practice > but.. but this work > and int this way you can mantain the cons

[Very OT] Hypothetical challege

2005-01-26 Thread Chaikin, Yaakov Y.
Hi, This is a hypothetical question, but it's interesting to me if anyone can come up with a solution and what that solution would be. A few facts and requirements: 1) Suppose you have 2 machines. One must serve as your web server and the other must serve as your EJB server. 2) Suppose you must

RE: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
This won't work becuase Struts is configuring the business objects behind the WS. This solution, while correct, relies on a human logging into the web site in order to trigger the action. This is not the case in this app. The WS is much more active than the web app. But it is a very good idea

Re: [OT] a java question

2005-01-26 Thread PA
On Jan 26, 2005, at 21:34, Ashish Kulkarni wrote: how will this class work if there is no public static void main method and have to be initialized by some other class Hmmm... syntax error... question does not compute... What are you trying to do? Your original question was about setting and acces

RE: PlugIn and the base URL

2005-01-26 Thread Martin Wegner
Yes, this is the scenario. The web container could change, the port number could change and the WAR filename could change. So the PlugIn needs to divine the URL completely at run time. Which is why it has stumped me to date. --Marty --- [EMAIL PROTECTED] wrote: > Well, I guess I made an ass

Re: [OT] a java question

2005-01-26 Thread jlopez
Well, i put the main for the example... but you need the class Perro before you get the constant value i Hope some like this. Perro.setLoadMethod(theInitval); then su can obtain Perro.CONSTANT.uni.. Cordial Saludo John J López > Hi > how will this class work if there is no public sta

Re: [OT] a java question

2005-01-26 Thread Rick Reumann
Erik Weber wrote the following on 1/26/2005 2:44 PM: It is useful to note that it is theoretically possible for two competing Threads to enter the setData method and get past the "if (! isInitialized)" statement before one of them changes the value to true, causing possible data corruption. This

RE: html taglib usage

2005-01-26 Thread David G. Friedman
John, Which tags are you using? Have you added the name="..." attribute so it can lookup a bean in any scope by that name instead of trying to use an ActionForm bean? Regards, David -Original Message- From: Thorhauer, John (Contractor) [mailto:[EMAIL PROTECTED] Sent: Wednesday, January

  1   2   >