You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by mfaine <mf...@knology.net> on 2005/02/08 16:48:09 UTC

problem with includes and request scoped variables

Not sure if this is exactly on-topic but the problem may be a result of some
JSF mechanism.  

I have a section at the beginning of all my JSPs that looks like this:

<f:view>
<html>
  <c:import url="../inc/head.jsp">
    <c:param name="title" value="Document Title Here"/>
  </c:import>
<body>
...

The contents of ../inc/head.jsp looks like this:
<%
String title = request.getParameter("title");
String style = request.getParameter("style");
if(style == null)
style = request.getContextPath() + "/style.css";
%>
<head>
<title>
<%=title%>
</title>
<link rel="stylesheet" type="text/css" href="<%=style%>"/>
... other head content

At some point in the navigation of the web application the title of the web
page goes to "null".  I'm assuming that the request parameter for title is
being lost but I don't know why.  Any suggestions on how to fix this would
be appreciated.

Thanks,
-Mark