リクエストディスパッチの場合、URLを変更することは可能ですか。
これは私のコードです
public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
{
List<HomePageServicesDescription> data= HomePageServicesDescriptionDB.showHomePageServicesDescription();
req.setAttribute("description", data);
req.getRequestDispatcher("index.jsp").forward(req,res);
}
したがって、Webブラウザで表示するとhttp://localhost:8888/url-mapping
、サーブレットのurl=が得られます。しかし、私はそのurl=が欲しいですhttp://localhost:8888/index.jsp
。どのようにそれが可能であるか。