aspose file tools*
The moose likes JSF and the fly likes param is getting converted to some thing else when i pass special characters  getRequestParameterMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "param is getting converted to some thing else when i pass special characters  getRequestParameterMap" Watch "param is getting converted to some thing else when i pass special characters  getRequestParameterMap" New topic
Author

param is getting converted to some thing else when i pass special characters getRequestParameterMap

Mallika gowd
Greenhorn

Joined: Sep 28, 2009
Posts: 26
This is search program...when i search word with special character like tilbehør it is getting converted as tilbehør

xhtml file i have input text...when i pass some text for search..control goes to SearchBB as shown below.getting converted some wierd character for tilbehør ---> tilbehør

Please help me.


Search.xhml:
---------------

<form id="query" method="get">
<input type="text" name="q" id="q" value="#{searchBB.query}" />
<input type="submit" name="submit" id="submit" value="#{msg.txt_common_buttonLabel}" />

SearchBB.java
-------------------

public SearchBB()
{
FacesContext context = FacesContext.getCurrentInstance();
ExternalContext extCtx = context.getExternalContext();

Locale locale = context.getViewRoot().getLocale();
this.locale = locale.getLanguage() + "_" + locale.getCountry();

String sQuery = (String)extCtx.getRequestParameterMap().get( "q" );

try {
if( sQuery != null ) {
query=sQuery;
}
Mallika gowd
Greenhorn

Joined: Sep 28, 2009
Posts: 26
any help would be greatly appreciated...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: param is getting converted to some thing else when i pass special characters getRequestParameterMap