You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cedric Dumoulin <ce...@lifl.fr> on 2001/09/03 10:32:59 UTC

Re: dynamic template tag parameter values

  The tiles tutorial have been moved into the tiles-doc.war file, under
'tutorial'.

  I think the error is issue because the servlet has failed to start. Are you
sure you use a jaxp1.1 compliant parser ? Does Struts1.1 example runs with your
configuration ?

  Cedric

David Boardman wrote:

> A couple of questions about Tiles,
>
> When I downloaded the binary distribution I did not see the
> tiles-tutorial.war file and was therefore missing some of the files
> necessary to go through your tutorial.  Am I missing something in the
> distribution, or was the tutorial removed.
>
> Secondly, when I attempt to run both the tiles-docs application and the
> tiles-channel application I got an exception with the following message:
>
> "Tag Insert : Can't get component definition 'mainLayout'. Check if this
> name exist in component definitions."
>
> I simply placed the war files in the webapps directory of my tomcat server
> to deploy them.
>
> thanks for the help.
>
> Dave
>
> -----Original Message-----
> From: struts-user-return-16484-dboardman=wagpaw.com@jakarta.apache.org
> [mailto:struts-user-return-16484-dboardman=wagpaw.com@jakarta.apache.org
> ]On Behalf Of Cedric Dumoulin
> Sent: Friday, August 31, 2001 5:01 AM
> To: struts-user@jakarta.apache.org
> Subject: Re: dynamic template tag parameter values
>
>   You can do something like :
>     <template:put name="sidebar" content='<%= "/jsps/sidemenu"+ clientName+
> ".jsp"%>'/>
>   But you certainly have to put some processing before to check if the
> clientName is valid.
>
>   Also, you can check Tiles contribution for others ideas. For example, you
> can
> adapt the channels example to fit your client names.
>
>     Cedric
>
> Tiles sites :
>   http://www.lifl.fr/~dumoulin/tiles/
>   (mirror) : http://www.geocities.com/cedricdumoulin/tiles/
>
> David Boardman wrote:
>
> > Our site will be accessed by users via other sites on the web.  For
> > instance, our site might be accessed from a link on Cisco's site.  When
> this
> > occurs we want the GUI to be different than the default GUI (same general
> > layout, but different graphics etc.)  To do this I was hoping to include a
> > client parameter in the query string
> > (http://oursite.com/login.jsp?client=Xxx) and then use that to dynamically
> > set the value of the content parameter within a <template:put> tag to load
> > the appropriate jsp.
> >
> > I believe I can retrieve the query string parameter using <bean:parameter
> > id="clientName" name="client">.  However, I am not sure how to dynamically
> > include this value in the content parameter of the <template:put> tag.
> >
> > For example, my default template currently looks like this:
> >
> > ******************************************
> > <%@ page language="java" %>
> > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> >
> > <template:insert template="/jsps/template.jsp">
> >     <template:put name="title"><bean:message
> > key="candidate.detail.title"/></template:put>
> >     <template:put name="top" content="/jsps/top.jsp"/>
> >     <template:put name="sidebar" content="/jsps/sidemenu.jsp"/>
> >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> >     <template:put name="footer" content="/jsps/footer.jsp"/>
> > </template:insert>
> > ******************************************
> >
> > for Cisco I would like it to look like:
> > ******************************************
> > <%@ page language="java" %>
> > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> >
> > <template:insert template="/jsps/template.jsp">
> >     <template:put name="title"><bean:message
> > key="candidate.detail.title"/></template:put>
> >     <template:put name="top" content="/jsps/topCisco.jsp"/>
> >     <template:put name="sidebar" content="/jsps/sidemenuCisco.jsp"/>
> >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> >     <template:put name="footer" content="/jsps/footerCisco.jsp"/>
> > </template:insert>
> > ******************************************
> >
> > and for client=Xxx I would like it to look like:
> > ******************************************
> > <%@ page language="java" %>
> > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> >
> > <template:insert template="/jsps/template.jsp">
> >     <template:put name="title"><bean:message
> > key="candidate.detail.title"/></template:put>
> >     <template:put name="top" content="/jsps/topXxx.jsp"/>
> >     <template:put name="sidebar" content="/jsps/sidemenuXxx.jsp"/>
> >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> >     <template:put name="footer" content="/jsps/footerXxx.jsp"/>
> > </template:insert>
> > ******************************************
> >
> > Any help would be greatly apprecitated.
> >
> > Thanks,
> >
> > David Boardman
> > Integral7


Re: dynamic template tag parameter values

Posted by Cedric Dumoulin <ce...@lifl.fr>.

  Struts 1.1 is available from
http://jakarta.apache.org/builds/jakarta-struts/nightly/ .
  Pick up the most recent files, usually at bottom of list.
  Check if Struts1.1 example work. If not, check if you haven't multiple
instances of jaxp in your classpath. Especially, check tomcat/lib.
  There is no known problems running Tiles and Struts1.0 or 1.1, so it certainly
comes from your configuration.

    Cedric

David Boardman wrote:

> I have only run the struts 1.0 example, and have not yet downloaded struts
> 1.1(I could not find it at the Struts site). I downloaded the JAXP reference
> implementation and placed jaxp.jar, crimson.jar and xalan.jar in my
> classpath.  After restarting Tomcat I got the same error message as before.
>
> Thanks,
>
> Dave
>
> -----Original Message-----
> From: struts-user-return-16568-dboardman=wagpaw.com@jakarta.apache.org
> [mailto:struts-user-return-16568-dboardman=wagpaw.com@jakarta.apache.org
> ]On Behalf Of Cedric Dumoulin
> Sent: Monday, September 03, 2001 3:33 AM
> To: struts-user@jakarta.apache.org
> Subject: Re: dynamic template tag parameter values
>
>   The tiles tutorial have been moved into the tiles-doc.war file, under
> 'tutorial'.
>
>   I think the error is issue because the servlet has failed to start. Are
> you
> sure you use a jaxp1.1 compliant parser ? Does Struts1.1 example runs with
> your
> configuration ?
>
>   Cedric
>
> David Boardman wrote:
>
> > A couple of questions about Tiles,
> >
> > When I downloaded the binary distribution I did not see the
> > tiles-tutorial.war file and was therefore missing some of the files
> > necessary to go through your tutorial.  Am I missing something in the
> > distribution, or was the tutorial removed.
> >
> > Secondly, when I attempt to run both the tiles-docs application and the
> > tiles-channel application I got an exception with the following message:
> >
> > "Tag Insert : Can't get component definition 'mainLayout'. Check if this
> > name exist in component definitions."
> >
> > I simply placed the war files in the webapps directory of my tomcat server
> > to deploy them.
> >
> > thanks for the help.
> >
> > Dave
> >
> > -----Original Message-----
> > From: struts-user-return-16484-dboardman=wagpaw.com@jakarta.apache.org
> > [mailto:struts-user-return-16484-dboardman=wagpaw.com@jakarta.apache.org
> > ]On Behalf Of Cedric Dumoulin
> > Sent: Friday, August 31, 2001 5:01 AM
> > To: struts-user@jakarta.apache.org
> > Subject: Re: dynamic template tag parameter values
> >
> >   You can do something like :
> >     <template:put name="sidebar" content='<%= "/jsps/sidemenu"+
> clientName+
> > ".jsp"%>'/>
> >   But you certainly have to put some processing before to check if the
> > clientName is valid.
> >
> >   Also, you can check Tiles contribution for others ideas. For example,
> you
> > can
> > adapt the channels example to fit your client names.
> >
> >     Cedric
> >
> > Tiles sites :
> >   http://www.lifl.fr/~dumoulin/tiles/
> >   (mirror) : http://www.geocities.com/cedricdumoulin/tiles/
> >
> > David Boardman wrote:
> >
> > > Our site will be accessed by users via other sites on the web.  For
> > > instance, our site might be accessed from a link on Cisco's site.  When
> > this
> > > occurs we want the GUI to be different than the default GUI (same
> general
> > > layout, but different graphics etc.)  To do this I was hoping to include
> a
> > > client parameter in the query string
> > > (http://oursite.com/login.jsp?client=Xxx) and then use that to
> dynamically
> > > set the value of the content parameter within a <template:put> tag to
> load
> > > the appropriate jsp.
> > >
> > > I believe I can retrieve the query string parameter using
> <bean:parameter
> > > id="clientName" name="client">.  However, I am not sure how to
> dynamically
> > > include this value in the content parameter of the <template:put> tag.
> > >
> > > For example, my default template currently looks like this:
> > >
> > > ******************************************
> > > <%@ page language="java" %>
> > > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> > >
> > > <template:insert template="/jsps/template.jsp">
> > >     <template:put name="title"><bean:message
> > > key="candidate.detail.title"/></template:put>
> > >     <template:put name="top" content="/jsps/top.jsp"/>
> > >     <template:put name="sidebar" content="/jsps/sidemenu.jsp"/>
> > >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> > >     <template:put name="footer" content="/jsps/footer.jsp"/>
> > > </template:insert>
> > > ******************************************
> > >
> > > for Cisco I would like it to look like:
> > > ******************************************
> > > <%@ page language="java" %>
> > > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> > >
> > > <template:insert template="/jsps/template.jsp">
> > >     <template:put name="title"><bean:message
> > > key="candidate.detail.title"/></template:put>
> > >     <template:put name="top" content="/jsps/topCisco.jsp"/>
> > >     <template:put name="sidebar" content="/jsps/sidemenuCisco.jsp"/>
> > >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> > >     <template:put name="footer" content="/jsps/footerCisco.jsp"/>
> > > </template:insert>
> > > ******************************************
> > >
> > > and for client=Xxx I would like it to look like:
> > > ******************************************
> > > <%@ page language="java" %>
> > > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> > >
> > > <template:insert template="/jsps/template.jsp">
> > >     <template:put name="title"><bean:message
> > > key="candidate.detail.title"/></template:put>
> > >     <template:put name="top" content="/jsps/topXxx.jsp"/>
> > >     <template:put name="sidebar" content="/jsps/sidemenuXxx.jsp"/>
> > >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> > >     <template:put name="footer" content="/jsps/footerXxx.jsp"/>
> > > </template:insert>
> > > ******************************************
> > >
> > > Any help would be greatly apprecitated.
> > >
> > > Thanks,
> > >
> > > David Boardman
> > > Integral7


RE: dynamic template tag parameter values

Posted by David Boardman <db...@wagpaw.com>.
I have only run the struts 1.0 example, and have not yet downloaded struts
1.1(I could not find it at the Struts site). I downloaded the JAXP reference
implementation and placed jaxp.jar, crimson.jar and xalan.jar in my
classpath.  After restarting Tomcat I got the same error message as before.


Thanks,

Dave

-----Original Message-----
From: struts-user-return-16568-dboardman=wagpaw.com@jakarta.apache.org
[mailto:struts-user-return-16568-dboardman=wagpaw.com@jakarta.apache.org
]On Behalf Of Cedric Dumoulin
Sent: Monday, September 03, 2001 3:33 AM
To: struts-user@jakarta.apache.org
Subject: Re: dynamic template tag parameter values



  The tiles tutorial have been moved into the tiles-doc.war file, under
'tutorial'.

  I think the error is issue because the servlet has failed to start. Are
you
sure you use a jaxp1.1 compliant parser ? Does Struts1.1 example runs with
your
configuration ?

  Cedric

David Boardman wrote:

> A couple of questions about Tiles,
>
> When I downloaded the binary distribution I did not see the
> tiles-tutorial.war file and was therefore missing some of the files
> necessary to go through your tutorial.  Am I missing something in the
> distribution, or was the tutorial removed.
>
> Secondly, when I attempt to run both the tiles-docs application and the
> tiles-channel application I got an exception with the following message:
>
> "Tag Insert : Can't get component definition 'mainLayout'. Check if this
> name exist in component definitions."
>
> I simply placed the war files in the webapps directory of my tomcat server
> to deploy them.
>
> thanks for the help.
>
> Dave
>
> -----Original Message-----
> From: struts-user-return-16484-dboardman=wagpaw.com@jakarta.apache.org
> [mailto:struts-user-return-16484-dboardman=wagpaw.com@jakarta.apache.org
> ]On Behalf Of Cedric Dumoulin
> Sent: Friday, August 31, 2001 5:01 AM
> To: struts-user@jakarta.apache.org
> Subject: Re: dynamic template tag parameter values
>
>   You can do something like :
>     <template:put name="sidebar" content='<%= "/jsps/sidemenu"+
clientName+
> ".jsp"%>'/>
>   But you certainly have to put some processing before to check if the
> clientName is valid.
>
>   Also, you can check Tiles contribution for others ideas. For example,
you
> can
> adapt the channels example to fit your client names.
>
>     Cedric
>
> Tiles sites :
>   http://www.lifl.fr/~dumoulin/tiles/
>   (mirror) : http://www.geocities.com/cedricdumoulin/tiles/
>
> David Boardman wrote:
>
> > Our site will be accessed by users via other sites on the web.  For
> > instance, our site might be accessed from a link on Cisco's site.  When
> this
> > occurs we want the GUI to be different than the default GUI (same
general
> > layout, but different graphics etc.)  To do this I was hoping to include
a
> > client parameter in the query string
> > (http://oursite.com/login.jsp?client=Xxx) and then use that to
dynamically
> > set the value of the content parameter within a <template:put> tag to
load
> > the appropriate jsp.
> >
> > I believe I can retrieve the query string parameter using
<bean:parameter
> > id="clientName" name="client">.  However, I am not sure how to
dynamically
> > include this value in the content parameter of the <template:put> tag.
> >
> > For example, my default template currently looks like this:
> >
> > ******************************************
> > <%@ page language="java" %>
> > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> >
> > <template:insert template="/jsps/template.jsp">
> >     <template:put name="title"><bean:message
> > key="candidate.detail.title"/></template:put>
> >     <template:put name="top" content="/jsps/top.jsp"/>
> >     <template:put name="sidebar" content="/jsps/sidemenu.jsp"/>
> >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> >     <template:put name="footer" content="/jsps/footer.jsp"/>
> > </template:insert>
> > ******************************************
> >
> > for Cisco I would like it to look like:
> > ******************************************
> > <%@ page language="java" %>
> > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> >
> > <template:insert template="/jsps/template.jsp">
> >     <template:put name="title"><bean:message
> > key="candidate.detail.title"/></template:put>
> >     <template:put name="top" content="/jsps/topCisco.jsp"/>
> >     <template:put name="sidebar" content="/jsps/sidemenuCisco.jsp"/>
> >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> >     <template:put name="footer" content="/jsps/footerCisco.jsp"/>
> > </template:insert>
> > ******************************************
> >
> > and for client=Xxx I would like it to look like:
> > ******************************************
> > <%@ page language="java" %>
> > <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> > <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
> >
> > <template:insert template="/jsps/template.jsp">
> >     <template:put name="title"><bean:message
> > key="candidate.detail.title"/></template:put>
> >     <template:put name="top" content="/jsps/topXxx.jsp"/>
> >     <template:put name="sidebar" content="/jsps/sidemenuXxx.jsp"/>
> >     <template:put name="body" content="/jsps/loginBody.jsp"/>
> >     <template:put name="footer" content="/jsps/footerXxx.jsp"/>
> > </template:insert>
> > ******************************************
> >
> > Any help would be greatly apprecitated.
> >
> > Thanks,
> >
> > David Boardman
> > Integral7