Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Map home page to "root of application" in Java EE?
    primarykey
    data
    text
    <p>Set-Up- I have a JSP - index.jsp and a servlet indexController. indexController forwards request to index.jsp. Execution of index.jsp without execution of indexController is not desired.</p> <p>Requirements-</p> <ol> <li>'www.mysite.com' should be served by indexController/index.jsp</li> <li>Any request with invalid url should get redirected to 'www.mysite.com'.</li> <li>'www.mysite.com/index.jsp' should get redirected to 'www.mysite.com'.</li> </ol> <p>My Solution - </p> <ol> <li>Map indexController to "/" - I read that this is overriding 'default servlet' and I want to avoid that.</li> <li>Map 'index.jsp' in welcome-file-list: I don't need to explicitly map it science 'index.jsp' is there, it will be automatically taken as welcome file. Doing this doesn't execute indexController. Moreover invalid urls are 'forwarded' not redirected to welcome file.</li> <li>Map error page to home page- This is cheating with yourself. I don't want to hide errors.</li> <li>Use two servlets. One with "/*" mapping, which redirects everything to 'mysite.com'. Second mapped to ""(empty) that actually serves request. - Some mysterious issues here(yet to figure out) </li> </ol> <p>I think, everyone wants to achieve same functionality for their home screen and there are many questions at stackoverflow with similar problems. </p> <p>Is there any standard solution which solves problem for once and for all.</p> <hr> <p>Edit:- There were only 7 views in more than 30 mins. Removed GAE tag, to attract more views.</p>
    singulars
    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