RE: [OT] RE: action include or forward attribute not working?

2002-10-14 Thread Chappell, Simon P

No one said life is fair. Even if I find myself in the minority, I still have no 
problem with *.jsp. The trick is to know which is the best use for which tool. Direct 
calls to JSP can be fine if there is no pre-processing required on a page. Any page 
that needs any setup should be called through an appropriate action.
 
Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:26 PM
To: Struts Users Mailing List
Subject: [OT] RE: action include or forward attribute not working?


I remember a fellow posting a link to his struts site and everyone went off on him for 
having jsp urls ;-)

-Original Message- 
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 3:24 PM 
To: Struts Users Mailing List 
Cc: 
Subject: RE: action include or forward attribute not working?



Actually, I have no problem seeing *.jsp. MVC only requires that the Model, View and 
Controller be separated. Using a mix of *.do and *.jsp is not going to violate MVC.

For simple pages that require no pre-processing, we used direct calls to the JSP.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:19 PM
To: Struts Users Mailing List
Subject: RE: action include or forward attribute not working?


Kael, this is MVC, you should never see *.jsp ;-)

We went over this before in lab

-Original Message-
From: Teh, Kah Loong
Sent: Mon 10/14/2002 3:15 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



like you said, since you don't need an action 
try using html:link
i.e., html:link page=/registration.jsp register here /html:link

-kael Teh

-Original Message-
From: Andy Kriger [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:16 PM
To: Struts Users Mailing List
Subject: action include or forward attribute not working?


I am setting up the following: a JSP containing a form; the submit
action of the JSP calls a Struts Action class. Since I don't really need
an action simply to forward to the JSP, I thought I'd use the action
include or foward attribute which seems to accomplish this. But I can't
make it work.

Here is the struts-config entry...

action path=/Registration
forward=/registration.jsp
/action

I would expect that /Registration.do would open registration.jsp

Instead I get '500 No action instance for path /Registration could be
created'

Any ideas?

thx
andy




--
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: [OT] RE: action include or forward attribute not working?

2002-10-14 Thread Hookom, Jacob John

but it is that presumption that could be faulty down the road and all pages that link 
to that resource must be fixed.  If you essentially pass through a filter layer, you 
can inject different logic down the road via the Facade pattern.  Employees.do might 
just be an action forward to a jsp, but a month down the road, we change the jsp to a 
servlet or xml-xsl page and there is no need to change the referencing pages.

-Original Message- 
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 3:30 PM 
To: Struts Users Mailing List 
Cc: 
Subject: RE: [OT] RE: action include or forward attribute not working?



No one said life is fair. Even if I find myself in the minority, I still have 
no problem with *.jsp. The trick is to know which is the best use for which tool. 
Direct calls to JSP can be fine if there is no pre-processing required on a page. Any 
page that needs any setup should be called through an appropriate action.

Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:26 PM
To: Struts Users Mailing List
Subject: [OT] RE: action include or forward attribute not working?


I remember a fellow posting a link to his struts site and everyone went off on 
him for having jsp urls ;-)

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 3:24 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



Actually, I have no problem seeing *.jsp. MVC only requires that the Model, 
View and Controller be separated. Using a mix of *.do and *.jsp is not going to 
violate MVC.

For simple pages that require no pre-processing, we used direct calls to the 
JSP.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:19 PM
To: Struts Users Mailing List
Subject: RE: action include or forward attribute not working?


Kael, this is MVC, you should never see *.jsp ;-)

We went over this before in lab

-Original Message-
From: Teh, Kah Loong
Sent: Mon 10/14/2002 3:15 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



like you said, since you don't need an action 
try using html:link
i.e., html:link page=/registration.jsp register here /html:link

-kael Teh

