RE: Technical question about Struts Workflow Extension

2004-02-05 Thread shirishchandra.sakhare
Hi,
We have just created an account with source forge for the workflow extension project 
and will be transferring the source code etc. to that account  in the next couple of 
days.
So we are just in early stages of code transfer.
 
But regarding your question.
 
As you said,most of the workflow information can be made available for reading 
atleast.And I had came across similar problem and mr.Matthias bauer had replied that 
it was just overlooked.As this extension was developed/modified as and when the 
requirements arose, it does not have all required extension points and public API.
 
So that is the first task I am going to undertake.To see what parts of workflow can be 
made public and where all extension points are possible so that users can customise 
behaviour of the workflow.
 
And I am planning a next release very soon ,But have no definite schedule.But I am 
really looking forward to getting more such ideas /requests so that the next version 
can be designed keeping into view all of this.
And your requirement has just given me the idea for next immediate release.First thing 
I can do is to atleast make all Workflow state available in readOnly mode so that 
existing users can access use this  functionality without breaking any of the workflow 
logic.
 
Any ideas/suggestions are welcome.
 
I am forwarding this mail to struts user list so that others can also contribute to 
this discussion.
 
regards,
Shirish.
 
 
 
-Original Message-
From: Ignacio Cruzado Nuño [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004 8:51 AM
To: Sakhare, Shirishchandra
Subject: Technical question about Struts Workflow Extension


Dear Struts Workflow Extension team:
 
I'm Ignacio Cruzado, from Spain, computer programmer who works on Tecsidel SA (a 
programming company) as a computer consultant.
 
Matthias Bauer gave me your email address in order to redirect this technical 
question... I hope to be writing to the right person (I'm sorry if you are not this 
one!).
 
We are using "struts workflow extension" (SWE) in our development, and we would like 
to access the mapping information that SWE clases manage (the dependencies modelled in 
the struts-config.xml file).
 
In your "Workflow scope" web page you only provide information about the Primary 
Workflow and it's state.
I would find very valuable to have methods to access also to the dependencies of the 
actual state: nextState, prevState, isEndWorkflow and so on...
I have been studying the source code of SWE and I have found out that this information 
is managed by the SWE, but not published (most methods and data structure that manage 
the mapping are on the private/protecthed/package scope, instead of the public scope 
(where I would love to found them!).
Why SWE API design doesn't publish that information? Is there a technical reason for 
that? I'm talking about just readding (get) not establishing or manipulating (set) 
that information.
 
I know that we can change the source code, in order to "open" that information, but 
before doing this I would like to ask you to put much more getter methods in order to 
ask the SWE about the workflow mapping that the developer has established, and get 
more information about the actual state of the workflow.
 
Are you working on that? Is a new release of the SWE scheduled? Is it going to have 
new functionallity in the way I'm asking for?
 
Best regards,
 
  Ignacio
 

Ignacio Cruzado Nuño
Tecsidel S.A.
Parque Tecnológico de Boecillo, Parcela 114
47151 Boecillo (Valladolid)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-20 Thread Craig R. McClanahan


On Fri, 20 Jun 2003 [EMAIL PROTECTED] wrote:

> Date: Fri, 20 Jun 2003 14:42:50 +0300
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: RE: question about struts
>
> Hi,
>
> > The ActionServlet has a reference to the servlet context which may be
> > retrieved using:
> > servlet.getServletContext()
> > Using the servlet reference passed to your plugins init() method.
> >
> > Your plugin would initialise those objects you want stored in
> > the servlet
> > context, and then store them there. The plugin itself doesnt
> > need to be
> > stored as its job is just initialisation.
> >
>
> ok, got it. and i have done it.
> but now the problem is retrieving my component from the context.
> in my Action class there are no references to ActionServlet, and thus
> i cannot get the ServletContext from anywhere...
>

Try the Action.getServlet() method :-).

> any help?
>
> regards
>   marco

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-20 Thread Sandeep Takhar
may be related to jdk version??

but: request.getSession().getServletContext()

