Ok two thoughts,
- Use HTTP POST rather than HTTP GET to pass the information. This is typically done as part of the form where the user originally entered the information.
- Pass an Id to a record that contains the information, the code behind the page rendering reads the record and retrieves the field values.
You appear to be using route 1 for page 1. In Visualforce to display another page with this information on simply return Page.page2 from your controller method responding to the input when page 1 is displayed. Visualforce reuses the viewstate if both pages have the same Apex controller defined.
In essence it transfers the viewstate from one page to another automatically this way, so no need to pass at all. The same bindings you used to capture the information on page1 can be used to display the information in page2.
Here is an example...
public with sharing class PagesController
{
public Account account {get;set;}
public Contact contact {get;set;}
public PagesController()
{
account = new Account();
contact = new Contact();
}
public PageReference page2()
{
return Page.page2;
}
}
Page 1 looks like this...
<apex:page controller="PagesController">
<apex:form >
<apex:pageBlock title="Page 1" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton value="Page 2" action="{!page2}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Section" columns="2">
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Contact.FirstName}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Page 2 looks like this...
<apex:page controller="PagesController">
<apex:pageBlock title="Page 2">
<apex:pageBlockSection title="Section" columns="2">
<apex:outputField value="{!Account.Name}"/>
<apex:outputField value="{!Contact.FirstName}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Hope this helps and enjoy!
P.S. Here is an example showing how to create a more complex wizard type ui.
{!fn} //in page fn = apexpages.currentpage().getparameters().get('fn'); //in constructor
likewise need to display all the values in page2