-Original Message-
From: Andy Kriger [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:16 PM
To: Struts Users Mailing List
Subject: action include or forward attribute not working?


I am setting up the following: a JSP containing a form; the submit
action of the JSP calls a Struts Action class. Since I don't really need
an action simply to forward to the JSP, I thought I'd use the action
include or foward attribute which seems to accomplish this. But I can't
make it work.

Here is the struts-config entry...

action path=/Registration
forward=/registration.jsp
/action

I would expect that /Registration.do would open registration.jsp

Instead I get '500 No action instance for path /Registration could be
created'

Any ideas?

thx
andy




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








winmail.dat
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: [OT] RE: action include or forward attribute not working?

2002-10-14 Thread Chappell, Simon P

Ok, then I'll make the change when I need it. Refactoring is not reserved for code 
only. You can refactor at the application logic level as well. Is it a little more 
work? Yes, but to quote those XP folks, You Don't Need It Yet!. And the extension of 
this would be that you may never need it. Are we likely to take out the logon.jsp 
page? No, do we call it from within action mappings? yes, but our splash page calls it 
directly. Is this going to be a huge pain to change? no, and I'd consider betting that 
it may never change.
 
Theory is a wonderful thing, young Skywalker, but experience gives you the ability to 
see where theory doesn't cut it and where good old fashioned straight-forwardness is 
going to win out. Experience also gives you a feel for what isn't ever going to be 
changed. You see, code that is good enough is almost NEVER changed. There are just too 
many other things that need attention to worry about every little not quite 
theoretically perfect yet working just fine thankyou details.
 
If we were that concerned about doing things right in IS, we'd have shot the designers 
of RPG along time ago! ;-)
 
Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:34 PM
To: Struts Users Mailing List
Subject: RE: [OT] RE: action include or forward attribute not working?


but it is that presumption that could be faulty down the road and all pages that link 
to that resource must be fixed.  If you essentially pass through a filter layer, you 
can inject different logic down the road via the Facade pattern.  Employees.do might 
just be an action forward to a jsp, but a month down the road, we change the jsp to a 
servlet or xml-xsl page and there is no need to change the referencing pages.

-Original Message- 
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent: Mon 10/14/2002 3:30 PM 
To: Struts Users Mailing List 
Cc: 
Subject: RE: [OT] RE: action include or forward attribute not working?



No one said life is fair. Even if I find myself in the minority, I still have no 
problem with *.jsp. The trick is to know which is the best use for which tool. Direct 
calls to JSP can be fine if there is no pre-processing required on a page. Any page 
that needs any setup should be called through an appropriate action.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:26 PM
To: Struts Users Mailing List
Subject: [OT] RE: action include or forward attribute not working?


I remember a fellow posting a link to his struts site and everyone went off on him for 
having jsp urls ;-)

-Original Message-
From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 3:24 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



Actually, I have no problem seeing *.jsp. MVC only requires that the Model, View and 
Controller be separated. Using a mix of *.do and *.jsp is not going to violate MVC.

For simple pages that require no pre-processing, we used direct calls to the JSP.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:19 PM
To: Struts Users Mailing List
Subject: RE: action include or forward attribute not working?


Kael, this is MVC, you should never see *.jsp ;-)

We went over this before in lab

-Original Message-
From: Teh, Kah Loong
Sent: Mon 10/14/2002 3:15 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



like you said, since you don't need an action 
try using html:link
i.e., html:link page=/registration.jsp register here /html:link

-kael Teh

