简体   繁体   中英

calling a servlet from another application

I have two applications...for simplicity im giving there names XXX and YYY .

My requirement is to run XXX application using itzz war file named XXX.war and I need to call a servlet named myservlet of YYY application.

But now what I'm getting is an url like this( http://localhost:8080/XXX ) . I have gone through this url that time I'm getting a error message resource not found.

I checked by adding /myservlet at the end of url. That time it works fine and perfect.

Really what I need is a url like this ( http://localhost:8080/XXX/mysevlet )

The contact path I given in my XXX application is /myservlet .

Seems like your web.xml is incorrectly configured. Can you post your web.xml code here. BlausC is correct, without seeing the descriptor file, to anything or diagnose is not fruitful. Post your web.xml Thanks, Ben

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM