You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Deep Chand <dg...@gmail.com> on 2005/10/09 18:36:48 UTC

JSP/design/flow question.

I'm new to Struts. I've a form asking for customer data with fields
like name, address etc.  What I want is this kind of flow/design:

Page1) Customer enters their info. Submit button will take them to Page2.
Page2) They are asked to verify the same info again with read only
fields. Two buttons will be there, Confirm/Submit and Change. Change
will take them to Page1 and Confirm/Submit will take them to Page3.
Page3) The info is displayed to them again after entering it into the DB.

So, my question is do I need three JSP pages for this kind of design
or is their any other way to just do it with two JSP pages. One for
entering data and other for Page2 and Page3.

Please reply.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSP/design/flow question.

Posted by Ted Husted <te...@gmail.com>.
+1

On 10/20/05, Borislav Sabev <b....@eventsoft.de> wrote:
> Take a look at struts-layout - http://struts.application-servers.com/.
> Using it you can have only one jsp for both page 1 and page 2 (form mode
> changes) - using it saves you the time to synch changes between page 1
> and page 2.
> You can specify the form mode in your action class depending on the
> submit parameter for example.

--  HTH, Ted.
http://www.husted.com/poe/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Question about ActionForward.setRedirect method

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
I have to make some educated guesses here, because I don't know the full
Struts lineage at that early stage (didn't start using it until 1.1)...

The message your seeing is because the forward configs are frozen once
they are read in.  Recall that, like Actions, there is one instance for
any given forward config and this is shared by all requests.  If you could
alter them in one request, you could adversely affect another.

My *guess* is that the configuration freezing was added after 1.0.2.  I
don't know that for sure though.  In any case, it is certainly the case in
1.2.7.

The way to deal with this is to return an ActionRedirect from your Action
instead.  One of the constructors for that class takes in a ForwardConfig,
so what you can do is:

ForwardConfig f = new ActionRedirect(mapping.findForward("whatever"));
f.setRedirect(true);
return f;

Alternatively, you could just have new mappings in struts-config that are
defined as redirects, so you could just remove that setRedirect() call
entirely.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Mon, October 24, 2005 9:41 am, pantichd@firstenergycorp.com said:
> Hello,
>
> I'm converting my struts apps from version 1.0.2 to 1.2.7.
>
> In my 1.0.2 app I can call ActionForward.setRedirect method and pass it
> "true" with no problem. When running with 1.2.7 it generates the following
> error.
>
>    Error [javax.servlet.ServletException: Configuration is frozen], with
>    root cause [java.lang.IllegalStateException: Configuration is frozen].
>
>
> Can someone please explain why?
>
> Thanks!
>
>
> David
>
>
> -----------------------------------------
> The information contained in this message is intended only for the
> personal and confidential use of the recipient(s) named above. If the
> reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you have received this document in error and that any
> review, dissemination, distribution, or copying of this message is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately, and delete the original message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Question about ActionForward.setRedirect method

Posted by pa...@firstenergycorp.com.
Hello,

I'm converting my struts apps from version 1.0.2 to 1.2.7.

In my 1.0.2 app I can call ActionForward.setRedirect method and pass it
"true" with no problem. When running with 1.2.7 it generates the following
error.

   Error [javax.servlet.ServletException: Configuration is frozen], with
   root cause [java.lang.IllegalStateException: Configuration is frozen].


Can someone please explain why?

Thanks!


David


-----------------------------------------
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Looking for instructions on migrating from Struts 1.0.2 to 1.2.7

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: <pa...@firstenergycorp.com>

> Can anyone point me to some documentation that helps you migrate Struts
> apps from version 1.0.2 to 1.2.7?

Unfortunately, I don't think anyone has contributed anything on upgrading 
from Struts 1.0 yet:
   http://wiki.apache.org/struts/StrutsUpgrade

Your best bet is to review the release notes for each version in between the 
two you're working with.  Start here and work backwards using the links in 
the first line of each page:
   http://struts.apache.org/struts-core/userGuide/release-notes.html

A useful exercise might be to take an example app from 1.0.2 and convert it 
to 1.2.7.  Then post your notes on the Wiki. :)

-- 
Wendy Smoak 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Looking for instructions on migrating from Struts 1.0.2 to 1.2.7

Posted by pa...@firstenergycorp.com.
Hello,

Can anyone point me to some documentation that helps you migrate Struts
apps from version 1.0.2 to 1.2.7?

Thanks in advance for any help.


-----------------------------------------
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately, and delete the original message.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSP/design/flow question.

Posted by Borislav Sabev <b....@eventsoft.de>.
Deep Chand wrote:

