Re: How to manage differente welcome_file for a webapp depending jahia page context...

"Khue Nguyen" <[email protected]>
Newsgroups gmane.comp.cms.jahia.devel
Message-ID <001601c59908$4a0ab150$7c02a8c0@SINGASONG>
It's not possible to pass parameters through the page url.
Theses parameters are actually hidden from the application parameters scope 
to avoid conflict.

A solution that requires a bit more codes is to add a portlet setting menu 
within your webapp so that it can be configured to use specific welcome 
file. Theses settings can then be stored in a flat text file and reloaded 
when the webapp is called.



----- Original Message ----- 
From: "Gelin Patrick" <[email protected]>
To: <[email protected]>
Sent: Thursday, August 04, 2005 4:44 PM
Subject: RE : How to manage differente welcome_file for a webapp depending 
jahia page context...


Ok, but the problem is that at the time I'm writing the webapp I can't know 
the pageid of the published page...

From my point of view, a better solution will be to add a parameter into the 
request calling the web page, and this parameter will have to be visible 
into the request object passing to the webapp...

Is it possible to do this?

> -----Message d'origine-----
> De : Khue Nguyen [mailto:[email protected]]
> Envoyé : jeudi, 4. août 2005 16:04
> À : [email protected]
> Objet : Re: How to manage differente welcome_file for a
> webapp depending jahia page context...
>
>
> Hi,
>
> the current page id can be retrieved as an Integer attribute
> "org.jahia.pageid" stored in the request.
> Depending of the page id, you may then forward or insert
> specific welcome
> file and still having one single main welcome file.
> Support of multiple welcome files is not available yet.
>
> <%
>     Integer pageId =
> (Integer)request.getAttribute("org.jahia.pageid");
>   <jsp:include page="<%=pageId.intValue() + "_welcome.jsp" />
>
> %>
>
> Regards,
> Khue Nguyen
>
>
> ----- Original Message ----- 
> From: "Patrick Gelin" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, August 04, 2005 12:41 PM
> Subject: How to manage differente welcome_file for a webapp
> depending jahia
> page context...
>
>
> Hi,
>
> I writted a small webapp with three view. The problem now is
> to install the webapp into my Jahia site but incude it into
> three differents pages, showing a different view for each page...
>
> I'm wondering if there is an API to retrieve the page context
> from the webapp, in order to get the page number or the value
> of a parameter indicating me which view my webapp need to display?
>
> Is there an other solution using the <welcome_files> list
> parameter inte web.xml. Following the Web Application
> Developer Guide I used only one welcome_file (index.jsp)...
>
> Thanks for your help.
> -- 
> Patrick Gelin - Collaborateur Scientifique
> Office de la Statistique et de l'Informatique Scolaires
> (OSIS) CH-2300 La Chaux-de-Fonds
> Tél.: +41 (0)32 919 79 13
> Email: [email protected]
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.