« Return to Thread: Creating URLs referencing a JSF application

Re: Creating URLs referencing a JSF application

by Bill-124 :: Rate this Message:

Reply to Author | View in Thread

Lets say you have 2 pulldowns, with id's "pd1" and "pd2" on a page
"page.jsp" for your website "www.example.com".  If you create a form
using these and submit then, there is no 'GET' type of url for them to
bookmark, copy/paste.  You'd simply be on the same page:

http://www.example.com/page.jsp

So I'm looking for something that will automatically create this URL
for me like:

http://www.example.com/page.jsp?pd1=selection1&pd2=selection2

On Thu, Jul 17, 2008 at 7:39 PM, Rick Fincher <rnf@...> wrote:

> Hi Bill,
>
> Do you mean you want to redirect to another pre-existing page as in:
>
>         try {
>               ExternalContext externalContext =
> getFacesContext().getExternalContext();
>                             String pageURL =
> externalContext.getRequestContextPath()  +"/faces/YourPage.jsp";
>               externalContext.redirect(pageURL);
>           } catch(IOException ioe) {
>               ioe.printStackTrace(System.out);
>               System.out.println(ioe.toString());
>           }
>
> Or do you mean you want to load an image file based on what the users
> select?
>
> Rick
>
>
> Bill wrote:
>>
>> Hi all,
>>
>>  I've gotten a request for one of my JSF applications for users to be
>> able to directly link to pages within the application.  The
>> application simply takes a bunch of form inputs and returns some
>> images derived from these inputs...it doesn't require any 'state'
>> information so it should be pretty straightforward.
>>
>>  Is there a way to do this without having to manually create a GET
>> type URL myself?  I start doing this, but it became apparent that this
>> would be very tedious...
>>
>> -Bill
>>
>
>

 « Return to Thread: Creating URLs referencing a JSF application

LightInTheBox - Buy quality products at wholesale price!