java - How to hide index.jsp in url -


in java ee project mapped welcome page

<welcome-file-list>     <welcome-file>login.jsp</welcome-file> </welcome-file-list>   

after login correctly go index.jsp. home. need hide index.jsp in url. localhost://ems.

usually doesn't show index.jsp in url. press arrow key go http://localhost:8080/ems/index.jsp

is there way hide that? i'm not using java related frameworks @ moment. use apache tomcat.

yes, using:

<welcome-file-list>     <welcome-file>index.jsp</welcome-file> </welcome-file-list> 

see "configuring welcome files".

at beginning of index.jsp, need check whether user logged in. if not, redirect login.jsp. if don't want user see login.jsp in url, need include jsp instead.

if want make sure user never sees index.jsp, need check request url , redirect / when url ends /index.jsp using response.sendredirect().


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -