Thursday, 15 August 2013

java - not able to forward request from one webApp to another WebApp -



java - not able to forward request from one webApp to another WebApp -

i'm getting next error when i'm trying forwards request 1 webapplication other webapplication using next code,through filter:

servletconfig sc=getservletconfig(); javax.servlet.servletcontext otherctx = sc.getservletcontext().getcontext("/pharmacy"); otherctx.getrequestdispatcher(forwardurl.substring(forwardurl.indexof('/',1))).forward(prequest, presponse);

but i'm able see blank page. can please give sloution..

error [[default]] servlet.service() servlet default threw exception java.lang.nullpointerexception @ atg.servlet.minimal.minimalcontainerutil.dispatchtodynamopipeline(minimalcontainerutil.java:334) @ atg.servlet.genericrequestdispatcher.forward(genericrequestdispatcher.java:534)

are under tomcat? if so, in context xml file, add together attribute : crosscontext=true

java

No comments:

Post a Comment