Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I tidy up the following Play Framework routing?
    primarykey
    data
    text
    <p>I'm trying to follow the sample in 'Introducing the Play Framework'. I have deployed work to date here</p> <p><a href="http://vivid-beach-8523.herokuapp.com/" rel="nofollow">http://vivid-beach-8523.herokuapp.com/</a></p> <p>When I do a search for example IPad it comes up with the 'messy' URL</p> <p><a href="http://vivid-beach-8523.herokuapp.com/search?search=ipad&amp;submit=Search" rel="nofollow">http://vivid-beach-8523.herokuapp.com/search?search=ipad&amp;submit=Search</a></p> <p>I think I have routing setup correctly (in conf/routes) because when I use the 'clean' URL it comes up with the correct result</p> <p><a href="http://vivid-beach-8523.herokuapp.com/search/IPad" rel="nofollow">http://vivid-beach-8523.herokuapp.com/search/IPad</a></p> <p>I'm not sure how to get my form to display the clean URL. The raw HTML is</p> <pre><code>&lt;div id="searchdiv"&gt; &lt;form action="@{Application.search()}" method="GET"&gt; &lt;input type="text" id="search" name="search" /&gt; &lt;input type="submit" id="submit" name="submit" value="Search" /&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>Application.search is as follows</p> <pre><code>public static void search(String search, Integer page) { if (page == null) page = 1; SearchResults results = AuctionItem.search(search, page); render(results, page, search); } </code></pre> <p>Any help on what I need to change much appreciated. In case it is needed the routes file looks like the following</p> <pre><code>GET /listing/create Application.createAuctionItem POST /listing/create Application.doCreateItem GET /listing/show/{id} Application.show GET /listing/show Application.show GET /search/{search} Application.search GET /search Application.search GET / Application.index </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload