1

I have Java web project and test cases for servlet.Servlet is in other maven(not web) project and declaration for that servlet wrote in web.xml of web project. For testing I use HttpUnit.In this case when I call context.getRealPath("") from my servlet it returns the path of web project. Now i want to move test from web project to not web project(Where the servlet is).In ServletRunner i register the same web.xml but in this case context.getRealPath("") return path of not web project. How can i set the the context. P.S. The second(not web) project cannot be run separately.So context must be the context of web project

4

0 回答 0