>I'm new to Struts. I've a form asking for customer data with fields
>like name, address etc.  What I want is this kind of flow/design:
>
>Page1) Customer enters their info. Submit button will take them to Page2.
>Page2) They are asked to verify the same info again with read only
>fields. Two buttons will be there, Confirm/Submit and Change. Change
>will take them to Page1 and Confirm/Submit will take them to Page3.
>Page3) The info is displayed to them again after entering it into the DB.
>
>So, my question is do I need three JSP pages for this kind of design
>or is their any other way to just do it with two JSP pages. One for
>entering data and other for Page2 and Page3.
>
>Please reply.
>
>  
>
Take a look at struts-layout - http://struts.application-servers.com/. 
Using it you can have only one jsp for both page 1 and page 2 (form mode 
changes) - using it saves you the time to synch changes between page 1 
and page 2.
You can specify the form mode in your action class depending on the 
submit parameter for example.
Borislav

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSP/design/flow question.

Posted by Dakota Jack <da...@gmail.com>.
There would not be anything particular wrong, all things being equal,
to having all three of these on one page.  This is fairly simple and
you don't need the strutsdialogs, which is not connected to Struts,
"Rube Goldberg" setup.  If you are not aware of the use of tags for
logic, take a look at that.



On 10/20/05, Michael Jouravlev <jm...@gmail.com> wrote:
> The best way would be to have one location. Number of JSPs is irrelevant.
> http://struts.sourceforge.net/strutsdialogs/wizardaction.html
>
> Michael.
>
> --
> Struts Dialogs
> http://struts.sourceforge.net/strutsdialogs
>
> On 10/9/05, Leon Rosenberg <ro...@googlemail.com> wrote:
> > Actually, it's your choice. If you wish you can serve all three pages
> > from a single JSP. Probably it would be nearest to best practices to
> > make 2 and 3 one jsp. I think the "best" way, would be to have Page2
> > und Page 3 as separate JSPs, but using a common tile for data
> > presentation.
> >
> > Regards
> > Leon
> >
> > On 10/9/05, Deep Chand <dg...@gmail.com> wrote:
> > > I'm new to Struts. I've a form asking for customer data with fields
> > > like name, address etc.  What I want is this kind of flow/design:
> > >
> > > Page1) Customer enters their info. Submit button will take them to Page2.
> > > Page2) They are asked to verify the same info again with read only
> > > fields. Two buttons will be there, Confirm/Submit and Change. Change
> > > will take them to Page1 and Confirm/Submit will take them to Page3.
> > > Page3) The info is displayed to them again after entering it into the DB.
> > >
> > > So, my question is do I need three JSP pages for this kind of design
> > > or is their any other way to just do it with two JSP pages. One for
> > > entering data and other for Page2 and Page3.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSP/design/flow question.

Posted by Michael Jouravlev <jm...@gmail.com>.
The best way would be to have one location. Number of JSPs is irrelevant.
http://struts.sourceforge.net/strutsdialogs/wizardaction.html

Michael.

--
Struts Dialogs
http://struts.sourceforge.net/strutsdialogs

On 10/9/05, Leon Rosenberg <ro...@googlemail.com> wrote:
> Actually, it's your choice. If you wish you can serve all three pages
> from a single JSP. Probably it would be nearest to best practices to
> make 2 and 3 one jsp. I think the "best" way, would be to have Page2
> und Page 3 as separate JSPs, but using a common tile for data
> presentation.
>
> Regards
> Leon
>
> On 10/9/05, Deep Chand <dg...@gmail.com> wrote:
> > I'm new to Struts. I've a form asking for customer data with fields
> > like name, address etc.  What I want is this kind of flow/design:
> >
> > Page1) Customer enters their info. Submit button will take them to Page2.
> > Page2) They are asked to verify the same info again with read only
> > fields. Two buttons will be there, Confirm/Submit and Change. Change
> > will take them to Page1 and Confirm/Submit will take them to Page3.
> > Page3) The info is displayed to them again after entering it into the DB.
> >
> > So, my question is do I need three JSP pages for this kind of design
> > or is their any other way to just do it with two JSP pages. One for
> > entering data and other for Page2 and Page3.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSP/design/flow question.

Posted by Leon Rosenberg <ro...@googlemail.com>.
Actually, it's your choice. If you wish you can serve all three pages
from a single JSP. Probably it would be nearest to best practices to
make 2 and 3 one jsp. I think the "best" way, would be to have Page2
und Page 3 as separate JSPs, but using a common tile for data
presentation.

Regards
Leon

On 10/9/05, Deep Chand <dg...@gmail.com> wrote:
> I'm new to Struts. I've a form asking for customer data with fields
> like name, address etc.  What I want is this kind of flow/design:
>
> Page1) Customer enters their info. Submit button will take them to Page2.
> Page2) They are asked to verify the same info again with read only
> fields. Two buttons will be there, Confirm/Submit and Change. Change
> will take them to Page1 and Confirm/Submit will take them to Page3.
> Page3) The info is displayed to them again after entering it into the DB.
>
> So, my question is do I need three JSP pages for this kind of design
> or is their any other way to just do it with two JSP pages. One for
> entering data and other for Page2 and Page3.
>
> Please reply.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org