Hi Tom,

Yes, doing it that way, it works. But it will execute the action without loading
the JahiaData within the request.

I looked closer to the ParamBean, there is a method called composeStrutsUrl. It
composes an URL containing the current parameter settings like the PID.
Unfortunately it does not execute my action (bug?).

Caused by lack of time, I did a little workaround and invented a new reserved
parameter "action/<name of action-mapping until next reserved keyword>". If the
parameter is set, I use a "NestedActionProcessor" inside the org.jahia.bin.Jahia
(ActionServlet) to trigger my action (after JahiaData is build). That way, I
have complete content access and can control the action's result (e.g.
forwards). After that, I thought about it and found out it may be a useful
functionality to deal with CMS-based actions, wouldn't it?

So the workaround currently works for my tasks.

Greetings

PS: Sorry about the second thread opened by the German "AW:" in the mail's
subject. I hope this answer subordinates.

-------------------------[Robert Gacki]------------------------
mail:[EMAIL PROTECTED]: +49 09131 97792-0
web : http://www.spiritlink.de           fax: +49 09131 9779257
---- SPIRIT LINK GMBH::PAUL-GORDAN-STR. 13::91052 ERLANGEN ---- 
________________________________________
Von: tom * [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 27. Januar 2006 16:12
An: [email protected]
Betreff: Re: Using Struts forms inside a Jahia request

Have you tried to just put <form action="/jahia/MyTest.do"></form> as a form
tag?
And not to use the html:form tag.
 
Depends on what you want to do with your struts form, but this worked out for
us.
 
regards,
Tom


 
On 25/01/06, Robert Gacki <[EMAIL PROTECTED]> wrote: 
Hello,

I have to use Struts actions to process forms. These forms must be defined
within templates, surrounded by Jahia content. It is mandatory too, that I am 
able to pass values to the action defined within the CMS (e.g. e-mail addresses
for a mail form). For testing, I defined an action mapping and created a form.
But when I use the Strut's html:form tag within the template, the path to the 
action is not valid:

<html:form action="/MyTest"></html:form>

Will render:

<form action="/jahia/Jahia/MyTest"></form>

And not:

<form action="/jahia/MyTest(.do)"></form> 

I searched the documentation and mailing list for this issue, but found nothing.

Neither am I allowed to do the form handling using scriptlets, nor have time to
build a workaround for the action handling (including form validation, returning

to the Jahia content page after submitting (with errors)).

Is it possible to use Jahia with Struts this way, at all? What is best practice
if it is possible?

Greetings
Robert Gacki

-------------------------[Robert Gacki]------------------------ 
mail: [EMAIL PROTECTED] tel: +49 09131 97792-0
web : http://www.spiritlink.de           fax: +49 09131 9779257 
---- SPIRIT LINK GMBH::PAUL-GORDAN-STR. 13::91052 ERLANGEN ----


Reply via email to