SV: How to create an include which calls an action: jsp:include page=some action Really need help : The Answer!

2004-02-26 Thread Tommy Holm - TELMORE
What I did is the following. I have a master jsp and in this jsp I
inserted the following page.
tile:insert controllerUrl=/viewNavigation.do
page=/jsp/myJspPage.jsp/
Now there are two important things to consider. First in your action
mapping definition in this case viewNavigation.do you must add the
redirect=true to the foward attribute. If you do this, your navigation
action does not need to return null, if you don't add this attribute,
then your action must return null. The problem with the latter, is that
you can't call this action (viewNavigation.do) in any other way than
using the tile tag, because it will jus be a blank page.
Here is my action mapping!

action path=/viewNavigation scope=session name=someForm
type=something.web.controller..ViewMultiNavigationAction
  forward name=success path=/jsp/myJspPage.jsp
redirect=true /
/action 

On my jsp page it looks like this

Jsp start ***
Bla bla 
Bla bla 
tile:insert controllerUrl=/viewNavigation.do
page=/jsp/myJspPage.jsp/
Bla bla 
Bla bla 
Jsp end 

My action does not return null because of the redirect=true forward
name=success path=/jsp/myJspPage.jsp redirect=true /

Hope this helps
Cheers 
Tommy

-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sendt: 25. februar 2004 21:31
Til: Tommy Holm - TELMORE
Emne: SV: How to create an include which calls an action


I'm getting the following error. Can you send me an usage example. I
wonder if controller action returns jsp to include why should we give
page attribute again?

tiles:insert page=/cap/capGeneralInfoAction.ecims flush=true
/tiles:insert

Thanks,
Giri.
Old message from Tommy 
**
No currently none of the proposed solutions worked. I am currently
looking into the Tiles:insert tag Attributes are page = the jsp page to
insert And most importantly there is an controller attribute which
should be an action that perhaps prepares the jsp page. Just testing it
now  - HOLD ON - it works ... Check the tiles:insert tag

Alternatively I figured another way to do it, it's very ugly though, you
can jsp:include an action that just returns null.It does however set up
the bean. Then right after this include on your master jsp, you call
another jsp include that just includes a regular jsp, on this jsp you
can reference The bean that the first include prepared and work as
usual. I admitt the latter solution is very ugly, the tiles way seems to
be the  way to go! Cheers
/Tommy

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



jsp:include page=some action Really need help

2004-02-25 Thread Tommy Holm - TELMORE
Hi everyone.
I have already asked this once but didn't get any answer, I have tried
everything that I could think of but no luck, so if any of you have an
idea what to do, I would really be happy for any help.

I have a problem, I have a jsp page which should include the result of
an action call. The action should prepare the bean associated with the
action and render which then in the end should be included in the master
jsp.(The include is a menu, which the action should prepare). The
problem is that after the include, the rest of the JSP page is not
rendered. It does somehow make sense but is there anyway around this or
a common strategy to achieve this. Any help is greatly appreciated.
Cheers Kind regards Tommy 

Cheers
/Tommy

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



Re: jsp:include page=some action Really need help

2004-02-25 Thread Geeta Ramani
Also, have you looked at the source of the jsp (which is not rendered)?
Sometimes there are helpful error messages there which for whatever reason don't
show up on the browser.

Niall Pemberton wrote:

 Haven't done what you're trying - but isn't the problem that at the end of
 the action execute() the RequestProcessor will forward to whereever you tell
 it, which is probably why everything stops after that.

 What happens if you return 'null' from your execute() method instead of an
 ActionForward - or are you already doing that?

 Niall

 - Original Message -
 From: Tommy Holm - TELMORE [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 25, 2004 1:07 PM
 Subject: jsp:include page=some action Really need help

 Hi everyone.
 I have already asked this once but didn't get any answer, I have tried
 everything that I could think of but no luck, so if any of you have an
 idea what to do, I would really be happy for any help.

 I have a problem, I have a jsp page which should include the result of
 an action call. The action should prepare the bean associated with the
 action and render which then in the end should be included in the master
 jsp.(The include is a menu, which the action should prepare). The
 problem is that after the include, the rest of the JSP page is not
 rendered. It does somehow make sense but is there anyway around this or
 a common strategy to achieve this. Any help is greatly appreciated.
 Cheers Kind regards Tommy

 Cheers
 /Tommy

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



SV: jsp:include page=some action Really need help

2004-02-25 Thread Tommy Holm - TELMORE
Thx for your reply but if you don't foward to a jsp page, the jsp page
never gets rendered and  nothing is inserted in the main jsp page!
Cheers



-Oprindelig meddelelse-
Fra: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sendt: 25. februar 2004 14:18
Til: Struts Users Mailing List
Emne: Re: jsp:include page=some action Really need help


Haven't done what you're trying - but isn't the problem that at the end
of the action execute() the RequestProcessor will forward to whereever
you tell it, which is probably why everything stops after that.

What happens if you return 'null' from your execute() method instead of
an ActionForward - or are you already doing that?

Niall

- Original Message - 
From: Tommy Holm - TELMORE [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 1:07 PM
Subject: jsp:include page=some action Really need help


Hi everyone.
I have already asked this once but didn't get any answer, I have tried
everything that I could think of but no luck, so if any of you have an
idea what to do, I would really be happy for any help.

I have a problem, I have a jsp page which should include the result of
an action call. The action should prepare the bean associated with the
action and render which then in the end should be included in the master
jsp.(The include is a menu, which the action should prepare). The
problem is that after the include, the rest of the JSP page is not
rendered. It does somehow make sense but is there anyway around this or
a common strategy to achieve this. Any help is greatly appreciated.
Cheers Kind regards Tommy

Cheers
/Tommy

-
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: jsp:include page=some action Really need help

2004-02-25 Thread Niall Pemberton
OK but I think the forward is causing the problem. Looking at the request
processor you need to specify an include in your struts-config.xml action
mapping instead of a forward.

action .
include=myMenu.jsp/
/action

- Original Message - 
From: Tommy Holm - TELMORE [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 1:27 PM
Subject: SV: jsp:include page=some action Really need help


Thx for your reply but if you don't foward to a jsp page, the jsp page
never gets rendered and  nothing is inserted in the main jsp page!
Cheers

-Oprindelig meddelelse-
Fra: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sendt: 25. februar 2004 14:18
Til: Struts Users Mailing List
Emne: Re: jsp:include page=some action Really need help


Haven't done what you're trying - but isn't the problem that at the end
of the action execute() the RequestProcessor will forward to whereever
you tell it, which is probably why everything stops after that.

What happens if you return 'null' from your execute() method instead of
an ActionForward - or are you already doing that?

Niall

- Original Message - 
From: Tommy Holm - TELMORE [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 1:07 PM
Subject: jsp:include page=some action Really need help


Hi everyone.
I have already asked this once but didn't get any answer, I have tried
everything that I could think of but no luck, so if any of you have an
idea what to do, I would really be happy for any help.

I have a problem, I have a jsp page which should include the result of
an action call. The action should prepare the bean associated with the
action and render which then in the end should be included in the master
jsp.(The include is a menu, which the action should prepare). The
problem is that after the include, the rest of the JSP page is not
rendered. It does somehow make sense but is there anyway around this or
a common strategy to achieve this. Any help is greatly appreciated.
Cheers Kind regards Tommy

Cheers
/Tommy

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