You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Boland <bo...@attbi.com> on 2002/03/19 02:03:47 UTC

Migrating from 1.0.2 to 1.1: servlet initialization parameter questions

Feel free to give snappy answers to stupid questions.
 
(1) In my Struts 1.0 web application, I had set the forward init
parameter for the ActionServlet to a custom one that all my forwards
would use as a base class. This custom class extended the ActionForward
class. While testing a migration to 1.1 (nightly build) my application
now throws ClassCastExceptions when I attempt to cast an ActionForward
returned from ActionMapping.findForward() to my custom base class as it
is no longer creating the forwards using the custom class I specified in
the forward init parameter. The documentation states that this has been
DEPRECATED in favor of placing a className attribute in each defined
forward.

I looked through the source for the nightly build and cannot even find
anything that looks for this init parameter anymore. My assumption is
that this has not been DEPRECATED but REMOVED and you can no longer
define a custom base class for the ActionForward. If you still can, I'm
puzzled as to how to do this. So...it looks like I will have to add the
className to each forward tag in the struts-config.xml. Is this correct?

If so, it seems like we lost a feature here. Maybe there's good reason
for this so I thought I'd find out. In any case, it properly would be
good to add these changes to the release notes and change the
ActionServlet documentation to indicate that this (and other) init
parameters have been removed and no longer function as they did with
1.0.2. Also, the user guide refers to many of these parameters and this
documentation also need to be updated.

(2) As I was looking at the ActionServlet Javadoc I noticed mention of
many other init parameters that have been DEPRECATED and are now
entrusted to the <controller> element of the struts-config.xml. Other
than the .dtd and the Javadoc for the ControllerConfig class, I didn't
notice many other documentation changes to reflect this. Minimally, I
think the struts-config.xml in the struts-blank.war or
struts-example.war should expose (and show an example of) this new
element in the struts-config.xml as developers migrating their
applications will probably ask the same question. Am I missing some
documentation that explains these and other issues when migrating from
1.0.x to 1.1? 

An idea as I was writing this: Have the ActionServlet in 1.1 log any
init parameters that have been set but are no longer used. This could
include some troubleshooting message (i.e. move the value to the
<controller> element).

Thanks in advance for any assistance.

bill boland



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Migrating from 1.0.2 to 1.1: servlet initialization parameter questions

Posted by Bill Boland <bo...@attbi.com>.
Thanks, Ted. I'll try my hand at bugzilla. 

-----Original Message-----
From: Ted Husted [mailto:husted@apache.org] 
Sent: Tuesday, March 19, 2002 12:01 PM
To: Struts Users Mailing List
Subject: Re: Migrating from 1.0.2 to 1.1: servlet initialization
parameter questions

Unfortunately, there are a great number of new features in 1.1 that are
under-documented. 

If I can get through two more things this week, I'll be bringing some
more applications over myself, and will be able to translate my
experiences into more documentation. 

The best thing is to start making enhacements requests in bugzilla, to
help point out where we are lacking information.

In the vast majority of cases, the changes to allow modular applications
should be backwardly compatible from the source code's POV, but a lot of
the underpinnnings have changed. (Reminds me of a grocery store, just
when I figure out where everything is, they move it all around :o)

-- 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