-Original Message-
From: Andy Kriger [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:16 PM
To: Struts Users Mailing List
Subject: action include or forward attribute not working?


I am setting up the following: a JSP containing a form; the submit
action of the JSP calls a Struts Action class. Since I don't really need
an action simply to forward to the JSP, I thought I'd use the action
include or foward attribute which seems to accomplish this. But I can't
make it work.

Here is the struts-config entry...

action path=/Registration
forward=/registration.jsp
/action

I would expect that /Registration.do would open registration.jsp

Instead I get '500 No action instance for path /Registration could be
created'

Any ideas?

thx
andy




--
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: [OT] RE: action include or forward attribute not working?

2002-10-14 Thread David Graham

I agree with the XP notion of not building things for 5 years down the road 
when you don't need them now.  However, is it that hard to do this in your 
struts-config.xml?:

global-forwards
forward name=login path=/login.jsp /
/global-forwards

action path=/login
type=org.apache.struts.actions.ForwardAction
parameter=/login.jsp/

Seems pretty simple to me.

Dave


From: Chappell, Simon P [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: [OT] RE: action include or forward attribute not working?
Date: Mon, 14 Oct 2002 15:49:20 -0500

Ok, then I'll make the change when I need it. Refactoring is not reserved 
for code only. You can refactor at the application logic level as well. Is 
it a little more work? Yes, but to quote those XP folks, You Don't Need It 
Yet!. And the extension of this would be that you may never need it. Are 
we likely to take out the logon.jsp page? No, do we call it from within 
action mappings? yes, but our splash page calls it directly. Is this going 
to be a huge pain to change? no, and I'd consider betting that it may never 
change.

Theory is a wonderful thing, young Skywalker, but experience gives you the 
ability to see where theory doesn't cut it and where good old fashioned 
straight-forwardness is going to win out. Experience also gives you a feel 
for what isn't ever going to be changed. You see, code that is good enough 
is almost NEVER changed. There are just too many other things that need 
attention to worry about every little not quite theoretically perfect yet 
working just fine thankyou details.

If we were that concerned about doing things right in IS, we'd have shot 
the designers of RPG along time ago! ;-)

Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:34 PM
To: Struts Users Mailing List
Subject: RE: [OT] RE: action include or forward attribute not working?


but it is that presumption that could be faulty down the road and all pages 
that link to that resource must be fixed.  If you essentially pass through 
a filter layer, you can inject different logic down the road via the Facade 
pattern.  Employees.do might just be an action forward to a jsp, but a 
month down the road, we change the jsp to a servlet or xml-xsl page and 
there is no need to change the referencing pages.

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 3:30 PM
To: Struts Users Mailing List
Cc:
Subject: RE: [OT] RE: action include or forward attribute not working?



No one said life is fair. Even if I find myself in the minority, I still 
have no problem with *.jsp. The trick is to know which is the best use for 
which tool. Direct calls to JSP can be fine if there is no pre-processing 
required on a page. Any page that needs any setup should be called through 
an appropriate action.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:26 PM
To: Struts Users Mailing List
Subject: [OT] RE: action include or forward attribute not working?


I remember a fellow posting a link to his struts site and everyone went off 
on him for having jsp urls ;-)

-Original Message-
From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 3:24 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



Actually, I have no problem seeing *.jsp. MVC only requires that the Model, 
View and Controller be separated. Using a mix of *.do and *.jsp is not 
going to violate MVC.

For simple pages that require no pre-processing, we used direct calls to 
the JSP.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:19 PM
To: Struts Users Mailing List
Subject: RE: action include or forward attribute not working?


Kael, this is MVC, you should never see *.jsp ;-)

We went over this before in lab

-Original Message-
From: Teh, Kah Loong
Sent: Mon 10/14/2002 3:15 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



like you said, since you don't need an action 
try using html:link
i.e., html:link page=/registration.jsp register here /html:link

-kael Teh

-Original Message-
From: Andy Kriger [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:16 PM
To: Struts Users Mailing List
Subject: action include or forward attribute not working?


I am setting up the following: a JSP containing a form; the submit
action of the JSP calls a Struts Action class. Since I don't really need
an action simply to forward to the JSP, I thought I'd use the action
include or foward attribute which seems to accomplish this. But I can't
make it work.

Here is the struts-config entry...

action path=/Registration

RE: [OT] RE: action include or forward attribute not working?

2002-10-14 Thread Chappell, Simon P

It's not only simple, but we did it. The success forward from logout.do calls exactly 
what you have there. My point was that our splash page calls it directly and that was 
one of our early pages and it works and no one has or is likely to change it. When/if 
it ever becomes an issue, it'll be refactored faster than you can say Martin Fowler, 
but not until then.

I know that I'm stubborn on this point, but we have a system that works and a business 
sponsor who smiles when she sees our system, so how wrong can I be? ;-) Being 
pragmatic is as useful as being up to date on every pattern and slick technique, in my 
Humble Opinion. :-)

