[JAVASERVERFACES-3153] Converter does not run on GET parameter after redirect from login page Created: 23/Jan/14  Updated: 27/Mar/14  Resolved: 28/Jan/14

Status: Closed
Project: javaserverfaces
Component/s: conversion
Affects Version/s: 2.2.5
Fix Version/s: 2.2.6

Type: Bug Priority: Major
Reporter: hlavki Assignee: Manfred Riem
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive javaserverfaces-3153.zip    


I have secured web application. Scenario:
1. http://localhost:8080/crawler-web/app/crawler/configure.xhtml?crawlerId=top-reality
2. Login screen appears
3. send username/password
4. after successful login I see requiredMessage from configure.xhtml which is "Unknown crawler, please use a link from within the system."
5. After refresh (F5) crawlerConverter runs and converts crawlerId parameter

I think crawlerConverter should run also after redirect from login page.

            <web-resource-name>Admin user</web-resource-name>
<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        <ui:composition template="/template/layout.xhtml">
            <ui:define name="metadata">
                    <f:viewParam name="crawlerId" value="#{crawlerConfigureBean.crawlerItem}" 
                                 required="true" requiredMessage="Unknown crawler, please use a link from within the system.">
            <ui:define name="content">
                <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"/>
                <h:messages styleClass="error-message"/>
                <pre class="prettyprint">
                    <h:outputText value="#{crawlerConfigureBean.configuration}" />

                Crawler Configuration:
                <pre class="prettyprint">
                    <h:outputText value="#{crawlerConfigureBean.crawlerConfiguration}" />

Comment by hlavki [ 23/Jan/14 ]

I discovered that getAsString() method is executed after login with null value while getAsObject() doesn't.

Comment by Manfred Riem [ 23/Jan/14 ]

Can you please supply us with your entire example? Please send it to issues@javaserverfaces.java.net. Thanks!

Comment by hlavki [ 27/Jan/14 ]

sent entire example to issues@javaserverfaces.java.net on 23. january 2014

Comment by Manfred Riem [ 28/Jan/14 ]

Applied to 2.2 branch,

svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-3153, r=edburns, make sure we ask the underlying request for its parameter names prior to trying to get the first request parameter so it will be fully populated."
Sending jsf-ri/src/main/java/com/sun/faces/context/RequestParameterMap.java
Transmitting file data .
Committed revision 12801.

Generated at Sat Nov 28 12:27:39 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.