Bill Boland wrote:
> 
> Feel free to give snappy answers to stupid questions.
> 
> (1) In my Struts 1.0 web application, I had set the forward init
> parameter for the ActionServlet to a custom one that all my forwards
> would use as a base class. This custom class extended the
ActionForward
> class. While testing a migration to 1.1 (nightly build) my application
> now throws ClassCastExceptions when I attempt to cast an ActionForward
> returned from ActionMapping.findForward() to my custom base class as
it
> is no longer creating the forwards using the custom class I specified
in
> the forward init parameter. The documentation states that this has
been
> DEPRECATED in favor of placing a className attribute in each defined
> forward.
> 
> I looked through the source for the nightly build and cannot even find
> anything that looks for this init parameter anymore. My assumption is
> that this has not been DEPRECATED but REMOVED and you can no longer
> define a custom base class for the ActionForward. If you still can,
I'm
> puzzled as to how to do this. So...it looks like I will have to add
the
> className to each forward tag in the struts-config.xml. Is this
correct?
> 
> If so, it seems like we lost a feature here. Maybe there's good reason
> for this so I thought I'd find out. In any case, it properly would be
> good to add these changes to the release notes and change the
> ActionServlet documentation to indicate that this (and other) init
> parameters have been removed and no longer function as they did with
> 1.0.2. Also, the user guide refers to many of these parameters and
this
> documentation also need to be updated.
> 
> (2) As I was looking at the ActionServlet Javadoc I noticed mention of
> many other init parameters that have been DEPRECATED and are now
> entrusted to the <controller> element of the struts-config.xml. Other
> than the .dtd and the Javadoc for the ControllerConfig class, I didn't
> notice many other documentation changes to reflect this. Minimally, I
> think the struts-config.xml in the struts-blank.war or
> struts-example.war should expose (and show an example of) this new
> element in the struts-config.xml as developers migrating their
> applications will probably ask the same question. Am I missing some
> documentation that explains these and other issues when migrating from
> 1.0.x to 1.1?
> 
> An idea as I was writing this: Have the ActionServlet in 1.1 log any
> init parameters that have been set but are no longer used. This could
> include some troubleshooting message (i.e. move the value to the
> <controller> element).
> 
> Thanks in advance for any assistance.
> 
> bill boland
> 
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Migrating from 1.0.2 to 1.1: servlet initialization parameter questions

Posted by Ted Husted <hu...@apache.org>.
Unfortunately, there are a great number of new features in 1.1 that are
under-documented. 

If I can get through two more things this week, I'll be bringing some
more applications over myself, and will be able to translate my
experiences into more documentation. 

The best thing is to start making enhacements requests in bugzilla, to
help point out where we are lacking information.

In the vast majority of cases, the changes to allow modular applications
should be backwardly compatible from the source code's POV, but a lot of
the underpinnnings have changed. (Reminds me of a grocery store, just
when I figure out where everything is, they move it all around :o)

-- 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


Bill Boland wrote:
> 
> Feel free to give snappy answers to stupid questions.
> 
> (1) In my Struts 1.0 web application, I had set the forward init
> parameter for the ActionServlet to a custom one that all my forwards
> would use as a base class. This custom class extended the ActionForward
> class. While testing a migration to 1.1 (nightly build) my application
> now throws ClassCastExceptions when I attempt to cast an ActionForward
> returned from ActionMapping.findForward() to my custom base class as it
> is no longer creating the forwards using the custom class I specified in
> the forward init parameter. The documentation states that this has been
> DEPRECATED in favor of placing a className attribute in each defined
> forward.
> 
> I looked through the source for the nightly build and cannot even find
> anything that looks for this init parameter anymore. My assumption is
> that this has not been DEPRECATED but REMOVED and you can no longer
> define a custom base class for the ActionForward. If you still can, I'm
> puzzled as to how to do this. So...it looks like I will have to add the
> className to each forward tag in the struts-config.xml. Is this correct?
> 
> If so, it seems like we lost a feature here. Maybe there's good reason
> for this so I thought I'd find out. In any case, it properly would be
> good to add these changes to the release notes and change the
> ActionServlet documentation to indicate that this (and other) init
> parameters have been removed and no longer function as they did with
> 1.0.2. Also, the user guide refers to many of these parameters and this
> documentation also need to be updated.
> 
> (2) As I was looking at the ActionServlet Javadoc I noticed mention of
> many other init parameters that have been DEPRECATED and are now
> entrusted to the <controller> element of the struts-config.xml. Other
> than the .dtd and the Javadoc for the ControllerConfig class, I didn't
> notice many other documentation changes to reflect this. Minimally, I
> think the struts-config.xml in the struts-blank.war or
> struts-example.war should expose (and show an example of) this new
> element in the struts-config.xml as developers migrating their
> applications will probably ask the same question. Am I missing some
> documentation that explains these and other issues when migrating from
> 1.0.x to 1.1?
> 
> An idea as I was writing this: Have the ActionServlet in 1.1 log any
> init parameters that have been set but are no longer used. This could
> include some troubleshooting message (i.e. move the value to the
> <controller> element).
> 
> Thanks in advance for any assistance.
> 
> bill boland
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>