Click to See Complete Forum and Search --> : spaces as +


jrthor2
04-13-2005, 10:39 AM
I have a site where we are setting the page title dynamically through a variable 'title'. In our jsp page, we are importing our header information and passing it the title of our pages. The problem we have, is that pages with a space in the title show up as "Customer+Profile". Our header file is just another jsp file that gets the title from the querystring. Here is the code for our header file:

<head>
<title>
xxx.com : <request:queryString name="title" />
</title>

Here is the code on our jsp page that sets the page title:

<c:import url="template/header.jsp">
<c:param name="title" value="Customer Profile"/>
</c:import>

How can I show the space, and not the +?

Thanks

Khalid Ali
04-13-2005, 02:27 PM
am not sure what type of tag lib is that, however, in struts there is a property called
filter="off" that usually takes care of such problem

jrthor2
04-13-2005, 02:31 PM
the header.jsp file is using the request taglib:

<%@ taglib prefix="request" uri="http://jakarta.apache.org/taglibs/request-1.0" %>

We are not using struts, we are using jsf.

7stud
04-13-2005, 05:12 PM
I'm just a beginner at Java, but can't you do an intermediate step and manipulate the String? Alternatively, is there no escape() function in Java to convert query string symbols back to their character representations?

Khalid Ali
04-13-2005, 06:34 PM
I am prety sure JSF has some property just like filter="off" in struts(since the guy who created JSF for java is the same person behind Struts)

jrthor2
04-14-2005, 07:28 AM
where do I use this filter="off" at?

Khalid Ali
04-14-2005, 12:17 PM
try something like this


<c:import url="template/header.jsp">
<c:param name="title" value="Customer Profile" escape="false"/>
</c:import>



I think jsf has escape="off" as compare to filter="off" in struts