Simon

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: RE: [OT] RE: action include or forward attribute not working?


I agree with the XP notion of not building things for 5 years 
down the road 
when you don't need them now.  However, is it that hard to do 
this in your 
struts-config.xml?:

global-forwards
forward name=login path=/login.jsp /
/global-forwards

action path=/login
   type=org.apache.struts.actions.ForwardAction
   parameter=/login.jsp/

Seems pretty simple to me.

Dave


From: Chappell, Simon P [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: [OT] RE: action include or forward attribute not working?
Date: Mon, 14 Oct 2002 15:49:20 -0500

Ok, then I'll make the change when I need it. Refactoring is 
not reserved 
for code only. You can refactor at the application logic 
level as well. Is 
it a little more work? Yes, but to quote those XP folks, You 
Don't Need It 
Yet!. And the extension of this would be that you may never 
need it. Are 
we likely to take out the logon.jsp page? No, do we call it 
from within 
action mappings? yes, but our splash page calls it directly. 
Is this going 
to be a huge pain to change? no, and I'd consider betting 
that it may never 
change.

Theory is a wonderful thing, young Skywalker, but experience 
gives you the 
ability to see where theory doesn't cut it and where good old 
fashioned 
straight-forwardness is going to win out. Experience also 
gives you a feel 
for what isn't ever going to be changed. You see, code that 
is good enough 
is almost NEVER changed. There are just too many other things 
that need 
attention to worry about every little not quite 
theoretically perfect yet 
working just fine thankyou details.

If we were that concerned about doing things right in IS, 
we'd have shot 
the designers of RPG along time ago! ;-)

Simon

-Original Message-
From: Hookom, Jacob John [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:34 PM
To: Struts Users Mailing List
Subject: RE: [OT] RE: action include or forward attribute not working?


but it is that presumption that could be faulty down the road 
and all pages 
that link to that resource must be fixed.  If you essentially 
pass through 
a filter layer, you can inject different logic down the road 
via the Facade 
pattern.  Employees.do might just be an action forward to a 
jsp, but a 
month down the road, we change the jsp to a servlet or 
xml-xsl page and 
there is no need to change the referencing pages.

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 3:30 PM
To: Struts Users Mailing List
Cc:
Subject: RE: [OT] RE: action include or forward attribute not working?



No one said life is fair. Even if I find myself in the 
minority, I still 
have no problem with *.jsp. The trick is to know which is the 
best use for 
which tool. Direct calls to JSP can be fine if there is no 
pre-processing 
required on a page. Any page that needs any setup should be 
called through 
an appropriate action.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:26 PM
To: Struts Users Mailing List
Subject: [OT] RE: action include or forward attribute not working?


I remember a fellow posting a link to his struts site and 
everyone went off 
on him for having jsp urls ;-)

-Original Message-
From: Chappell, Simon P [ mailto:[EMAIL PROTECTED]]
Sent: Mon 10/14/2002 3:24 PM
To: Struts Users Mailing List
Cc:
Subject: RE: action include or forward attribute not working?



Actually, I have no problem seeing *.jsp. MVC only requires 
that the Model, 
View and Controller be separated. Using a mix of *.do and 
*.jsp is not 
going to violate MVC.

For simple pages that require no pre-processing, we used 
direct calls to 
the JSP.

Simon

-Original Message-
From: Hookom, Jacob John [ mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:19 PM
To: Struts Users Mailing List
Subject: RE: action include or forward attribute not working?


Kael, this is MVC, you should never see *.jsp ;-)

We went over this before in lab