Java servlet not dispatching to another servlet

前端 未结 4 1227
无人共我
无人共我 2021-01-24 08:58

I have 2 servlets, \"HomeController\" and \"SearchController\". On the home.jsp I have a form that has a search box and when submitted actions to \"Search\"

 <         


        
4条回答
  •  醉话见心
    2021-01-24 09:29

    1. Check if it is going into the condition.
    2. Check if the response is getting committed before forward. It yes, then the forward will fail.
    3. Worst case, it could be an issue with your app server.
    4. Try using ServletContext.getNamedDispatcher("HomeController"); as an alternative.

提交回复
热议问题