java - Switch the servlet from one app to another -


i have 2 applications web1 , web2 , want switch web1/servlet1 web2/servlet2 . requirements are

  1. request received web1/servlet1.(1st application)
  2. token generated ,add in header , passed web2/servlet2 (2nd application) along url change

i have tried below no success.

the call made web2/servlet2 not switched.(url not changed) ,i want upon switching should load second application

servletcontext s=request.getservletcontext().getcontext("/web2"); requestdispatcher dis=s.getrequestdispatcher("/servlet2"); dis.forward(request, response);   

also,i have added attribute in tomcat context

crosscontext="true"


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -