File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Query string in view id got ignored Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Query string in view id got ignored" Watch "Query string in view id got ignored" New topic
Author

Query string in view id got ignored

Hugo Lam
Greenhorn

Joined: Jun 21, 2008
Posts: 3
Hi,

I am currently using JSF 1.2 (MyFaces Impl). I have been trying to specify a query string after the view id as follows:



And the main.jsp just dynamically and simply includes a page called "about.jsp". However, I find that MyFaces keeps ignoring everything after ".jsp" so I can never get the query parameter from the main.jsp page. I find that even I specify "/main.ok?page=about", it will still redirect to the main.jsp without any trailing parameters. It seems that it truncates everything after the last index of the dot. I have also tried to create a custom view handler and printed out the view id, the query string always got truncated.

The MyFaces wiki has an example which has a query string after the page url, and it is even a dynamic binding. So I thought it might support query string in the view id: http://wiki.apache.org/myfaces/Custom_Navigation_Handler. However, I tried to specify for example



And MyFaces redirects to a page like /main.jsp?page=#{mybean.jsp

Does anyone know what's wrong with my code? or is it a bug or spec thing? Any help and suggestion will be highly appreciated! I have been stuck in this thing for quite a while.

Thanks a lot!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Hugo",
Please check your private messages.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Hugo Lam
Greenhorn

Joined: Jun 21, 2008
Posts: 3
Sorry I am new. Just changed the display name and will be reflected on the next post. Thanks for the note.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query string in view id got ignored
 
Similar Threads
Why isn't redirct working?
PhaseListener?
Navigation Problem
errors's management
why the same URL shows different page in JSF