java 如何将 2 个 JSP 页面链接在一起?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2962612/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 23:42:22  来源:igfitidea点击:

How do I link 2 JSP pages together?

javajspservlets

提问by javArc

Just wondering what the easiest way to connect 2 jsp pages together, I have one page and I need to have it link to another page when a customer clicks something. Now can I create a link like in html or do I need to make a button or something?

只是想知道将 2 个 jsp 页面连接在一起的最简单方法是什么,我有一个页面,当客户单击某些内容时,我需要将其链接到另一个页面。现在我可以像在 html 中创建一个链接还是我需要制作一个按钮或其他东西?

回答by objects

you can just create a link specifying the url of the other jsp for example if other jsp is in same directory you could just use

您可以创建一个链接,指定其他 jsp 的 url 例如,如果其他 jsp 位于您可以使用的同一目录中

<a href="b.jsp">Goto B</a>