sandeep
--- [EMAIL PROTECTED] wrote:
> Hi,
>   
> > The ActionServlet has a reference to the servlet
> context which may be
> > retrieved using:
> > servlet.getServletContext()
> > Using the servlet reference passed to your plugins
> init() method.
> > 
> > Your plugin would initialise those objects you
> want stored in 
> > the servlet
> > context, and then store them there. The plugin
> itself doesnt 
> > need to be
> > stored as its job is just initialisation.
> > 
> 
> ok, got it. and i have done it. 
> but now the problem is retrieving my component from
> the context.
> in my Action class there are no references to
> ActionServlet, and thus
> i cannot get the ServletContext from anywhere...
> 
> any help?
> 
> regards
>   marco
> 
> 
> 
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 6 June 2003 14:18
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: question about struts
> > 
> > 
> > Hi David,
> > thanx 4 the suggestion...actually i was thinking
> on either use a
> > plugin or extending action servlete.
> > but i m left out with one issue: where actually do
> i have to 
> > write the code
> > for storing the plugin in the servlet context?
> > struts docs mention
> > 'The PlugIn interface extends Action and so that
> applications 
> > can easil
> > hook into the ActionServlet lifecycle.'
> > and
> > 'At runtime, any resource setup by init would be
> accessed by 
> > Actions or
> > business tier classes'
> > 
> > but how?
> > 
> > all the searchs that i have done shows how to
> configure 
> > plugins,...not how
> > to use..
> > 
> > can anyone help?
> > 
> > thanx and regards
> > marco
> > 
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: ext David Graham
> [mailto:[EMAIL PROTECTED]
> > > Sent: 05 June, 2003 17:28
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: question about struts
> > >
> > >
> > > You can use a Struts PlugIn to initialize your
> components and
> > > store them in
> > > the ServletContext.
> > >
> > > David
> > >
> > > >hi all,
> > > > i have been working with JSP model 2 for few
> years, and
> > > now i want to move
> > > >to struts.
> > > >i am starting to get acquainted with it, and i
> need help to
> > > face this
> > > >situation.
> > > >in my mvc, i am using 2 components, one to
> connect to R3 and
> > > the other for
> > > >connecting to DB.
> > > >the lifecycle of those components is the same
> as my servlet,
> > > since those
> > > >components are not
> > > >user/session/request specific.
> > > >
> > > >in reading docs about struts, i could not
> figure out where
> > > to put those
> > > >components in the
> > > >struts framework. of course, i can put them in
> > > ActionServlet, but this will
> > > >require me to modify the
> > > >code of the ActionServlet.
> > > >
> > > >is there any other way to do that other than
> modifying the code of
> > > >ActionServlet?
> > > >
> > > >hope someone can help...
> > > >
> > > >thanx in advance and regards
> > > > marco
> > > >
> > > 
> >
>
>-
> > > >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > >For additional commands, e-mail: 
> > [EMAIL PROTECTED]
> > > >
> > >
> > >
>
_
> > > MSN 8 helps eliminate e-mail viruses. Get 2
> months FREE*.
> > > http://join.msn.com/?page=features/virus
> > >
> > >
> > > 
> >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-20 Thread Marco.Mistroni
Hi,

> The ActionServlet has a reference to the servlet context which may be
> retrieved using:
> servlet.getServletContext()
> Using the servlet reference passed to your plugins init() method.
> 
> Your plugin would initialise those objects you want stored in 
> the servlet
> context, and then store them there. The plugin itself doesnt 
> need to be
> stored as its job is just initialisation.
> 

ok, got it. and i have done it. 
but now the problem is retrieving my component from the context.
in my Action class there are no references to ActionServlet, and thus
i cannot get the ServletContext from anywhere...

any help?

regards
marco



> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, 6 June 2003 14:18
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: question about struts
> 
> 
> Hi David,
>   thanx 4 the suggestion...actually i was thinking on either use a
> plugin or extending action servlete.
> but i m left out with one issue: where actually do i have to 
> write the code
> for storing the plugin in the servlet context?
> struts docs mention
> 'The PlugIn interface extends Action and so that applications 
> can easil
> hook into the ActionServlet lifecycle.'
> and
> 'At runtime, any resource setup by init would be accessed by 
> Actions or
> business tier classes'
> 
> but how?
> 
> all the searchs that i have done shows how to configure 
> plugins,...not how
> to use..
> 
> can anyone help?
> 
> thanx and regards
>   marco
> 
> 
> 
> 
> 
> > -Original Message-
> > From: ext David Graham [mailto:[EMAIL PROTECTED]
> > Sent: 05 June, 2003 17:28
> > To: [EMAIL PROTECTED]
> > Subject: Re: question about struts
> >
> >
> > You can use a Struts PlugIn to initialize your components and
> > store them in
> > the ServletContext.
> >
> > David
> >
> > >hi all,
> > >   i have been working with JSP model 2 for few years, and
> > now i want to move
> > >to struts.
> > >i am starting to get acquainted with it, and i need help to
> > face this
> > >situation.
> > >in my mvc, i am using 2 components, one to connect to R3 and
> > the other for
> > >connecting to DB.
> > >the lifecycle of those components is the same as my servlet,
> > since those
> > >components are not
> > >user/session/request specific.
> > >
> > >in reading docs about struts, i could not figure out where
> > to put those
> > >components in the
> > >struts framework. of course, i can put them in
> > ActionServlet, but this will
> > >require me to modify the
> > >code of the ActionServlet.
> > >
> > >is there any other way to do that other than modifying the code of
> > >ActionServlet?
> > >
> > >hope someone can help...
> > >
> > >thanx in advance and regards
> > >   marco
> > >
> > 
> >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > >
> >
> > _
> > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > http://join.msn.com/?page=features/virus
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: question about struts

2003-06-06 Thread Craig R. McClanahan


On Fri, 6 Jun 2003, Erik Price wrote:

> Date: Fri, 06 Jun 2003 10:36:40 -0400
> From: Erik Price <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: question about struts
>
>
>
> Andrew Hill wrote:
> > The differences are not much - both are probably equally usuable in this
> > case.
> >
> > The advantages to using the struts plugin are that it gives you access to
> > struts configuration information, and that you can control the order in
> > which your plugins are initialised from struts-config.
>
> Does the access to the struts-config occur in a static initializer block
>   or method?  Or does it occur in an instance-specific block of code
> (constructor, instance method, non-static initializer, etc).
>

The struts-config.xml file is processed when the init() method of the
ActionServlet class is called.  In turn, that happens at one of the
following times:

* If you have declared a  element in web.xml,
  this will happen before the web application is made available
  for use by clients.

* If you have not declared a  element in web.xml,
  this will happen on the first request with a URL that is mapped
  to the Struts controller servlet (typically something like foo.do).

If you are in a Servlet 2.3 (or later) environment, using a
ServletContextListener is the guaranteed way to ensure that your
initialization code is run prior to application startup.  Struts 1.1 is
still compatible with Servlet 2.2, however, so this was not an option
available to Struts itself.

>
>
> Erik

Craig McClanahan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: question about struts

2003-06-06 Thread Erik Price


Andrew Hill wrote:
The differences are not much - both are probably equally usuable in this
case.
The advantages to using the struts plugin are that it gives you access to
struts configuration information, and that you can control the order in
which your plugins are initialised from struts-config.
Does the access to the struts-config occur in a static initializer block 
 or method?  Or does it occur in an instance-specific block of code 
(constructor, instance method, non-static initializer, etc).



Erik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: question about struts

2003-06-06 Thread Andrew Hill
Dont know if that is the case or not , sorry.
(Ive not used modules)

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 June 2003 17:52
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: question about struts



won't it be necessary to write 1 plugin tag in 
every module specific config file?

where as initialization servlet is once done. PERIOD.

-navjot singh

|-Original Message-
|From: Andrew Hill [mailto:[EMAIL PROTECTED]
|Sent: Friday, June 06, 2003 12:31 PM
|To: Struts Users Mailing List
|Subject: RE: question about struts
|
|
|The differences are not much - both are probably equally usuable in this
|case.
|
|The advantages to using the struts plugin are that it gives you access to
|struts configuration information, and that you can control the order in
|which your plugins are initialised from struts-config.
|
|-Original Message-
|From: FrenzyGNX [mailto:[EMAIL PROTECTED]
|Sent: Friday, 6 June 2003 14:52
|To: Struts Users Mailing List; [EMAIL PROTECTED]
|Subject: RE: question about struts
|
|
|I use an initialization servlet to establish db and
|EJB server connections. How does it compare to PlugIn
|approach?
|
|Thanks.
|
| --- Andrew Hill <[EMAIL PROTECTED]>
|wrote: > The ActionServlet has a reference to the
|servlet
|> context which may be
|> retrieved using:
|> servlet.getServletContext()
|> Using the servlet reference passed to your plugins
|> init() method.
|>
|> Your plugin would initialise those objects you want
|> stored in the servlet
|> context, and then store them there. The plugin
|> itself doesnt need to be
|> stored as its job is just initialisation.
|>
|>
|> -Original Message-
|> From: [EMAIL PROTECTED]
|> [mailto:[EMAIL PROTECTED]
|> Sent: Friday, 6 June 2003 14:18
|> To: [EMAIL PROTECTED]
|> Cc: [EMAIL PROTECTED]
|> Subject: RE: question about struts
|>
|>
|> Hi David,
|>  thanx 4 the suggestion...actually i was thinking on
|> either use a
|> plugin or extending action servlete.
|> but i m left out with one issue: where actually do i
|> have to write the code
|> for storing the plugin in the servlet context?
|> struts docs mention
|> 'The PlugIn interface extends Action and so that
|> applications can easily
|> hook into the ActionServlet lifecycle.'
|> and
|> 'At runtime, any resource setup by init would be
|> accessed by Actions or
|> business tier classes'
|>
|> but how?
|>
|> all the searchs that i have done shows how to
|> configure plugins,...not how
|> to use..
|>
|> can anyone help?
|>
|> thanx and regards
|>  marco
|>
|>
|>
|>
|>
|> > -Original Message-
|> > From: ext David Graham
|> [mailto:[EMAIL PROTECTED]
|> > Sent: 05 June, 2003 17:28
|> > To: [EMAIL PROTECTED]
|> > Subject: Re: question about struts
|> >
|> >
|> > You can use a Struts PlugIn to initialize your
|> components and
|> > store them in
|> > the ServletContext.
|> >
|> > David
|> >
|> > >hi all,
|> > >  i have been working with JSP model 2 for few
|> years, and
|> > now i want to move
|> > >to struts.
|> > >i am starting to get acquainted with it, and i
|> need help to
|> > face this
|> > >situation.
|> > >in my mvc, i am using 2 components, one to
|> connect to R3 and
|> > the other for
|> > >connecting to DB.
|> > >the lifecycle of those components is the same as
|> my servlet,
|> > since those
|> > >components are not
|> > >user/session/request specific.
|> > >
|> > >in reading docs about struts, i could not figure
|> out where
|> > to put those
|> > >components in the
|> > >struts framework. of course, i can put them in
|> > ActionServlet, but this will
|> > >require me to modify the
|> > >code of the ActionServlet.
|> > >
|> > >is there any other way to do that other than
|> modifying the code of
|> > >ActionServlet?
|> > >
|> > >hope someone can help...
|> > >
|> > >thanx in advance and regards
|> > >  marco
|> > >
|> >
|>
|>-
|> > >To unsubscribe, e-mail:
|> [EMAIL PROTECTED]
|> > >For additional commands, e-mail:
|> [EMAIL PROTECTED]
|> > >
|> >
|> >
|>
|_
|> > MSN 8 helps eliminate e-mail viruses. Get 2 months
|> FREE*.
|> > http://join.msn.com/?page=features/virus
|> >
|> >
|> >
|>
|--

RE: question about struts

2003-06-06 Thread Navjot Singh

won't it be necessary to write 1 plugin tag in 
every module specific config file?

where as initialization servlet is once done. PERIOD.

-navjot singh

|-Original Message-
|From: Andrew Hill [mailto:[EMAIL PROTECTED]
|Sent: Friday, June 06, 2003 12:31 PM
|To: Struts Users Mailing List
|Subject: RE: question about struts
|
|
|The differences are not much - both are probably equally usuable in this
|case.
|
|The advantages to using the struts plugin are that it gives you access to
|struts configuration information, and that you can control the order in
|which your plugins are initialised from struts-config.
|
|-Original Message-
|From: FrenzyGNX [mailto:[EMAIL PROTECTED]
|Sent: Friday, 6 June 2003 14:52
|To: Struts Users Mailing List; [EMAIL PROTECTED]
|Subject: RE: question about struts
|
|
|I use an initialization servlet to establish db and
|EJB server connections. How does it compare to PlugIn
|approach?
|
|Thanks.
|
| --- Andrew Hill <[EMAIL PROTECTED]>
|wrote: > The ActionServlet has a reference to the
|servlet
|> context which may be
|> retrieved using:
|> servlet.getServletContext()
|> Using the servlet reference passed to your plugins
|> init() method.
|>
|> Your plugin would initialise those objects you want
|> stored in the servlet
|> context, and then store them there. The plugin
|> itself doesnt need to be
|> stored as its job is just initialisation.
|>
|>
|> -Original Message-
|> From: [EMAIL PROTECTED]
|> [mailto:[EMAIL PROTECTED]
|> Sent: Friday, 6 June 2003 14:18
|> To: [EMAIL PROTECTED]
|> Cc: [EMAIL PROTECTED]
|> Subject: RE: question about struts
|>
|>
|> Hi David,
|>  thanx 4 the suggestion...actually i was thinking on
|> either use a
|> plugin or extending action servlete.
|> but i m left out with one issue: where actually do i
|> have to write the code
|> for storing the plugin in the servlet context?
|> struts docs mention
|> 'The PlugIn interface extends Action and so that
|> applications can easily
|> hook into the ActionServlet lifecycle.'
|> and
|> 'At runtime, any resource setup by init would be
|> accessed by Actions or
|> business tier classes'
|>
|> but how?
|>
|> all the searchs that i have done shows how to
|> configure plugins,...not how
|> to use..
|>
|> can anyone help?
|>
|> thanx and regards
|>  marco
|>
|>
|>
|>
|>
|> > -Original Message-
|> > From: ext David Graham
|> [mailto:[EMAIL PROTECTED]
|> > Sent: 05 June, 2003 17:28
|> > To: [EMAIL PROTECTED]
|> > Subject: Re: question about struts
|> >
|> >
|> > You can use a Struts PlugIn to initialize your
|> components and
|> > store them in
|> > the ServletContext.
|> >
|> > David
|> >
|> > >hi all,
|> > >  i have been working with JSP model 2 for few
|> years, and
|> > now i want to move
|> > >to struts.
|> > >i am starting to get acquainted with it, and i
|> need help to
|> > face this
|> > >situation.
|> > >in my mvc, i am using 2 components, one to
|> connect to R3 and
|> > the other for
|> > >connecting to DB.
|> > >the lifecycle of those components is the same as
|> my servlet,
|> > since those
|> > >components are not
|> > >user/session/request specific.
|> > >
|> > >in reading docs about struts, i could not figure
|> out where
|> > to put those
|> > >components in the
|> > >struts framework. of course, i can put them in
|> > ActionServlet, but this will
|> > >require me to modify the
|> > >code of the ActionServlet.
|> > >
|> > >is there any other way to do that other than
|> modifying the code of
|> > >ActionServlet?
|> > >
|> > >hope someone can help...
|> > >
|> > >thanx in advance and regards
|> > >  marco
|> > >
|> >
|>
|>-
|> > >To unsubscribe, e-mail:
|> [EMAIL PROTECTED]
|> > >For additional commands, e-mail:
|> [EMAIL PROTECTED]
|> > >
|> >
|> >
|>
|_
|> > MSN 8 helps eliminate e-mail viruses. Get 2 months
|> FREE*.
|> > http://join.msn.com/?page=features/virus
|> >
|> >
|> >
|>
|-
|> > To unsubscribe, e-mail:
|> [EMAIL PROTECTED]
|> > For additional commands, e-mail:
|> [EMAIL PROTECTED]
|> >
|> >
|>
|>
|-
|> To unsu

RE: question about struts

2003-06-06 Thread Bailey, Shane C.


I just posted (yesterday) a code example of how to extend the ActionServlet.
It is a piece of cake:

http://marc.theaimsgroup.com/?l=struts-user&m=105476124906048&w=2

And I found another post while looking for mine:
http://marc.theaimsgroup.com/?l=struts-user&m=100500141726722&w=2

And here is a thread about whether to do it or not and other stuff:
http://marc.theaimsgroup.com/?t=10050012153&r=1&w=2



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2003 10:14 AM
To: [EMAIL PROTECTED]
Subject: question about struts

hi all,
i have been working with JSP model 2 for few years, and now i want
to move to struts.
i am starting to get acquainted with it, and i need help to face this
situation.
in my mvc, i am using 2 components, one to connect to R3 and the other for
connecting to DB.
the lifecycle of those components is the same as my servlet, since those
components are not
user/session/request specific.

in reading docs about struts, i could not figure out where to put those
components in the
struts framework. of course, i can put them in ActionServlet, but this will
require me to modify the
code of the ActionServlet.

is there any other way to do that other than modifying the code of
ActionServlet?

hope someone can help...

thanx in advance and regards
marco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: question about struts

2003-06-06 Thread David Graham
You can use a Struts PlugIn to initialize your components and store them in 
the ServletContext.

David

hi all,
	i have been working with JSP model 2 for few years, and now i want to move 
to struts.
i am starting to get acquainted with it, and i need help to face this 
situation.
in my mvc, i am using 2 components, one to connect to R3 and the other for 
connecting to DB.
the lifecycle of those components is the same as my servlet, since those 
components are not
user/session/request specific.

in reading docs about struts, i could not figure out where to put those 
components in the
struts framework. of course, i can put them in ActionServlet, but this will 
require me to modify the
code of the ActionServlet.

is there any other way to do that other than modifying the code of 
ActionServlet?

hope someone can help...

thanx in advance and regards
marco
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


question about struts

2003-06-06 Thread Marco.Mistroni
hi all,
i have been working with JSP model 2 for few years, and now i want to move to 
struts.
i am starting to get acquainted with it, and i need help to face this situation.
in my mvc, i am using 2 components, one to connect to R3 and the other for connecting 
to DB.
the lifecycle of those components is the same as my servlet, since those components 
are not
user/session/request specific.

in reading docs about struts, i could not figure out where to put those components in 
the
struts framework. of course, i can put them in ActionServlet, but this will require me 
to modify the
code of the ActionServlet.

is there any other way to do that other than modifying the code of ActionServlet?

hope someone can help...

thanx in advance and regards
marco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-06 Thread Andrew Hill
The differences are not much - both are probably equally usuable in this
case.

The advantages to using the struts plugin are that it gives you access to
struts configuration information, and that you can control the order in
which your plugins are initialised from struts-config.

-Original Message-
From: FrenzyGNX [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 June 2003 14:52
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: question about struts


I use an initialization servlet to establish db and
EJB server connections. How does it compare to PlugIn
approach?

Thanks.

 --- Andrew Hill <[EMAIL PROTECTED]>
wrote: > The ActionServlet has a reference to the
servlet
> context which may be
> retrieved using:
> servlet.getServletContext()
> Using the servlet reference passed to your plugins
> init() method.
>
> Your plugin would initialise those objects you want
> stored in the servlet
> context, and then store them there. The plugin
> itself doesnt need to be
> stored as its job is just initialisation.
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, 6 June 2003 14:18
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: question about struts
>
>
> Hi David,
>   thanx 4 the suggestion...actually i was thinking on
> either use a
> plugin or extending action servlete.
> but i m left out with one issue: where actually do i
> have to write the code
> for storing the plugin in the servlet context?
> struts docs mention
> 'The PlugIn interface extends Action and so that
> applications can easily
> hook into the ActionServlet lifecycle.'
> and
> 'At runtime, any resource setup by init would be
> accessed by Actions or
> business tier classes'
>
> but how?
>
> all the searchs that i have done shows how to
> configure plugins,...not how
> to use..
>
> can anyone help?
>
> thanx and regards
>   marco
>
>
>
>
>
> > -Original Message-
> > From: ext David Graham
> [mailto:[EMAIL PROTECTED]
> > Sent: 05 June, 2003 17:28
> > To: [EMAIL PROTECTED]
> > Subject: Re: question about struts
> >
> >
> > You can use a Struts PlugIn to initialize your
> components and
> > store them in
> > the ServletContext.
> >
> > David
> >
> > >hi all,
> > >   i have been working with JSP model 2 for few
> years, and
> > now i want to move
> > >to struts.
> > >i am starting to get acquainted with it, and i
> need help to
> > face this
> > >situation.
> > >in my mvc, i am using 2 components, one to
> connect to R3 and
> > the other for
> > >connecting to DB.
> > >the lifecycle of those components is the same as
> my servlet,
> > since those
> > >components are not
> > >user/session/request specific.
> > >
> > >in reading docs about struts, i could not figure
> out where
> > to put those
> > >components in the
> > >struts framework. of course, i can put them in
> > ActionServlet, but this will
> > >require me to modify the
> > >code of the ActionServlet.
> > >
> > >is there any other way to do that other than
> modifying the code of
> > >ActionServlet?
> > >
> > >hope someone can help...
> > >
> > >thanx in advance and regards
> > >   marco
> > >
> >
>
>-
> > >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> >
> >
>
_
> > MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*.
> > http://join.msn.com/?page=features/virus
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>

__
Do You Yahoo!?
Send free SMS from your PC!
http://sg.sms.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-05 Thread FrenzyGNX
I use an initialization servlet to establish db and
EJB server connections. How does it compare to PlugIn
approach?

Thanks.

 --- Andrew Hill <[EMAIL PROTECTED]>
wrote: > The ActionServlet has a reference to the
servlet
> context which may be
> retrieved using:
> servlet.getServletContext()
> Using the servlet reference passed to your plugins
> init() method.
> 
> Your plugin would initialise those objects you want
> stored in the servlet
> context, and then store them there. The plugin
> itself doesnt need to be
> stored as its job is just initialisation.
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, 6 June 2003 14:18
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: question about struts
> 
> 
> Hi David,
>   thanx 4 the suggestion...actually i was thinking on
> either use a
> plugin or extending action servlete.
> but i m left out with one issue: where actually do i
> have to write the code
> for storing the plugin in the servlet context?
> struts docs mention
> 'The PlugIn interface extends Action and so that
> applications can easily
> hook into the ActionServlet lifecycle.'
> and
> 'At runtime, any resource setup by init would be
> accessed by Actions or
> business tier classes'
> 
> but how?
> 
> all the searchs that i have done shows how to
> configure plugins,...not how
> to use..
> 
> can anyone help?
> 
> thanx and regards
>   marco
> 
> 
> 
> 
> 
> > -Original Message-
> > From: ext David Graham
> [mailto:[EMAIL PROTECTED]
> > Sent: 05 June, 2003 17:28
> > To: [EMAIL PROTECTED]
> > Subject: Re: question about struts
> >
> >
> > You can use a Struts PlugIn to initialize your
> components and
> > store them in
> > the ServletContext.
> >
> > David
> >
> > >hi all,
> > >   i have been working with JSP model 2 for few
> years, and
> > now i want to move
> > >to struts.
> > >i am starting to get acquainted with it, and i
> need help to
> > face this
> > >situation.
> > >in my mvc, i am using 2 components, one to
> connect to R3 and
> > the other for
> > >connecting to DB.
> > >the lifecycle of those components is the same as
> my servlet,
> > since those
> > >components are not
> > >user/session/request specific.
> > >
> > >in reading docs about struts, i could not figure
> out where
> > to put those
> > >components in the
> > >struts framework. of course, i can put them in
> > ActionServlet, but this will
> > >require me to modify the
> > >code of the ActionServlet.
> > >
> > >is there any other way to do that other than
> modifying the code of
> > >ActionServlet?
> > >
> > >hope someone can help...
> > >
> > >thanx in advance and regards
> > >   marco
> > >
> >
>
>-
> > >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> >
> >
>
_
> > MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*.
> > http://join.msn.com/?page=features/virus
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  

__
Do You Yahoo!?
Send free SMS from your PC!
http://sg.sms.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-05 Thread Andrew Hill
The ActionServlet has a reference to the servlet context which may be
retrieved using:
servlet.getServletContext()
Using the servlet reference passed to your plugins init() method.

Your plugin would initialise those objects you want stored in the servlet
context, and then store them there. The plugin itself doesnt need to be
stored as its job is just initialisation.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 June 2003 14:18
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: question about struts


Hi David,
thanx 4 the suggestion...actually i was thinking on either use a
plugin or extending action servlete.
but i m left out with one issue: where actually do i have to write the code
for storing the plugin in the servlet context?
struts docs mention
'The PlugIn interface extends Action and so that applications can easily
hook into the ActionServlet lifecycle.'
and
'At runtime, any resource setup by init would be accessed by Actions or
business tier classes'

but how?

all the searchs that i have done shows how to configure plugins,...not how
to use..

can anyone help?

thanx and regards
marco





> -Original Message-
> From: ext David Graham [mailto:[EMAIL PROTECTED]
> Sent: 05 June, 2003 17:28
> To: [EMAIL PROTECTED]
> Subject: Re: question about struts
>
>
> You can use a Struts PlugIn to initialize your components and
> store them in
> the ServletContext.
>
> David
>
> >hi all,
> > i have been working with JSP model 2 for few years, and
> now i want to move
> >to struts.
> >i am starting to get acquainted with it, and i need help to
> face this
> >situation.
> >in my mvc, i am using 2 components, one to connect to R3 and
> the other for
> >connecting to DB.
> >the lifecycle of those components is the same as my servlet,
> since those
> >components are not
> >user/session/request specific.
> >
> >in reading docs about struts, i could not figure out where
> to put those
> >components in the
> >struts framework. of course, i can put them in
> ActionServlet, but this will
> >require me to modify the
> >code of the ActionServlet.
> >
> >is there any other way to do that other than modifying the code of
> >ActionServlet?
> >
> >hope someone can help...
> >
> >thanx in advance and regards
> > marco
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about struts

2003-06-05 Thread Marco.Mistroni
Hi David,
thanx 4 the suggestion...actually i was thinking on either use a 
plugin or extending action servlete.
but i m left out with one issue: where actually do i have to write the code
for storing the plugin in the servlet context?
struts docs mention 
'The PlugIn interface extends Action and so that applications can easily hook into the 
ActionServlet lifecycle.'
and
'At runtime, any resource setup by init would be accessed by Actions or business tier 
classes'

but how?

all the searchs that i have done shows how to configure plugins,...not how to use..

can anyone help?

thanx and regards
marco




 
> -Original Message-
> From: ext David Graham [mailto:[EMAIL PROTECTED]
> Sent: 05 June, 2003 17:28
> To: [EMAIL PROTECTED]
> Subject: Re: question about struts
> 
> 
> You can use a Struts PlugIn to initialize your components and 
> store them in 
> the ServletContext.
> 
> David
> 
> >hi all,
> > i have been working with JSP model 2 for few years, and 
> now i want to move 
> >to struts.
> >i am starting to get acquainted with it, and i need help to 
> face this 
> >situation.
> >in my mvc, i am using 2 components, one to connect to R3 and 
> the other for 
> >connecting to DB.
> >the lifecycle of those components is the same as my servlet, 
> since those 
> >components are not
> >user/session/request specific.
> >
> >in reading docs about struts, i could not figure out where 
> to put those 
> >components in the
> >struts framework. of course, i can put them in 
> ActionServlet, but this will 
> >require me to modify the
> >code of the ActionServlet.
> >
> >is there any other way to do that other than modifying the code of 
> >ActionServlet?
> >
> >hope someone can help...
> >
> >thanx in advance and regards
> > marco
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> _
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
> http://join.msn.com/?page=features/virus
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question about Struts and HttpSession management

2003-03-13 Thread Michael Hanisch
On Thu, 2003-02-27 at 14:36, Heligon Sandra wrote:


I realize that this was sent a long time ago, but as I haven't seen any
other replies I figured that I might just as well say something...

> 
>   I know the definition of a HttpSession but I don't understand well
> how
>   this object is managed ?
>   Who is responsible for the creation of the HttpSession ?
The Servlet container.

>   If two clients use the same machine did they share the same
> HttpSession ?
No, usually not.

>   If two web browsers are opened on the same machine, did they use the
> same HttpSession ?
Depends.
Your session could be tied to a cookie, in which case two browsers
probably won't share the session (usually you have separate cookies for
each browser instance, i.e. process, but that depends on the browser).

If you just open another browser window chances are that cookies are
shared between those windows; depends on the browser, though.

Your session could be tied to the URL (i.e., the session ID is part of
the URL), in which case the session would be shared when using the same
URLs, no matter if you're using a different browser, different machine
etc.


>   I don't understand well the creation or delete of an HttpSession ?
> when did they occur ?
Check the servlet spec.

>   The delete of the HttpSession is done when the servlet engine is
> killed, or when the session
>   timeout is reached. But are they others reasons ?
Session could have been invalidated manually.

>   Concerning the creation of the HttpSession and the association with
> a specific user or machine
>   I don't understand large time there.
>   Is Struts there for something? 
What exactly do you mean?

Hope this clarified things a bit,

Michael.

-- 
Michael Hanisch  [EMAIL PROTECTED]
Red Hat - RH Interchange Inc., Orleansstrasse 4,  D-81669 Munich/Germany
phone: +49 (0)89 206058-53  fax: +49 (0)89 206058-88


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is UserDirectory?? (Question about "Struts In Action" by Husted)

2003-03-04 Thread alexj
As it's write on the book it's an helper class who provide an action to
store the
key user name and password into a file.

An helper class abstract the logic for an action. But as you can read
on manning web site on errata part :

The test doesn't mention that the UserDirectory source code is available in
the download. The following should be added as the second paragraph of page
20:

  "We will also focus only on the Struts source files you need to create.
For example, the UserDirectory class is part of the application's business
logic. The Struts framework interacts with this class, but the UserDirectory
is not part of the Struts layer. (You would need this class whether you used
Struts or not.) If you are interested, the source code for UserDirectory is
provided in the WEB-INF/classes folder of the register application."

--
Alexandre Jaquet
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 2:12 AM
Subject: What is UserDirectory?? (Question about "Struts In Action" by
Husted)


> In Listing 1.2 on page 20 in the book, RegisterAction.java has a line of
source code that reads:
>
> UserDirectory.getInstance().setUser(user,password1);
>
> My question is: What is UserDirectory, and what does that line do?  I
cannot find anything about UserDirectory in any Java API.
>
> Thanks.
>
> __
> The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp
>
> Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is UserDirectory?? (Question about "Struts In Action" by Husted)

2003-03-04 Thread David Graham
This question is probably better suited for whatever site the book has setup 
for support.  However great Ted's book may be, not everyone has a copy :-).

David



From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: What is UserDirectory??  (Question about "Struts In Action" by 
Husted)
Date: Tue, 04 Mar 2003 20:12:41 -0500

In Listing 1.2 on page 20 in the book, RegisterAction.java has a line of 
source code that reads:

UserDirectory.getInstance().setUser(user,password1);

My question is: What is UserDirectory, and what does that line do?  I 
cannot find anything about UserDirectory in any Java API.

Thanks.

__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp

Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


What is UserDirectory?? (Question about "Struts In Action" by Husted)

2003-03-04 Thread Frankioski
In Listing 1.2 on page 20 in the book, RegisterAction.java has a line of source code 
that reads:

UserDirectory.getInstance().setUser(user,password1);

My question is: What is UserDirectory, and what does that line do?  I cannot find 
anything about UserDirectory in any Java API.

Thanks.

__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about Struts and HttpSession management

2003-02-27 Thread Heligon Sandra

I know the definition of a HttpSession but I don't understand well
how
this object is managed ?
Who is responsible for the creation of the HttpSession ?
If two clients use the same machine did they share the same
HttpSession ?
If two web browsers are opened on the same machine, did they use the
same HttpSession ?
I don't understand well the creation or delete of an HttpSession ?
when did they occur ?
The delete of the HttpSession is done when the servlet engine is
killed, or when the session
timeout is reached. But are they others reasons ?
Nothing is specific to Struts for the HttpSession delete, isn't it ?
Concerning the creation of the HttpSession and the association with
a specific user or machine
I don't understand large time there.
Is Struts there for something? 



 

--- 
As of February 12, 2003 Thomson unifies its email addresses on a worldwide
basis.Please note my new email address: [EMAIL PROTECTED] 

Thomson is the leader in solutions and technologies for the entertainment
and media industries and serves its customers under its four strategic
brands: Technicolor, Grass Valley, RCA and THOMSON. 
More about Thomson: http://www.thomson.net/videochain 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Student question about struts

2003-02-25 Thread Jobe, Mike [EESUS]
Thanks I will look at that!
Mike

-Original Message-
From: John Espey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 9:50 AM
To: Struts Users Mailing List
Subject: RE: Student question about struts


You should read about the html:select and html:options tags.

http://jakarta.apache.org/struts/userGuide/struts-html.html

They won't actually be connected to a database directly, instead they will
read from a java.util.Collection (no ASP or PHP here ;-)

> -Original Message-
> From: Jobe, Mike [EESUS] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 7:19 AM
> To: '[EMAIL PROTECTED]'
> Subject: Student question about struts
>
>
> Hey all,
> I am working on my senior project at school and I need to make a dropdown
> box and a list box. What is the easiest way of doing these? I will be
> connecting them to the database later, so all I need is help with
> the actual
> layout.
>
> Thanks!
> Michael
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Student question about struts

2003-02-25 Thread John Espey
You should read about the html:select and html:options tags.

http://jakarta.apache.org/struts/userGuide/struts-html.html

They won't actually be connected to a database directly, instead they will
read from a java.util.Collection (no ASP or PHP here ;-)

> -Original Message-
> From: Jobe, Mike [EESUS] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 7:19 AM
> To: '[EMAIL PROTECTED]'
> Subject: Student question about struts
>
>
> Hey all,
> I am working on my senior project at school and I need to make a dropdown
> box and a list box. What is the easiest way of doing these? I will be
> connecting them to the database later, so all I need is help with
> the actual
> layout.
>
> Thanks!
> Michael
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Student question about struts

2003-02-25 Thread Jobe, Mike [EESUS]
Hey all,
I am working on my senior project at school and I need to make a dropdown
box and a list box. What is the easiest way of doing these? I will be
connecting them to the database later, so all I need is help with the actual
layout.

Thanks!
Michael


RE: Question about struts-example struts-config.xml

2003-02-03 Thread PILGRIM, Peter, FM
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> 
> On Fri, 31 Jan 2003, Wendy Smoak wrote:
> 
> >
-----
> >
> > As for working on the example... would any changes have a 
> chance of getting
> > committed before 1.1 final, or should I just wait until 
> that's finished?
> > And what does the diff look like for *removing* a class-- 
> as I understand
> > this, the LogonForm.java shouldn't even be in there now that
> > struts-config.xml is set up to automatically generate the 
> form bean.  My
> > limited test shows that the example works fine without it.
> >
> 
> Best thing to do is submit the change now.  I've already been 
> committing
> little changes as a result of comments on the user list the 
> last few days
> (i.e. in tonight's nightly build you won't find 
> LogonForm.java any more,
> or the comment about tools that you found confusing).
> 
> Changes to improve the clarity of the examples are much more 
> likely to get
> in, because there's no risk of destabilizing the framework 
> code itself.

Craig,

One thing that I do not understand is the property `key' 
of the method ``ActionErrors.add( String property, ActionError error )''.

Most people use ActionErrors.GLOBAL_ERROR anyway. What was 
the original design decision to store error message for
each property? 

--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923




***
  Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB 
Regulated by the Financial Services Authority
***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Craig R. McClanahan


On Fri, 31 Jan 2003, Wendy Smoak wrote:

> Date: Fri, 31 Jan 2003 12:56:54 -0700
> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Question about  struts-example struts-config.xml
>
> > Actually, there *is* a case when form will be passed as a null -- if
> > someone were to modify the struts-config.xml entry for this action, and
> > accidentally (or on purpose) remove the "name" or "attribute" attribute.
> > Then, the controller servlet would assume that no form bean needs to be
> > created, so it won't do so.
>
> Ahhh... didn't realize that.  Basically, I posted my code, which was adapted
> from the example, and somebody asked why on earth I was doing that.  I
> pointed at the example, and was told that it would NEVER happen.  So I
> believed them, and took it out.
>
> As for working on the example... would any changes have a chance of getting
> committed before 1.1 final, or should I just wait until that's finished?
> And what does the diff look like for *removing* a class-- as I understand
> this, the LogonForm.java shouldn't even be in there now that
> struts-config.xml is set up to automatically generate the form bean.  My
> limited test shows that the example works fine without it.
>

Best thing to do is submit the change now.  I've already been committing
little changes as a result of comments on the user list the last few days
(i.e. in tonight's nightly build you won't find LogonForm.java any more,
or the comment about tools that you found confusing).

Changes to improve the clarity of the examples are much more likely to get
in, because there's no risk of destabilizing the framework code itself.

Craig

> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Wendy Smoak
> Actually, there *is* a case when form will be passed as a null -- if
> someone were to modify the struts-config.xml entry for this action, and
> accidentally (or on purpose) remove the "name" or "attribute" attribute.
> Then, the controller servlet would assume that no form bean needs to be
> created, so it won't do so.

Ahhh... didn't realize that.  Basically, I posted my code, which was adapted
from the example, and somebody asked why on earth I was doing that.  I
pointed at the example, and was told that it would NEVER happen.  So I
believed them, and took it out.

As for working on the example... would any changes have a chance of getting
committed before 1.1 final, or should I just wait until that's finished?
And what does the diff look like for *removing* a class-- as I understand
this, the LogonForm.java shouldn't even be in there now that
struts-config.xml is set up to automatically generate the form bean.  My
limited test shows that the example works fine without it.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



RE: Question about struts-example struts-config.xml

2003-01-31 Thread Kris Schneider
Inline

Quoting "Craig R. McClanahan" <[EMAIL PROTECTED]>:

> 
> 
> On Fri, 31 Jan 2003, Wendy Smoak wrote:
> 
> > Date: Fri, 31 Jan 2003 10:50:56 -0700
> > From: Wendy Smoak <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: RE: Question about  struts-example struts-config.xml
> >
> > Craig wrote:
> > > Again, that's a carryover from the 1.0 (pre-dynabeans) approach.
> > > We should definitely clean this up to avoid confusion.
> >
> > I hate to complain, but the example really is confusing.
> 
> Don't feel bad!!!  None of the developers who have been around forever can
> see things from a newcomer's viewpoint as well as we'd like -- getting
> called on stuff like this is the best way to get it improved.
> 
> >  It also has a
> > bunch of code that makes you think you need to instantiate ActionForms
> > yourself:
> >
> >   if (form == null) {
> > form = new SubscriptionForm();
> > if ("request".equals(mapping.getScope())) {
> > request.setAttribute(mapping.getAttribute(), form);
> > } else {
> > session.setAttribute(mapping.getAttribute(), form);
> > }
> > }
> > SubscriptionForm subform = (SubscriptionForm) form;
> >
> > when I've been reliably informed (here!) that execute() will never, ever
> be
> > called with a null ActionForm parameter.
> >
> 
> Actually, there *is* a case when form will be passed as a null -- if
> someone were to modify the struts-config.xml entry for this action, and
> accidentally (or on purpose) remove the "name" or "attribute" attribute.
> Then, the controller servlet would assume that no form bean needs to be
> created, so it won't do so.

And if this happened, what would mapping.getAttribute() return? Assuming it
would be null, I'd expect the setAttribute call to blow up.

> So, this particular code could be called paranoid, but I'd rather protect
> myself against my own mistakes (or mistakes by others on the team) and
> avoid the possibility of a NullPointerException due to misconfiguration.
> 
> Note that this kind of a problem could not be detected at compile time, or
> even by static examination of just the Java code, and is also unlikely to
> be the sort of thing that unit tests would try to catch (how many people
> write unit tests with purposely broken struts-config files to see what
> breaks?).
> 
> If this were a real production application, would you rather find out
> about it when a user reports the ugly stack trace that would result, or do
> you want to spend a little time preventing some types of problems from
> occurring in the first place?
> 
> > I realize that code may just be there to make triple sure that the
> example
> > will not fail to run, but it could at least have a comment to explain
> that.
> >
> 
> We can add comments if you want, but at some point it also becomes an
> issue of personal programming style as well.  Over the years, I've shot
> myself in the foot enough times that it's embarrassing to think about.
> Because of that, I've developed some personal coding habits to try to
> minimize the possibility.  And, if you read TOMCAT-USER, you'll find that
> unexpected NPEs is a *very* common problem for newcomers to O-O languages.
> 
> > I know, I know... submit a patch. :)
> 
> Yep :-).
> 
> On a Unix platform (or Windows with CYGWIN), "diff -u" is the best way to
> prepare a patch.
> 
> >  I'm getting closer to figuring out how
> > to do that, but I'm not quite confident enough yet to mess around with
> what
> > is held up as "The Struts Example" app. ;)
> 
> But messing around with it can be a really useful way to learn :-).
> 
> And don't worry about breaking it for everyone else -- part of a
> committer's responsibility is to ensure that any accepted patches are
> doing the right thing.
> 
> >
> > --
> > Wendy Smoak
> > Applications Systems Analyst, Sr.
> > Arizona State University PA Information Resources Management
> >
> 
> Craig
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Craig R. McClanahan


On Fri, 31 Jan 2003, Wendy Smoak wrote:

> Date: Fri, 31 Jan 2003 11:14:25 -0700
> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Question about  struts-example struts-config.xml
>
> Craig wrote:
> > For this specific case, there is no reason to have a LogonForm class at
> > all, because the default behavior of a DynaValidatorForm (which is a
> > DynaActionForm plus using the validator framework to define validation
> > rules) does everything you need.
>
> Wow... I just deleted the LogonForm.class file under the 'classes' directory
> and reloaded the app... and everything still worked.  Then I added a field
> to the form in struts-config.xml, and to logon.jsp, reloaded again, and my
> new field magically appeared.  NOW I see how it works!
>
> > The only reason you would ever need to create a real class that extends
> > DynaActionForm or DynaValidatorForm would be if you need a custom reset()
> > or validate() method.
>
> Confused again.  (I will need a custom validate method.)  How does Struts
> know to start with my class that extends DynaWhateverForm and add the stuff
> in the  tag to it, rather than creating a new one?  Would it be:
>  type="edu.asu.vpia.blah.blah.LogonForm">
>
> and then
>   package edu.asu.vpia.blah.blah;
>   public final class LogonForm extends DynaValidatorForm { ... }
>
> ??
>

Yep ... that's how.  Struts will use introspection to tell whether your
form bean class is a DynaBean or not -- specifically, look at the
setType() method of org.apache.struts.config.FormBeanConfig to make the
determination whether your bean is dynamic or not.

> Thanks for helping me through this part!
>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>

Craig


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Vinh Tran
Wendy:

I too am reviewing DynaActionForms.  Do you know if it's possible to use
beans and collections for the properties? If so, how would I define these
fields in the JSP?

Vinh

For exmaple,

  
  




-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 1:14 PM
To: 'Struts Users Mailing List'
Subject: RE: Question about struts-example struts-config.xml


Craig wrote:
> For this specific case, there is no reason to have a LogonForm class at
> all, because the default behavior of a DynaValidatorForm (which is a
> DynaActionForm plus using the validator framework to define validation
> rules) does everything you need.

Wow... I just deleted the LogonForm.class file under the 'classes' directory
and reloaded the app... and everything still worked.  Then I added a field
to the form in struts-config.xml, and to logon.jsp, reloaded again, and my
new field magically appeared.  NOW I see how it works!

> The only reason you would ever need to create a real class that extends
> DynaActionForm or DynaValidatorForm would be if you need a custom reset()
> or validate() method.

Confused again.  (I will need a custom validate method.)  How does Struts
know to start with my class that extends DynaWhateverForm and add the stuff
in the  tag to it, rather than creating a new one?  Would it be:


and then
  package edu.asu.vpia.blah.blah;
  public final class LogonForm extends DynaValidatorForm { ... }

??

Thanks for helping me through this part!

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Sri Sankaran

> 
> Confused again.  (I will need a custom validate method.)  How 
> does Struts know to start with my class that extends 
> DynaWhateverForm and add the stuff in the  tag to 
> it, rather than creating a new one?  Would it be:
>  type="edu.asu.vpia.blah.blah.LogonForm">
> 
> and then
>   package edu.asu.vpia.blah.blah;
>   public final class LogonForm extends DynaValidatorForm { ... }
> 
> ??
> 

Yes

> Thanks for helping me through this part!
> 
> -- 
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
> 

Sri

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Craig R. McClanahan


On Fri, 31 Jan 2003, Wendy Smoak wrote:

> Date: Fri, 31 Jan 2003 10:50:56 -0700
> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Question about  struts-example struts-config.xml
>
> Craig wrote:
> > Again, that's a carryover from the 1.0 (pre-dynabeans) approach.
> > We should definitely clean this up to avoid confusion.
>
> I hate to complain, but the example really is confusing.

Don't feel bad!!!  None of the developers who have been around forever can
see things from a newcomer's viewpoint as well as we'd like -- getting
called on stuff like this is the best way to get it improved.

>  It also has a
> bunch of code that makes you think you need to instantiate ActionForms
> yourself:
>
>   if (form == null) {
>   form = new SubscriptionForm();
> if ("request".equals(mapping.getScope())) {
> request.setAttribute(mapping.getAttribute(), form);
> } else {
> session.setAttribute(mapping.getAttribute(), form);
> }
>   }
>   SubscriptionForm subform = (SubscriptionForm) form;
>
> when I've been reliably informed (here!) that execute() will never, ever be
> called with a null ActionForm parameter.
>

Actually, there *is* a case when form will be passed as a null -- if
someone were to modify the struts-config.xml entry for this action, and
accidentally (or on purpose) remove the "name" or "attribute" attribute.
Then, the controller servlet would assume that no form bean needs to be
created, so it won't do so.

So, this particular code could be called paranoid, but I'd rather protect
myself against my own mistakes (or mistakes by others on the team) and
avoid the possibility of a NullPointerException due to misconfiguration.

Note that this kind of a problem could not be detected at compile time, or
even by static examination of just the Java code, and is also unlikely to
be the sort of thing that unit tests would try to catch (how many people
write unit tests with purposely broken struts-config files to see what
breaks?).

If this were a real production application, would you rather find out
about it when a user reports the ugly stack trace that would result, or do
you want to spend a little time preventing some types of problems from
occurring in the first place?

> I realize that code may just be there to make triple sure that the example
> will not fail to run, but it could at least have a comment to explain that.
>

We can add comments if you want, but at some point it also becomes an
issue of personal programming style as well.  Over the years, I've shot
myself in the foot enough times that it's embarrassing to think about.
Because of that, I've developed some personal coding habits to try to
minimize the possibility.  And, if you read TOMCAT-USER, you'll find that
unexpected NPEs is a *very* common problem for newcomers to O-O languages.

> I know, I know... submit a patch. :)

Yep :-).

On a Unix platform (or Windows with CYGWIN), "diff -u" is the best way to
prepare a patch.

>  I'm getting closer to figuring out how
> to do that, but I'm not quite confident enough yet to mess around with what
> is held up as "The Struts Example" app. ;)

But messing around with it can be a really useful way to learn :-).

And don't worry about breaking it for everyone else -- part of a
committer's responsibility is to ensure that any accepted patches are
doing the right thing.

>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>

Craig


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Question about struts-example struts-config.xml

2003-01-31 Thread Wendy Smoak
Craig wrote:
> For this specific case, there is no reason to have a LogonForm class at
> all, because the default behavior of a DynaValidatorForm (which is a
> DynaActionForm plus using the validator framework to define validation
> rules) does everything you need.

Wow... I just deleted the LogonForm.class file under the 'classes' directory
and reloaded the app... and everything still worked.  Then I added a field
to the form in struts-config.xml, and to logon.jsp, reloaded again, and my
new field magically appeared.  NOW I see how it works!

> The only reason you would ever need to create a real class that extends
> DynaActionForm or DynaValidatorForm would be if you need a custom reset()
> or validate() method.

Confused again.  (I will need a custom validate method.)  How does Struts
know to start with my class that extends DynaWhateverForm and add the stuff
in the  tag to it, rather than creating a new one?  Would it be:


and then
  package edu.asu.vpia.blah.blah;
  public final class LogonForm extends DynaValidatorForm { ... }

??

Thanks for helping me through this part!

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



RE: Question about struts-example struts-config.xml

2003-01-31 Thread Wendy Smoak
Craig wrote:
> Again, that's a carryover from the 1.0 (pre-dynabeans) approach.  
> We should definitely clean this up to avoid confusion.

I hate to complain, but the example really is confusing.  It also has a
bunch of code that makes you think you need to instantiate ActionForms
yourself:

  if (form == null) {
form = new SubscriptionForm();
if ("request".equals(mapping.getScope())) {
request.setAttribute(mapping.getAttribute(), form);
} else {
session.setAttribute(mapping.getAttribute(), form);
}
}
SubscriptionForm subform = (SubscriptionForm) form;

when I've been reliably informed (here!) that execute() will never, ever be
called with a null ActionForm parameter.

I realize that code may just be there to make triple sure that the example
will not fail to run, but it could at least have a comment to explain that.

I know, I know... submit a patch. :)  I'm getting closer to figuring out how
to do that, but I'm not quite confident enough yet to mess around with what
is held up as "The Struts Example" app. ;)

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



Re: Question about struts-example struts-config.xml

2003-01-31 Thread Craig R. McClanahan


On Fri, 31 Jan 2003, Wendy Smoak wrote:

> Date: Fri, 31 Jan 2003 09:49:15 -0700
> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: Question about  struts-example struts-config.xml
>
> This appears in struts-config.xml in the struts-example webapp:
> 
>
> What is the "generator tool" it's talking about?  I'm just starting to
> experiment with dynamic forms and I'm not sure if this is an old note or
> something important.
>

That precise comment is a carryover from Struts 1.0 days, when there was
no such thing as a DynaActionForm.  The theory was that you could document
the properties of your bean in struts-config.xml and then write a little
tool that would generate an ActionForm class for you.  DynaBeans make that
approach unnecessary for form beans.

> And then I'm confused by the fact that the  tags are in
> struts config:
>
>  type="org.apache.struts.validator.DynaValidatorForm">
>   
>   
> 
>
> But they are ALSO in LogonForm.java:
>

Again, that's a carryover from the 1.0 (pre-dynabeans) approach.  We
should definitely clean this up to avoid confusion.

> public final class LogonForm extends ActionForm {
>  private String password = null;
>  private String username = null;
>  public String getPassword() { return (this.password);  }
>  public void setPassword(String password) {this.password = password; }
>  public String getUsername() { return (this.username);   }
>  public void setUsername(String username) { this.username = username;
> }
>
> I thought they "Dynamic" part would generate the properties and get/set
> methods based on the  tags and eliminate the need to code
> those in the Form.  Andy why doesn't LogonForm extend  a DynaActionForm (?)
> instead of plain old ActionForm?
>

For this specific case, there is no reason to have a LogonForm class at
all, because the default behavior of a DynaValidatorForm (which is a
DynaActionForm plus using the validator framework to define validation
rules) does everything you need.

The only reason you would ever need to create a real class that extends
DynaActionForm or DynaValidatorForm would be if you need a custom reset()
or validate() method.

> Confused...
>
> --
> Wendy Smoak

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Question about struts-example struts-config.xml

2003-01-31 Thread Wendy Smoak
This appears in struts-config.xml in the struts-example webapp:


What is the "generator tool" it's talking about?  I'm just starting to
experiment with dynamic forms and I'm not sure if this is an old note or
something important.

And then I'm confused by the fact that the  tags are in
struts config:


  
  


But they are ALSO in LogonForm.java:

public final class LogonForm extends ActionForm {
 private String password = null;
 private String username = null;
 public String getPassword() { return (this.password);  }
 public void setPassword(String password) {this.password = password; }
 public String getUsername() { return (this.username);   }
 public void setUsername(String username) { this.username = username;
}

I thought they "Dynamic" part would generate the properties and get/set
methods based on the  tags and eliminate the need to code
those in the Form.  Andy why doesn't LogonForm extend  a DynaActionForm (?)
instead of plain old ActionForm?

Confused...

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management




Re: Question about Struts-EL and JSTL

2002-12-05 Thread V. Cekvenich
indexed tag for multi row updates and master/detail forms processing and 
 dito validator.

Wendy Smoak wrote:
The README for Struts-EL says "every Struts tag that provides a feature
that is not covered by the JSTL (1.0) library is mapped into the Struts-EL
library."

Why was the  tag retained when I seem to be able to do the
same thing with ?

There must be something that  can do that JSTL can't.  What
is it?

Thanks!






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Question about Struts-EL and JSTL

2002-12-05 Thread Karr, David
It's because of the "indexed" attribute on tags inside the "logic:iterate" element.  
That won't work (I believe) with "c:forEach".

> -Original Message-
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 05, 2002 1:31 PM
> To: 'Struts Users Mailing List'
> Subject: Question about Struts-EL and JSTL
> 
> 
> 
> The README for Struts-EL says "every Struts tag that provides 
> a feature
> that is not covered by the JSTL (1.0) library is mapped into 
> the Struts-EL
> library."
> 
> Why was the  tag retained when I seem to be 
> able to do the
> same thing with ?
> 
> There must be something that  can do that JSTL 
> can't.  What
> is it?
> 
> Thanks!
> 
> -- 
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Question about Struts-EL and JSTL

2002-12-05 Thread Wendy Smoak

The README for Struts-EL says "every Struts tag that provides a feature
that is not covered by the JSTL (1.0) library is mapped into the Struts-EL
library."

Why was the  tag retained when I seem to be able to do the
same thing with ?

There must be something that  can do that JSTL can't.  What
is it?

Thanks!

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management




Re: A question about struts ?

2002-09-22 Thread Zahid Rahman

Thank you!!!
It is a maze out there ! I finally found the right line.
All of a sudden I feel like an expert too although I never call myself one.

- Original Message -
From: "kiuma" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, September 22, 2002 3:00 PM
Subject: Re: A question about struts ?


> Wellcome!
>
> Zahid Rahman wrote:
>
> >Hi,
> >
> >I was informed that the expert group can be found at Struts,
> >as I am interested in building applications which support
> >business critical processes.
> >
> >Is this the struts group  ?
> >
> >I have no question on the implementations because the documents I have
seen
> >so far
> >are very nicely structured.
> >
> >Best Regards,
> >Zahid
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> >.
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: A question about struts ?

2002-09-22 Thread Eddie Bush

"... the expert group can be found at Struts ..."

Which expert group are you refering to?  If you're looking for a spot to 
get quick, high-quality feedback on your Struts problems, this is the 
place.  If you're looking for a spot to gain access to any of the EGs 
concerning some certain JSR, Craig R. McClannahan is on the list -- but 
depending on which EG you need access to, it might be better for you to 
ask your questions in a different list.

Zahid Rahman wrote:

>Hi,
>
>I was informed that the expert group can be found at Struts,
>as I am interested in building applications which support
>business critical processes.
>
>Is this the struts group  ?
>
>I have no question on the implementations because the documents I have seen
>so far
>are very nicely structured.
>
>Best Regards,
>Zahid
>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: A question about struts ?

2002-09-22 Thread kiuma

Wellcome!

Zahid Rahman wrote:

>Hi,
>
>I was informed that the expert group can be found at Struts,
>as I am interested in building applications which support
>business critical processes.
>
>Is this the struts group  ?
>
>I have no question on the implementations because the documents I have seen
>so far
>are very nicely structured.
>
>Best Regards,
>Zahid
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>.
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




A question about struts ?

2002-09-22 Thread Zahid Rahman

Hi,

I was informed that the expert group can be found at Struts,
as I am interested in building applications which support
business critical processes.

Is this the struts group  ?

I have no question on the implementations because the documents I have seen
so far
are very nicely structured.

Best Regards,
Zahid




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Simple question about Struts

2002-08-08 Thread Melissa L Kelley

On Thu, 8 Aug 2002, Eddie Bush wrote:

> Go check out Chuck's book to see what Struts can do and how easily it
> can be configured.  If you have specific questions about "Well, would my
> end usrs have to program to do ?" just swing by and drop us a note.
>  There are a bunch (understatement!) of talented folks on the list that
> aren't scared to give their opinion.  Oh, and you might also search
> "oreilly.com" articles for "rolling blogger" to give you some ideas of
> how you can automate Struts configuration type things.  I haven't looked
> at his system in depth, but, as I recall, he builds his design on Struts
> (and Velocity, and ...).
>


This is the site for Roller: http://www.rollerweblogger.org/
It has a link to the O'Reilly article. I can't say too much about it
because I haven't poured through the code much either, but it deployed
quite easily.




--> stu: www.stuology.net
It just no longer is plain simple safe fun
when it's the psycho chimp that has the ray gun

Stuology -- A million monkeys can't be wrong



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Simple question about Struts

2002-08-08 Thread Eddie Bush

Craig could address this better, and I'm sure that he will eventually 
(he's a busy guy).

E. Laverdiere wrote:

>Hi all,
>
>I've studiing Struts for the past 3 weeks because I have done a generic Jsp
>"content-management" web site connected on a MySql database using a set of
>custom tag libraries following the Manning book "Tag Librairies". So I am
>still new at Struts, and I would like a simple advice over the Struts
>framework. I was hoping to adapt my site to a Struts framework to gain some
>architectural strenght and, by re-using the work I've done with Strut, I
>thaught, limit the future development when doing another site with the same
>framework.
>
Have you read Chuck Cavaness' book on "theserverside.com" yet?  Go there 
and search for "struts book review".  (It's available for preorder now!)

>My question is : Can a Strut web site be modify or upgrade without the
>outcome of a java programmers? I means without the creation of multiple java
>classes? It seems that if you want to add a page, or modify the parameter or
>the validation of a form, you must go into the java classes that controle
>this form and add some logic into it. Without questioning the strength of
>MVC, in a first glance, it seems that this framework is not light-weight and
>demands some real professional effort to adapt or modifie any web solution
>using this structure. So, maybe, loosing the goal of building a generic
>solution?
>
It depends on how complex of a change you want to effect.  You can add 
actions to the configuration without having to write a single line of 
Java code - Struts provides some nice default actions to serve this 
purpose.  If you need to add processing of some sort or another then, 
yes, you're probably going to have to know some Java.  I should say 
though, that the complexity of the Action classes you write will be tied 
to how well you move your logic into beans (how well you abstract your 
operations).  If you give your end-users a nice facade to work with, I 
wouldn't think it would be very complex programming - but it also will 
depend on the nature of the task they wish to implement.

Struts, Tiles, and the Validation Framework are all configured (almost) 
exclusively by their respective XML configuration files - and those are 
easily understood, even by folks that don't know XML as more than "a 
slightly different HTML" (aka ME).  Bear in mind that you could always 
build some interface to manipulate this for your end-users if you felt 
the need.

Go check out Chuck's book to see what Struts can do and how easily it 
can be configured.  If you have specific questions about "Well, would my 
end usrs have to program to do ?" just swing by and drop us a note. 
 There are a bunch (understatement!) of talented folks on the list that 
aren't scared to give their opinion.  Oh, and you might also search 
"oreilly.com" articles for "rolling blogger" to give you some ideas of 
how you can automate Struts configuration type things.  I haven't looked 
at his system in depth, but, as I recall, he builds his design on Struts 
(and Velocity, and ...).

Regards,

Eddie



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Simple question about Struts

2002-08-08 Thread E. Laverdiere

Hi all,

I've studiing Struts for the past 3 weeks because I have done a generic Jsp
"content-management" web site connected on a MySql database using a set of
custom tag libraries following the Manning book "Tag Librairies". So I am
still new at Struts, and I would like a simple advice over the Struts
framework. I was hoping to adapt my site to a Struts framework to gain some
architectural strenght and, by re-using the work I've done with Strut, I
thaught, limit the future development when doing another site with the same
framework.

My question is : Can a Strut web site be modify or upgrade without the
outcome of a java programmers? I means without the creation of multiple java
classes? It seems that if you want to add a page, or modify the parameter or
the validation of a form, you must go into the java classes that controle
this form and add some logic into it. Without questioning the strength of
MVC, in a first glance, it seems that this framework is not light-weight and
demands some real professional effort to adapt or modifie any web solution
using this structure. So, maybe, loosing the goal of building a generic
solution?


By the way, I think I have having a virus a day (just got one) with this
mailing list, nobody scan the mail before sending it?

Regards,


Etienne
Montreal



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Question about Struts and XSL

2002-07-29 Thread Jeff Pennal

Josh,

stxx (http://www.openroad.ca/opencode/stxx) may be able to help you with 
your problem.

stxx allows you to take the output of an Action class and process it 
through an XSL file to get the final HTML output, giving you the choice 
of bypassing the JSP taglib specific code of a normal struts application.

If you were to move the logic of the JSP file into an Action class you 
should still be able to maintain the exact same XSL file (w/ form elements).

Check out the examples in the stxx download. Hopefully, they'll be what 
you're looking for.

John Owen wrote:
> 
> 
> I inherited an application that uses a Model-1 MVC approach. I was 
> hoping to migrate the application to the Model-2 approach that Struts 
> offers. My problem is that a particular jsp page uses xsl to render a 
> form and its elements. This particular page is the heart of a module 
> that performs several tasks and I am unsure of how to proceed. My 
> concern is that I will have to completely re-design the jsp/xsl combo to 
> remove the form elements from the xsl in order to use the Struts html 
> taglib and Action/Form classes. I was hoping to move code that resides 
> in the jsp page into an Action class.
> 
> I looked through the message archive here briefly and found a few posts 
> about stxx (I think), but I'm not sure it would help without a 
> re-design. Any ideas or alternate approaches would be greatly appreciated.
> 
> Thanks,
> John
> 
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 


-- 
Jeff Pennal p:604-694-0554(x107)
Senior Software Developer   f:604-694-0558
Openroad Communications e:[EMAIL PROTECTED]
Vancouver, BC


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Question about Struts and XSL

2002-07-28 Thread John Owen

Thanks, but I have successfully developed several struts-based applications. 
My problem is xsl-specific.

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Question about Struts and XSL

2002-07-27 Thread @Basebeans.com

Subject: Re: Question about Struts and XSL
From: Vic C <[EMAIL PROTECTED]>
 ===
You can use JSTL (Standard Tags) X: transform tag, it works nice with 
Struts for me ( I store XML content in DB and use X: transform tag )
v.

John Owen wrote:
> 
> 
> I inherited an application that uses a Model-1 MVC approach. I was 
> hoping to migrate the application to the Model-2 approach that Struts 
> offers. My problem is that a particular jsp page uses xsl to render a 
> form and its elements. This particular page is the heart of a module 
> that performs several tasks and I am unsure of how to proceed. My 
> concern is that I will have to completely re-design the jsp/xsl combo to 
> remove the form elements from the xsl in order to use the Struts html 
> taglib and Action/Form classes. I was hoping to move code that resides 
> in the jsp page into an Action class.
> 
> I looked through the message archive here briefly and found a few posts 
> about stxx (I think), but I'm not sure it would help without a 
> re-design. Any ideas or alternate approaches would be greatly appreciated.
> 
> Thanks,
> John
> 
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Question about Struts and XSL

2002-07-27 Thread Eddie Bush

That's a pretty terse description of your problem :-)

I would build a simple test application first off - get familiar with 
the functionality Struts offers.  Be sure you make reference to the 
chapters Chuck put up for review on theserverside.com!  I think what you 
will find (unless I miss my guess) is that you can, using core Struts 
functionality (DynaThis and DynaThat!) quickly/easily refactor your 
application into something much better.  Not knowing much about XML, I 
can give you exactly zero guidance there.  You know your application 
better than any of us do - sit down and build a small-scale replica 
using Struts to force yourself to learn Struts.  Once you have done 
that, and have more specific questions, I think posting them here would 
get you more helpful responses.

Regards,

Eddie

John Owen wrote:

>
>
> I inherited an application that uses a Model-1 MVC approach. I was 
> hoping to migrate the application to the Model-2 approach that Struts 
> offers. My problem is that a particular jsp page uses xsl to render a 
> form and its elements. This particular page is the heart of a module 
> that performs several tasks and I am unsure of how to proceed. My 
> concern is that I will have to completely re-design the jsp/xsl combo 
> to remove the form elements from the xsl in order to use the Struts 
> html taglib and Action/Form classes. I was hoping to move code that 
> resides in the jsp page into an Action class.
>
> I looked through the message archive here briefly and found a few 
> posts about stxx (I think), but I'm not sure it would help without a 
> re-design. Any ideas or alternate approaches would be greatly 
> appreciated.
>
> Thanks,
> John 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Question about Struts and XSL

2002-07-26 Thread John Owen



I inherited an application that uses a Model-1 MVC approach. I was hoping to 
migrate the application to the Model-2 approach that Struts offers. My 
problem is that a particular jsp page uses xsl to render a form and its 
elements. This particular page is the heart of a module that performs 
several tasks and I am unsure of how to proceed. My concern is that I will 
have to completely re-design the jsp/xsl combo to remove the form elements 
from the xsl in order to use the Struts html taglib and Action/Form classes. 
I was hoping to move code that resides in the jsp page into an Action class.

I looked through the message archive here briefly and found a few posts 
about stxx (I think), but I'm not sure it would help without a re-design. 
Any ideas or alternate approaches would be greatly appreciated.

Thanks,
John

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Newbie question about struts and Tomcat 4

2002-03-03 Thread Barr, Scott [IBM GSA]


Which jdk are you using? 
I found this problem when attempting to use jdk 1.4 with Tomcat 4.0 and the
current (I think?) release build of Struts, so I've switched back to 1.3

Scott

> -Original Message-
> From:  Gary leidecker [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 04, 2002 3:07 AM
> To:   [EMAIL PROTECTED]
> Cc:   [EMAIL PROTECTED]
> Subject:      RE: Newbie question about struts and Tomcat 4
> 
> I just downloaded Struts a week ago and could NOT get it to work using
> Tomcat 4.0.  After three days, I gave up and downloaded Tomcat 3.2.2 -
> works fine!
> 
> Gary
> 
> -Original Message-
> From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 02, 2002 7:11 PM
> To: Struts Users Mailing List
> Subject: Re: Newbie question about struts and Tomcat 4
> 
> 
> That didn't work either. This is the exact response I get:
> 
> 
>   Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
> 
> 
> 
> type Status report
> 
> message/structs-example/index.jsp
> 
> descriptionThe requested resource (/structs-example/index.jsp) is not 
> available.
> 
> 
> Sorry about the html.
> 
> Adam Fields wrote:
> 
> >"Tony Ziolkowski" says:
> >
> >>Well let's see what more I can add. I took the .war files from the
> struts
> >>installation and copied them the /var/tomcat4/webapps. I restarted
> tomat.
> >>When I enter http://localhost:8180/struts-example I am told that tomcat
> >>can't find the page /struts-example. And I know that
> http://localhost:8180
> >>IS the correct tomcat port.
> >>
> >>That enough detail?
> 
> -- 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Newbie question about struts and Tomcat 4

2002-03-03 Thread Gary leidecker

I just downloaded Struts a week ago and could NOT get it to work using Tomcat 4.0.  
After three days, I gave up and downloaded Tomcat 3.2.2 - works fine!

Gary

-Original Message-
From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 7:11 PM
To: Struts Users Mailing List
Subject: Re: Newbie question about struts and Tomcat 4


That didn't work either. This is the exact response I get:


  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp



type Status report

message/structs-example/index.jsp

descriptionThe requested resource (/structs-example/index.jsp) is not 
available.


Sorry about the html.

Adam Fields wrote:

>"Tony Ziolkowski" says:
>
>>Well let's see what more I can add. I took the .war files from the struts
>>installation and copied them the /var/tomcat4/webapps. I restarted tomat.
>>When I enter http://localhost:8180/struts-example I am told that tomcat
>>can't find the page /struts-example. And I know that http://localhost:8180
>>IS the correct tomcat port.
>>
>>That enough detail?

-- 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

DOH! :)


Ted Husted wrote:

>>  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
>>
>-^
>
>Tony Ziolkowski wrote:
>
>>That didn't work either. This is the exact response I get:
>>
>>  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
>>
>>
>>
>>type Status report
>>
>>message/structs-example/index.jsp
>>
>>descriptionThe requested resource (/structs-example/index.jsp) is not
>>available.
>>
>>
>>Sorry about the html.
>>
>>Adam Fields wrote:
>>
>>>"Tony Ziolkowski" says:
>>>
Well let's see what more I can add. I took the .war files from the struts
installation and copied them the /var/tomcat4/webapps. I restarted tomat.
When I enter http://localhost:8180/struts-example I am told that tomcat
can't find the page /struts-example. And I know that http://localhost:8180
IS the correct tomcat port.

That enough detail?

>>>There's no path expansion - try this:
>>>
>>>http://localhost:8180/struts-example/index.jsp
>>>
>>>  - Adam
>>>
>>>-
>>>Surgam, Inc. is a technology consulting firm with strong background in
>>>delivering scalable and robust enterprise web and IT applications.
>>>http://www.surgam.net
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   
>>>For additional commands, e-mail: 
>>>
>>>
>
>-- Ted Husted, Husted dot Com, Fairport NY US
>-- Developing Java Web Applications with Struts
>-- Tel: +1 585 737-3463
>-> Web: http://husted.com/about/services
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Ted Husted

>   Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
-^

Tony Ziolkowski wrote:
> 
> That didn't work either. This is the exact response I get:
> 
>   Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp
> 
> 
> 
> type Status report
> 
> message/structs-example/index.jsp
> 
> descriptionThe requested resource (/structs-example/index.jsp) is not
> available.
> 
> 
> Sorry about the html.
> 
> Adam Fields wrote:
> 
> >"Tony Ziolkowski" says:
> >
> >>Well let's see what more I can add. I took the .war files from the struts
> >>installation and copied them the /var/tomcat4/webapps. I restarted tomat.
> >>When I enter http://localhost:8180/struts-example I am told that tomcat
> >>can't find the page /struts-example. And I know that http://localhost:8180
> >>IS the correct tomcat port.
> >>
> >>That enough detail?
> >>
> >
> >There's no path expansion - try this:
> >
> >http://localhost:8180/struts-example/index.jsp
> >
> >   - Adam
> >
> >-
> >Surgam, Inc. is a technology consulting firm with strong background in
> >delivering scalable and robust enterprise web and IT applications.
> >http://www.surgam.net
> >
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 
> >
> >

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-> Web: http://husted.com/about/services

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

That didn't work either. This is the exact response I get:


  Apache Tomcat/4.0.2 - HTTP Status 404 - /structs-example/index.jsp



type Status report

message/structs-example/index.jsp

descriptionThe requested resource (/structs-example/index.jsp) is not 
available.


Sorry about the html.

Adam Fields wrote:

>"Tony Ziolkowski" says:
>
>>Well let's see what more I can add. I took the .war files from the struts
>>installation and copied them the /var/tomcat4/webapps. I restarted tomat.
>>When I enter http://localhost:8180/struts-example I am told that tomcat
>>can't find the page /struts-example. And I know that http://localhost:8180
>>IS the correct tomcat port.
>>
>>That enough detail?
>>
>
>There's no path expansion - try this:
>
>http://localhost:8180/struts-example/index.jsp
>
>   - Adam
>
>-
>Surgam, Inc. is a technology consulting firm with strong background in
>delivering scalable and robust enterprise web and IT applications.
>http://www.surgam.net
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Dick Starr

Tony:

I thought the default port was always 8080. In any event, you might prove
Tomcat is running OK by entering http://localhost:8080/  (or whatever port
you are using). Then try the struts-example. If that doesn't work then I
would stop Tomcat, erase the tomcat /work/localhost/ directory then re-start
Tomcat (forces re-generation of the work jsp's).

By the way, I posted a problem Friday morning where Tomcat 4.0.2 did
"Marking servlet action unavailable" when I definined a data-source in the
config. I didn't receive a response and don't know why it happened, but did
discover that Tomcat 3.3a worked fine. For now, I am forced to go to 3.3a,
but I can't believe that Tomcat 4.0.2 is broken.

Dick

- Original Message -
From: "Tony Ziolkowski" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, March 02, 2002 12:27 PM
Subject: RE: Newbie question about struts and Tomcat 4


> Well let's see what more I can add. I took the .war files from the struts
> installation and copied them the /var/tomcat4/webapps. I restarted tomat.
> When I enter http://localhost:8180/struts-example I am told that tomcat
> can't find the page /struts-example. And I know that http://localhost:8180
> IS the correct tomcat port.
>
> That enough detail?
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: March 2, 2002 12:32 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Newbie question about struts and Tomcat 4
>
>
> Don't put too much detail in your posting, it makes it too hard to answer.
> :)
>
> Mark Galbreath posted that link on Friday, have a look
> http://www.tuxedo.org/~esr/faqs/smart-questions.html
>
>
>
> David Gaulin
> Tel / tél :(613) 946-9595
> Email / courriel : [EMAIL PROTECTED]
> Facsimile / télécopieur : (613) 954-6012
> Industry Canada | 235 Queen Street, Ottawa, Ontario, K1A 0H5
> Industry Canada | 235, rue Queen, Ottawa (Ontario)  K1A 0H5
>
>
>
> -----Original Message-
> From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 02, 2002 11:14 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie question about struts and Tomcat 4
>
>
> I've installed Tomcat4 and it works fine. I've copied the struts .war
files
> into the tomcat webapps directory. However tomcat doesn't see their
> presence. What did I miss doing in the install process?
>
> Thanks
> Tony
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Newbie question about struts and Tomcat 4

2002-03-02 Thread Adam Fields


"Tony Ziolkowski" says:
> Well let's see what more I can add. I took the .war files from the struts
> installation and copied them the /var/tomcat4/webapps. I restarted tomat.
> When I enter http://localhost:8180/struts-example I am told that tomcat
> can't find the page /struts-example. And I know that http://localhost:8180
> IS the correct tomcat port.
> 
> That enough detail?

There's no path expansion - try this:

http://localhost:8180/struts-example/index.jsp

- Adam

-
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.surgam.net


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

Well let's see what more I can add. I took the .war files from the struts
installation and copied them the /var/tomcat4/webapps. I restarted tomat.
When I enter http://localhost:8180/struts-example I am told that tomcat
can't find the page /struts-example. And I know that http://localhost:8180
IS the correct tomcat port.

That enough detail?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: March 2, 2002 12:32 PM
To: [EMAIL PROTECTED]
Subject: RE: Newbie question about struts and Tomcat 4


Don't put too much detail in your posting, it makes it too hard to answer.
:)

Mark Galbreath posted that link on Friday, have a look
http://www.tuxedo.org/~esr/faqs/smart-questions.html



David Gaulin
Tel / tél :(613) 946-9595
Email / courriel : [EMAIL PROTECTED]
Facsimile / télécopieur : (613) 954-6012
Industry Canada | 235 Queen Street, Ottawa, Ontario, K1A 0H5
Industry Canada | 235, rue Queen, Ottawa (Ontario)  K1A 0H5



-Original Message-
From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 11:14 AM
To: [EMAIL PROTECTED]
Subject: Newbie question about struts and Tomcat 4


I've installed Tomcat4 and it works fine. I've copied the struts .war files
into the tomcat webapps directory. However tomcat doesn't see their
presence. What did I miss doing in the install process?

Thanks
Tony


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Newbie question about struts and Tomcat 4

2002-03-02 Thread Gaulin . David

Don't put too much detail in your posting, it makes it too hard to answer.
:)

Mark Galbreath posted that link on Friday, have a look
http://www.tuxedo.org/~esr/faqs/smart-questions.html



David Gaulin
Tel / tél :(613) 946-9595 
Email / courriel : [EMAIL PROTECTED] 
Facsimile / télécopieur : (613) 954-6012
Industry Canada | 235 Queen Street, Ottawa, Ontario, K1A 0H5
Industry Canada | 235, rue Queen, Ottawa (Ontario)  K1A 0H5



-Original Message-
From: Tony Ziolkowski [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 11:14 AM
To: [EMAIL PROTECTED]
Subject: Newbie question about struts and Tomcat 4


I've installed Tomcat4 and it works fine. I've copied the struts .war files
into the tomcat webapps directory. However tomcat doesn't see their
presence. What did I miss doing in the install process?

Thanks
Tony


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Newbie question about struts and Tomcat 4

2002-03-02 Thread Tony Ziolkowski

I've installed Tomcat4 and it works fine. I've copied the struts .war files
into the tomcat webapps directory. However tomcat doesn't see their
presence. What did I miss doing in the install process?

Thanks
Tony


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Question about struts and list caching?

2001-07-30 Thread Alex Colic



I added the following to my web.xml but it did not make a difference:


  nocache
  true


Any other thoughts?

Alex

-Original Message-
Date: Mon, 30 Jul 2001 10:22:08 -0400
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
From: "Zeltser, Mark" <[EMAIL PROTECTED]>
Subject: RE: Question about struts and list caching?
Message-ID: <[EMAIL PROTECTED]>

Alex,

Did you try to set init param for ActionSerlvet to true for  tag?



RE: Question about struts and list caching?

2001-07-30 Thread Zeltser, Mark

Alex,

Did you try to set init param for ActionSerlvet to true for  tag?

> -Original Message-
> From: Alex Colic [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 10:06 AM
> To:   Struts
> Subject:  Question about struts and list caching?
> 
> Hi,
> 
> hope someone can help me out here. I think I have a problem with struts
> and
> my classes caching list.
> 
> 
> 
> In my jsp I have some data that is displayed regularly. Therefore I have
> put
> that object into the context via:
> 
> context.setAttribute("CommonProblemList" ,tbeList );
> 
> When the data the list is based upon changes, I have a monitor class that
> listens for that change and then repopulates a similar object and then
> puts
> it into the context via the method/line above.
> 
> Then in my JSP I access the data via the below:
> 
>   
> 
> 
>   
> 
>scope="application" property="list" />
>   
> 
>   
> 
>   
> 
> My problem is that if I change the data in my database the data in my JSP
> page is not updated. I have stepped through my code and my monitor class
> does see the change in the database, it is compiling a new object and it
> is
> placing it into the application context. I checked the object data being
> placed and it does have the new data in it but if I got to the web page
> which uses that object it only shows the old data. If I shut tomcat down
> and
> restart it I do see the new data.
> 
> 
> Can someone suggest what is going on here and how to fix it?
> 
> Thanks for the help.
> 
> Alex


--
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.





Question about struts and list caching?

2001-07-30 Thread Alex Colic

Hi,

hope someone can help me out here. I think I have a problem with struts and
my classes caching list.



In my jsp I have some data that is displayed regularly. Therefore I have put
that object into the context via:

context.setAttribute("CommonProblemList" ,tbeList );

When the data the list is based upon changes, I have a monitor class that
listens for that change and then repopulates a similar object and then puts
it into the context via the method/line above.

Then in my JSP I access the data via the below:

  


  

  
  

  

  

My problem is that if I change the data in my database the data in my JSP
page is not updated. I have stepped through my code and my monitor class
does see the change in the database, it is compiling a new object and it is
placing it into the application context. I checked the object data being
placed and it does have the new data in it but if I got to the web page
which uses that object it only shows the old data. If I shut tomcat down and
restart it I do see the new data.


Can someone suggest what is going on here and how to fix it?

Thanks for the help.

Alex

 Alex Colic.vcf


Re: question about struts

2001-04-13 Thread Craig R. McClanahan



On Wed, 11 Apr 2001, Stanley Tan wrote:

> Dear Sir,
> 
> I believe that if you downloaded the Struts framework, then you have 
> already downloaded the documenation.  Let's say you unzipped Struts at 
> c:\jakarta-struts-1.0-b1.  If you go to c:\jakarta-struts-1.0-b1\webapps, 
> you'll see a file called struts-documentation.war.  Copy this file to your 
> Web Server's "webapps" directory.  In Resin, for example, that would be 
> c:\{resinhome}\webapps.
> 
> You can then view the documentation by going to
> http://localhost:8080/struts-documentation
> 

This documentation is also available online, at:

http://jakarta.apache.org/struts/


> Hope this helps.
> 
> Stanley Tan
> 

Craig




Re: question about struts

2001-04-11 Thread Rajan Gupta

You should be able to download that with the package itself. But you will
have to move the war file in your webapps directory & restart your server
--- bommaku murali <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> >From: "ravi konam" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> >Subject: question about struts
> >Date: 11 Apr 2001 08:20:36 -
> >
> >
> >respected sir,
> > I want to download struts framework documentation. where can I
> 
> >get. please tell me.
> >   ---ravikonam.
> >
> >_
> >Chat with your friends as soon as they come online. Get Rediff Bol at
> >http://bol.rediff.com
> >
> >
> >
> >
> 
>
_
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



Re: question about struts

2001-04-11 Thread bommaku murali




>From: "ravi konam" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Subject: question about struts
>Date: 11 Apr 2001 08:20:36 -
>
>
>respected sir,
> I want to download struts framework documentation. where can I 
>get. please tell me.
>   ---ravikonam.
>
>_
>Chat with your friends as soon as they come online. Get Rediff Bol at
>http://bol.rediff.com
>
>
>
>

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: question about struts

2001-04-11 Thread Stanley Tan

Dear Sir,

I believe that if you downloaded the Struts framework, then you have 
already downloaded the documenation.  Let's say you unzipped Struts at 
c:\jakarta-struts-1.0-b1.  If you go to c:\jakarta-struts-1.0-b1\webapps, 
you'll see a file called struts-documentation.war.  Copy this file to your 
Web Server's "webapps" directory.  In Resin, for example, that would be 
c:\{resinhome}\webapps.

You can then view the documentation by going to
http://localhost:8080/struts-documentation

Hope this helps.

Stanley Tan


At 08:20 AM 4/11/01 +, you wrote:

>respected sir,
> I want to download struts framework documentation. where can I 
> get. please tell me.
>   ---ravikonam.
>
>_
>Chat with your friends as soon as they come online. Get Rediff Bol at
>http://bol.rediff.com




question about struts

2001-04-11 Thread ravi konam


   respected sir,
I want to download struts framework documentation. where can I get. please 
tell me.
  ---ravikonam.

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com







Re: Question about struts application model (DataSource, Business Logic beans)

2001-03-13 Thread Ted Husted

> My problem is that
> access to the DataSource is through the servlet.findDataSource() call.

Struts stores the JDBC Connection pools as servlet context attributes
(in JSP terms, application-scope beans). You can also access them that
way. If you do not specify a name in the Struts-config file, it uses a
constant value. If you specify null to findDataSource(), it uses the
same constant. But you can also access the pools using your own labels
(or the Struts constant) without using the servlet method. 

> Carles Pi-Sunyer wrote:
> 
> Hi,
> 
> I'm using Struts for a new application that I'm developing. I have a
> question about the separation between the Action classes and the
> Business Logic beans.
> 
> My Business Logic beans are making database accesses to manipulate the
> underlying data model. I am planning on using the struts db connection
> pool, which is supplied through the DataSource. My problem is that
> access to the DataSource is through the servlet.findDataSource() call.
> How do I make the Business Logic beans unaware of the servlet/http
> layer (as suggested in the developers guide) while still making the
> DataSource available to the Business Logic beans? Do I have to pass a
> reference to the DataSource on every call the Business Logic beans
> (not an option that I like), or is there a cleaner way to do this? I
> also have a similar issues with logging services.
> 
> I believe that a common way to solve this problem is to bind the
> DataSource to a jndi service. I am using tomcat 3.2.1, and I don't
> believe that this functionality is supplied in either Tomcat or
> Struts.
> 
> Thank You,
> Carles



Question about struts application model (DataSource, Business Logic beans)

2001-03-12 Thread Carles Pi-Sunyer
Title: Question about struts application model (DataSource, Business Logic beans)





Hi,


I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans. 

My Business Logic beans are making database accesses to manipulate the underlying data model. I am planning on using the struts db connection pool, which is supplied through the DataSource. My problem is that access to the DataSource is through the servlet.findDataSource() call. How do I make the Business Logic beans unaware of the servlet/http layer (as suggested in the developers guide) while still making the DataSource available to the Business Logic beans? Do I have to pass a reference to the DataSource on every call the Business Logic beans (not an option that I like), or is there a cleaner way to do this? I also have a similar issues with logging services.

I believe that a common way to solve this problem is to bind the DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe that this functionality is supplied in either Tomcat or Struts.

Thank You,
Carles





Re: Question about struts application model (DataSource, BusinessLog ic beans)

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, Carles Pi-Sunyer wrote:

> Hi,
> 
> I'm using Struts for a new application that I'm developing. I have a
> question about the separation between the Action classes and the Business
> Logic beans. 
> 
> My Business Logic beans are making database accesses to manipulate the
> underlying data model. I am planning on using the struts db connection pool,
> which is supplied through the DataSource. My problem is that access to the
> DataSource is through the servlet.getDataSource() call. How do I make the
> Business Logic beans unaware of the servlet/http layer (as suggested in the
> developers guide) while still making the DataSource available to the
> Business Logic beans? Do I have to pass a reference to the DataSource on
> every call the Business Logic beans (not an option that I like), or is there
> a cleaner way to do this? I also have a similar issues with logging
> services.
> 
> I believe that a common way to solve this problem is to bind the DataSource
> to a jndi service. I am using tomcat 3.2.1, and I don't believe that this
> functionality is supplied in either Tomcat or Struts.
>

Binding the data source to a JNDI context is definitely attractive -- and
it is also the approach that is suggested if you are running in a
J2EE-compatible application server (which is required to support this
approach).  In such a scenario, you would configure the data source using
the tools provided by your app server, rather than declaring it in
struts-config.xml, and you'd define a  entry in your web.xml
file to link the data source you need to the facilities set up by your app
server.

Tomcat 3.2 does not support a JNDI context for this kind of thing, but
Tomcat 4.0 does.  By default, it uses the data source and transaction
implementations from Tyrex (http://tyrex.exolab.org), but you can also
create your own object factories if you want to do something different.

 
> Thank You,
> Carles
> 

Craig





Re: Question about struts application model (DataSource, Business Log ic beans)

2001-03-12 Thread Michael McCallister

I resolved this by creating two pieces:

First is a class in your business logic package that manages the context 
required by the business logic beans.  This class should be a Singleton and 
should manage access to resources needed by your business logic beans such 
as configuration parameters and your DataSource.  I modeled my context 
object after the Servlet session API, but you could make it much more 
structured if you like.

Second, depending on your servlet environment, create some mechanism to 
initialize your application context object.  Using Tomcat, you could do 
this using something like the DatabaseServlet from the Struts example.  In 
this case, your DatabaseServlet gets started by the servlet container and 
it initializes your application context object (using servlet 
initialization parameters, things like a GenericDataSource object, 
etc.).  Now when your business logic beans are called, they retrieve the 
application context, ask it for a DataSource, and use it to get a connection.

When you decide to re-implement your application as a two-tier 
Client/Server application with a Swing front-end, all you need to do is 
implement some alternate method for your application context object to be 
initialized and your business logic beans are shielded from the change.

I'm not sure this is the best way to decouple your layers, but it's what 
I've come across so far.


Mike

At 12:22 PM 3/12/2001, you wrote:

>Hi,
>
>I'm using Struts for a new application that I'm developing. I have a 
>question about the separation between the Action classes and the Business 
>Logic beans.
>
>My Business Logic beans are making database accesses to manipulate the 
>underlying data model. I am planning on using the struts db connection 
>pool, which is supplied through the DataSource. My problem is that access 
>to the DataSource is through the servlet.getDataSource() call. How do I 
>make the Business Logic beans unaware of the servlet/http layer (as 
>suggested in the developers guide) while still making the DataSource 
>available to the Business Logic beans? Do I have to pass a reference to 
>the DataSource on every call the Business Logic beans (not an option that 
>I like), or is there a cleaner way to do this? I also have a similar 
>issues with logging services.
>
>I believe that a common way to solve this problem is to bind the 
>DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe 
>that this functionality is supplied in either Tomcat or Struts.
>
>Thank You,
>Carles




Question about struts application model (DataSource, Business Logic beans)

2001-03-12 Thread Carles Pi-Sunyer
Title: Question about struts application model (DataSource, Business Logic beans)





Hi,


I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans. 

My Business Logic beans are making database accesses to manipulate the underlying data model. I am planning on using the struts db connection pool, which is supplied through the DataSource. My problem is that access to the DataSource is through the servlet.getDataSource() call. How do I make the Business Logic beans unaware of the servlet/http layer (as suggested in the developers guide) while still making the DataSource available to the Business Logic beans? Do I have to pass a reference to the DataSource on every call the Business Logic beans (not an option that I like), or is there a cleaner way to do this? I also have a similar issues with logging services.

I believe that a common way to solve this problem is to bind the DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe that this functionality is supplied in either Tomcat or Struts.

Thank You,
Carles





RE: Stupd question about Struts and EJB.

2001-02-28 Thread Robert Taylor

> If the validate() method does the type checking then we must implement
> type
> conversion code and type checking code in every single form bean we
> write!
> On large systems, this is sometimes very unfun.
>
> Any thoughts?
You could use a Visitor pattern for an application Validator. Each form
would implement a Visitable interface and could be passed to the application
Validator where it (the Validator) would then determine which validation to
use for the form, perform the validation, and return successfully or through
some exception. This way, all validation logic can reside in one location.
The kind of bends some OO concepts (encapsulation), but is a nice way to
decouple the validation logic from each form.

HTH

Robert




Re: Stupd question about Struts and EJB.

2001-02-27 Thread Nick Pellow

Martin, 

[EMAIL PROTECTED] wrote:
> 
> At 11:17 AM 2/28/01 +1100, Nick Pellow wrote:
> >I am very new to struts as is, but as I far as I can tell from reading
> >the implementation of the above method,
> >the ActionForm can only have String properties. Is this correct?
> >
> >If so, it would be nice if the ActionForm could support types other than
> >String and the
> >struts engine would convert these in a similar fashion as Ant does to
> >the attributes in the xml build file.
> 
> Actually, Struts will attempt to convert values as it populates a form
> bean. This is done in BeanUtils.populate(), which is called right at the
> end of RequestUtils.populate(). 

Ooops, thats what I was looking for but did not find.

> However, the problem is what to do if it
> can't be converted. For example, if I define a form bean property as an
> int, and the request contains "abc", what should Struts do?

Struts could create an ActionErrors object with an ActionError for each
conversion error.
If an error does get raised at that early stage, then one will no doubt
be raised later on
in the Action. The difference is that the coder has to 
a) check for the conversion error again, 
b) raise an error again.
It also means that checking for such user mistakes is spread across
mulitple layers in the application
and also across multiple components within the system. I think it would
be nice to centralize
such type checking in one part of the system. 


The error message strings could be defined in a similar fashion to
errors.header and errors.footer.
Maybe something like: 
errors.conversion.NumberFormatException=You must enter a number for the
{0} field, not {1}.

Then when Struts comes across a type error, it raises the error then and
there, using a resource
such as the one above to report to the user.

As mentioned earlier in this thread this option could be configurable in
Struts as it may not
always be desirable.

> In 1.0, it will set the property to a (configurable) default value, but
> that's not a good solution when there's no obvious candidate meaning
> "invalid" (e.g. for a boolean). It also destroys the original user input,
> so when validate() fails and returns the user to the input form, you can no
> longer display to them the mistake they made. (By default, in the situation
> I described above, the user would see "0" where they entered "abc".)
> 
> So it's really best if form bean properties are all strings. What you *can*
> do, though, is have your validate() method check that the value can be
> converted to what you want, and return an error if it can't. For example,
> you might use Integer.parseInt() to ensure that a valid integer was entered.

If the validate() method does the type checking then we must implement
type
conversion code and type checking code in every single form bean we
write!
On large systems, this is sometimes very unfun.

Any thoughts?

Regards, 
Nick



> 
> --
> Martin Cooper
> Tumbleweed Communications



Re: Stupd question about Struts and EJB.

2001-02-27 Thread martin . cooper

At 11:17 AM 2/28/01 +1100, Nick Pellow wrote:
>I am very new to struts as is, but as I far as I can tell from reading
>the implementation of the above method,
>the ActionForm can only have String properties. Is this correct?
>
>If so, it would be nice if the ActionForm could support types other than
>String and the
>struts engine would convert these in a similar fashion as Ant does to
>the attributes in the xml build file.

Actually, Struts will attempt to convert values as it populates a form 
bean. This is done in BeanUtils.populate(), which is called right at the 
end of RequestUtils.populate(). However, the problem is what to do if it 
can't be converted. For example, if I define a form bean property as an 
int, and the request contains "abc", what should Struts do?

In 1.0, it will set the property to a (configurable) default value, but 
that's not a good solution when there's no obvious candidate meaning 
"invalid" (e.g. for a boolean). It also destroys the original user input, 
so when validate() fails and returns the user to the input form, you can no 
longer display to them the mistake they made. (By default, in the situation 
I described above, the user would see "0" where they entered "abc".)

So it's really best if form bean properties are all strings. What you *can* 
do, though, is have your validate() method check that the value can be 
converted to what you want, and return an error if it can't. For example, 
you might use Integer.parseInt() to ensure that a valid integer was entered.

--
Martin Cooper
Tumbleweed Communications





Simple question about Struts

2001-02-27 Thread javaCool

Has anyone used Allaire's JRun and Struts yet?  If so, are any of you fine
people willing to share tips or tricks of what to do or not do?  Thanks in
advance.

Mike V.




Re: Stupd question about Struts and EJB.

2001-02-27 Thread Nick Pellow



[EMAIL PROTECTED] wrote:
> 
> This is the approach that I am using, but to simplify the design I have
> interconnected the view and model. I would like to eliminate this coupling-
> so if anyone has some suggestions or could recommend a pattern I could apply
> please let me know :) What I am doing is creating entity beans that resemble
> the ActionForm as much as possible- for the most part there is a loose 1 to
> 1 relationship between entity EJB and ActionForm. There are some exceptions,
> but this is how 80% of the app is designed. I use session EJBs to manage the
> entity EJBs and map these to appropriate ActionForms (using the Struts
> copyProperties util). So, the session EJB must be aware of the ActionForm,
> since this is the object that it returns. To persist data, the ActionServlet
> obtains a reference to the session EJB and would send a save() method I have
> implemented the ActionForm which then is copied to an entity EJB. Ideally
> there should be a proxy between the EJB tier and the Struts tier, so the
> session EJB does not need to be aware of the ActionForm. But, I am not about
> to create another intermediate object with the same properties and
> setters/getters. Some of my forms have up to 30 properties so this is way
> too much work! I think this should be done automatically.
> 
> One more thing- the copyProperties requires that properties are the same
> type. But, the view is basically just String-based where the ejb tier
> consists of real Date, BigDecimal, etc... So what I find myself doing is
> creating additional methods in the ActionForm that make this transformation.
> For example setCustomerId(BigDecimal) and setCustomerIdStr(String). Then use
> the string version for Struts, and when copyProperties is invoked it will
> map the BigDecimal value to the EJB. Perhaps I should extend copyProperties
> to support basic type conversions- or has this already been done elsewhere?
> 
> thoughts or suggestions?

Bob, 
I can see what you mean. The 
RequestUtils.populate(Object bean, String prefix, String suffix, 
HttpServletRequest request)
methods do no type conversions.
So do you call the additional conversion methods during the validate()
method on the ActionForm?

I am very new to struts as is, but as I far as I can tell from reading
the implementation of the above method, 
the ActionForm can only have String properties. Is this correct?

If so, it would be nice if the ActionForm could support types other than
String and the
struts engine would convert these in a similar fashion as Ant does to
the attributes in the xml build file.
An error message could be returned to the user if they entered a String
into an Integer field, say.
This behavour may not be always desired, so it could be switched on and
off in the .
 This may open a can of worms however, Date formats spring to mind.
However, comming from a background of using tags in anger, I wrote a lot
of code
converting Strings to other objects, (mostly Longs, ints, (B)booleans ).

Just my 2 Bobs worth.


cheers, 
Nick



> 
> Thanks,
> Bob
> 
> -Original Message-
> From: Nick Pellow [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 5:23 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Stupd question about Struts and EJB.
> 
> Hello,
> 
> Robert Leland wrote:
> >
> > As far as struts 1.0, the Form bean is used only to redisplay
> > information to the jsp page. Typically the EJB might be loaded/unloaded in
> the
> > action class. If you search www.mail-archives.co,m Craig talked more about
> this in detail.
> 
> My understanding is that with struts you should keep your EJBs entirely
> independant of
> anything to do with struts or servlets. You can and should however have
> a standard naming
> convention for the getters and setters across the EJB, the ActionForm
> and the html form elements.
> this allows you to call PropertyUtils.copyProperties(java.lang.Object
> dest, java.lang.Object orig)
> when you are ready to store the details entered by the user.
> 
> Please let me know if this does not sound right.
> 
> Cheers,
> Nick
> 
> > In future version of struts this may be enhanced.
> >
> > -Rob
> >
> > > Cameron Ingram0 wrote:
> > >
> > > I am in the process of convincing my company to go with MVC and Struts.
> As with any thing new,
> > > people are sometimes resistant
> > > to change. One of the opposition questions I am getting is, how will
> this work with EJB(problem is
> > > I don't know too much about EJB currently).  Do the EJB's references
> just go in the Form and
> > > Action Bean and every thing else behaves the same? Are there any obvious
> points that I can bring
> > > up on the subject?
> > > Any help on this subject would be much appreciated!
> > >
> > > Thanks, Cameron Ingram



RE: Stupd question about Struts and EJB.

2001-02-27 Thread rhayden


This is the approach that I am using, but to simplify the design I have
interconnected the view and model. I would like to eliminate this coupling-
so if anyone has some suggestions or could recommend a pattern I could apply
please let me know :) What I am doing is creating entity beans that resemble
the ActionForm as much as possible- for the most part there is a loose 1 to
1 relationship between entity EJB and ActionForm. There are some exceptions,
but this is how 80% of the app is designed. I use session EJBs to manage the
entity EJBs and map these to appropriate ActionForms (using the Struts
copyProperties util). So, the session EJB must be aware of the ActionForm,
since this is the object that it returns. To persist data, the ActionServlet
obtains a reference to the session EJB and would send a save() method I have
implemented the ActionForm which then is copied to an entity EJB. Ideally
there should be a proxy between the EJB tier and the Struts tier, so the
session EJB does not need to be aware of the ActionForm. But, I am not about
to create another intermediate object with the same properties and
setters/getters. Some of my forms have up to 30 properties so this is way
too much work! I think this should be done automatically.

One more thing- the copyProperties requires that properties are the same
type. But, the view is basically just String-based where the ejb tier
consists of real Date, BigDecimal, etc... So what I find myself doing is
creating additional methods in the ActionForm that make this transformation.
For example setCustomerId(BigDecimal) and setCustomerIdStr(String). Then use
the string version for Struts, and when copyProperties is invoked it will
map the BigDecimal value to the EJB. Perhaps I should extend copyProperties
to support basic type conversions- or has this already been done elsewhere?

thoughts or suggestions?

Thanks,
Bob


-Original Message-
From: Nick Pellow [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 5:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Stupd question about Struts and EJB.



Hello, 

Robert Leland wrote:
> 
> As far as struts 1.0, the Form bean is used only to redisplay
> information to the jsp page. Typically the EJB might be loaded/unloaded in
the
> action class. If you search www.mail-archives.co,m Craig talked more about
this in detail.

My understanding is that with struts you should keep your EJBs entirely
independant of
anything to do with struts or servlets. You can and should however have
a standard naming
convention for the getters and setters across the EJB, the ActionForm
and the html form elements.
this allows you to call PropertyUtils.copyProperties(java.lang.Object
dest, java.lang.Object orig)
when you are ready to store the details entered by the user.

Please let me know if this does not sound right.

Cheers, 
Nick

> In future version of struts this may be enhanced.
> 
> -Rob
> 
> > Cameron Ingram0 wrote:
> >
> > I am in the process of convincing my company to go with MVC and Struts.
As with any thing new,
> > people are sometimes resistant
> > to change. One of the opposition questions I am getting is, how will
this work with EJB(problem is
> > I don't know too much about EJB currently).  Do the EJB's references
just go in the Form and
> > Action Bean and every thing else behaves the same? Are there any obvious
points that I can bring
> > up on the subject?
> > Any help on this subject would be much appreciated!
> >
> > Thanks, Cameron Ingram



Re: Stupd question about Struts and EJB.

2001-02-27 Thread Maya Muchnik

I have the similar case with Beans not implemented "Serializable". I will use
PropertyUtils.copyProperties(destBean, srcBean) to propogate the properties.

Nick Pellow wrote:

> Hello,
>
> Robert Leland wrote:
> >
> > As far as struts 1.0, the Form bean is used only to redisplay
> > information to the jsp page. Typically the EJB might be loaded/unloaded in the
> > action class. If you search www.mail-archives.co,m Craig talked more about this in 
>detail.
>
> My understanding is that with struts you should keep your EJBs entirely
> independant of
> anything to do with struts or servlets. You can and should however have
> a standard naming
> convention for the getters and setters across the EJB, the ActionForm
> and the html form elements.
> this allows you to call PropertyUtils.copyProperties(java.lang.Object
> dest, java.lang.Object orig)
> when you are ready to store the details entered by the user.
>
> Please let me know if this does not sound right.
>
> Cheers,
> Nick
>
> > In future version of struts this may be enhanced.
> >
> > -Rob
> >
> > > Cameron Ingram0 wrote:
> > >
> > > I am in the process of convincing my company to go with MVC and Struts. As with 
>any thing new,
> > > people are sometimes resistant
> > > to change. One of the opposition questions I am getting is, how will this work 
>with EJB(problem is
> > > I don't know too much about EJB currently).  Do the EJB's references just go in 
>the Form and
> > > Action Bean and every thing else behaves the same? Are there any obvious points 
>that I can bring
> > > up on the subject?
> > > Any help on this subject would be much appreciated!
> > >
> > > Thanks, Cameron Ingram




RE: Stupd question about Struts and EJB.

2001-02-27 Thread Deadman, Hal

I use EJBs without using copyProperties although it's a matter of
preference. I have a set of JavaBeans that you could call "Data Beans"
because they are often similar to my Entity Beans and they don't contain any
business logic. They are struts free and I pass these data beans to some EJB
components. I often nest the data bean inside the ActionForm class as a
property and use the Struts nested property functionality to populate the
Data JavaBean directly. Sometimes I don't use a nested JavaBean and I just
pass the individual properties of the form to the EJB component. I like
using nested java beans better than calling copyproperties because if I have
a Databean anyway, I don't want to have to redefine lots of getters and
setters in the Struts form bean. 

Hal
-Original Message-
From: Nick Pellow [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 5:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Stupd question about Struts and EJB.



Hello, 

Robert Leland wrote:
> 
> As far as struts 1.0, the Form bean is used only to redisplay
> information to the jsp page. Typically the EJB might be loaded/unloaded in
the
> action class. If you search www.mail-archives.co,m Craig talked more about
this in detail.

My understanding is that with struts you should keep your EJBs entirely
independant of
anything to do with struts or servlets. You can and should however have
a standard naming
convention for the getters and setters across the EJB, the ActionForm
and the html form elements.
this allows you to call PropertyUtils.copyProperties(java.lang.Object
dest, java.lang.Object orig)
when you are ready to store the details entered by the user.

Please let me know if this does not sound right.

Cheers, 
Nick

> In future version of struts this may be enhanced.
> 
> -Rob
> 
> > Cameron Ingram0 wrote:
> >
> > I am in the process of convincing my company to go with MVC and Struts.
As with any thing new,
> > people are sometimes resistant
> > to change. One of the opposition questions I am getting is, how will
this work with EJB(problem is
> > I don't know too much about EJB currently).  Do the EJB's references
just go in the Form and
> > Action Bean and every thing else behaves the same? Are there any obvious
points that I can bring
> > up on the subject?
> > Any help on this subject would be much appreciated!
> >
> > Thanks, Cameron Ingram



Re: Stupd question about Struts and EJB.

2001-02-27 Thread Nick Pellow


Hello, 

Robert Leland wrote:
> 
> As far as struts 1.0, the Form bean is used only to redisplay
> information to the jsp page. Typically the EJB might be loaded/unloaded in the
> action class. If you search www.mail-archives.co,m Craig talked more about this in 
>detail.

My understanding is that with struts you should keep your EJBs entirely
independant of
anything to do with struts or servlets. You can and should however have
a standard naming
convention for the getters and setters across the EJB, the ActionForm
and the html form elements.
this allows you to call PropertyUtils.copyProperties(java.lang.Object
dest, java.lang.Object orig)
when you are ready to store the details entered by the user.

Please let me know if this does not sound right.

Cheers, 
Nick

> In future version of struts this may be enhanced.
> 
> -Rob
> 
> > Cameron Ingram0 wrote:
> >
> > I am in the process of convincing my company to go with MVC and Struts. As with 
>any thing new,
> > people are sometimes resistant
> > to change. One of the opposition questions I am getting is, how will this work 
>with EJB(problem is
> > I don't know too much about EJB currently).  Do the EJB's references just go in 
>the Form and
> > Action Bean and every thing else behaves the same? Are there any obvious points 
>that I can bring
> > up on the subject?
> > Any help on this subject would be much appreciated!
> >
> > Thanks, Cameron Ingram



Re: Stupd question about Struts and EJB.

2001-02-27 Thread Robert Leland

As far as struts 1.0, the Form bean is used only to redisplay
information to the jsp page. Typically the EJB might be loaded/unloaded in the
action class. If you search www.mail-archives.co,m Craig talked more about this in 
detail.

In future version of struts this may be enhanced.

-Rob

> Cameron Ingram0 wrote:
> 
> I am in the process of convincing my company to go with MVC and Struts. As with any 
>thing new,
> people are sometimes resistant
> to change. One of the opposition questions I am getting is, how will this work with 
>EJB(problem is
> I don't know too much about EJB currently).  Do the EJB's references just go in the 
>Form and
> Action Bean and every thing else behaves the same? Are there any obvious points that 
>I can bring
> up on the subject?
> Any help on this subject would be much appreciated!
> 
> Thanks, Cameron Ingram



Re: Stupd question about Struts and EJB.

2001-02-27 Thread Jim Richards


EJBs come in two flavours (as opposed to flavors), session beans and entity
beans.
Session beans represent business logic and rules, entity beans represent a
row in the database.

The model that you'd use is to have Actions do the basic processing of form
elements into data beans (just regular beans, nothing special), but no business
rules.
The Action then calls a session bean with the data bean to do something 
(eg. usdate user details in the database). The session bean connects to the
database with an entity bean (or more than one depending on the database
structure).

Visually, you'd have

JSP =>  Action  =>  Session Bean=> Entity Bean  => Database

Hope that helps.


At 06:37 AM 27/02/01 -0500, you wrote: 
>
> I am in the process of convincing my company to go with MVC and Struts. As
> with any thing new, people are sometimes resistant 
> to change. One of the opposition questions I am getting is, how will this
> work with EJB(problem is I don't know too much about EJB currently).  Do the
> EJB's references just go in the Form and Action Bean and every thing else
> behaves the same? Are there any obvious points that I can bring up on the
> subject? 
> Any help on this subject would be much appreciated!
>  
> Thanks, Cameron Ingram



--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html



Stupd question about Struts and EJB.

2001-02-27 Thread Cameron Ingram0



I am in the process of convincing my company to go with MVC 
and Struts. As with any thing new, people are sometimes resistant 
to change. One of the opposition questions I am getting is, 
how will this work with EJB(problem is I don't know too much about EJB 
currently).  Do the EJB's references just go in the Form and Action Bean 
and every thing else behaves the same? Are there any obvious points that I can 
bring up on the subject? 
Any help on this subject would be much 
appreciated!
 
Thanks, Cameron Ingram