here is my dispatcher.xml <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/index.shtm">indexController</prop> </props> </property> </bean>
<!--The index controller.--> <bean name="indexController" class="org.springframework.web.servlet.mvc.ParameterizableViewController" p:viewName="index" /> notice the forward slash on urlMapping prop key <prop key="/index.shtm">indexController</prop> Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Sat, 29 Aug 2009 16:26:16 +0200 > From: alexander.mestiashv...@biotec.tu-dresden.de > To: users@tomcat.apache.org > Subject: Re: How to redirect from HTTPS to HTTP > > Thilani wrote: > > Hi All, > > > > I am developing a web application which is require login for users. I want > > to use HTTPS for login only. Application server is tomcat 6.x and following > > is the url for login. > > > > https://localhost:8443/GIShome/index.shtm > > > > After successfully login I want to direct users to http connection > > (https://localhost:8080/GIShome/home.html > > ). So I used following in my web xml > > > > <servlet-mapping> > > <servlet-name>dispatcher</servlet-name> > > <url-pattern>*.html</url-pattern> > > </servlet-mapping> > > <servlet-mapping> > > <servlet-name>dispatcher</servlet-name> > > <url-pattern>*.shtm</url-pattern> > > </servlet-mapping> > > <security-constraint> > > <web-resource-collection> > > <web-resource-name>Protected Context</web-resource-name> > > <url-pattern>*.shtm</url-pattern> > > </web-resource-collection> > > <!-- auth-constraint goes here if you requre authentication --> > > <user-data-constraint> > > <transport-guarantee>CONFIDENTIAL</transport-guarantee> > > </user-data-constraint> > > </security-constraint> > > <security-constraint> > > <web-resource-collection> > > <web-resource-name>Non Protected Context</web-resource-name> > > <url-pattern>*.html</url-pattern> > > </web-resource-collection> > > <!-- auth-constraint goes here if you requre authentication --> > > <user-data-constraint> > > <transport-guarantee>NONE</transport-guarantee> > > </user-data-constraint> > > </security-constraint> > > > > > > This is from the dispatcher.xml > > > > <bean id="urlMapping" > > class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> > > <property name="mappings"> > > <props> > > <prop key="index.shtm">indexController</prop> > > <prop key="login.shtm">loginController</prop> > > <prop key="createNew.shtm">createNewController</prop> > > <prop key="saveUser.html">saveUserController</prop> > > <prop key="GIShome.html">gisHomeController</prop> > > <prop key="capability.html">capabilityController</prop> > > </props> > > </property> > > </bean> > > > > Also I did appropriate configuration from the Tomcat side as well. > > When I executes the first url it is going to the > > https://localhost:8443/GIShome/index.shtm > > And never come to normal http connection again. So how can I redirect this > > to http from https again? > > Please explain. > > > > Regards. > > > > > Hi , > with apache rewrite it is not a problem , > here is rewrite filter for Tomcat > http://tuckey.org/urlrewrite/ > Regards , > Alex > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Windows Live: Keep your friends up to date with what you do online. http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009