开发者

how can I redirect to a JSP from other JSP in JAVA

开发者 https://www.devze.com 2023-03-12 06:19 出处:网络
Hello friends how can I redirect to a JSP from other JSP ? I want to show a pdf in the browser (I have programmed the pdf in the last JSP but with the dispatcher that I use it to redirect the last js

Hello friends how can I redirect to a JSP from other JSP ? I want to show a pdf in the browser (I have programmed the pdf in the last JSP but with the dispatcher that I use it to redirect the last jsp , the name of the last jsp doesn't appear in the browser, and I need that the n开发者_StackOverflow社区ame of the last JSP appears in the browser. thanks


Use response.sendRedirect(), or if you want to open a pop up window, just use window.open() and pass the URL of JSP in the pop up.


If you need the name to appear you will need to use a client-side redirect rather than a dispatcher.

0

精彩评论

暂无评论...
验证码 换一张
取 消