大家好,我是 Eclipse IDE、JSP/Java、HTML、Tomcat 的新手。
在获得 Eclipse 之前,我正在使用记事本制作 HTML 文件,并且我已经完成了网站的该部分的制作。我现在已经有了 Eclipse IDE,我一直用它来为一些动态 html 制作 JSP,现在我也完成了它们。
我现在遇到的问题是:
-
我不知道如何从 IDE 中提取 JSP,因此我可以将其与 HTML 页面一起放在我的文件夹中
这会给我带来另一个问题,我想将 JSP 放入
, 2其中使用
标签,我不确定所有转发和表单提交是否都将保留在 iframe 中,因为据我所知
没有目标属性,如果这将成为一个问题,任何人都可以为我指明如何解决这个问题的正确方向吗?
- ,我只教了如何在IDE中建立Tomcat服务器,当我从IDE中提取JSP文件后,如何独立运行Tomcat?
非常感谢,我非常感谢您的时间和精力:)
Hey everyone, I'm new to using the Eclipse IDE, JSP/Java, HTML, Tomcat.
I was making HTML files, using notepad, prior to getting Eclipse, and I've finished with making that part of the website. I've gotten the Eclipse IDE now, which I've been using to make JSPs for some dynamic html, and I've completed them as well now.
The problems I'm having now are:
-
I don't know how to extract the JSPs from the IDE, so I can put it in my folder with the HTML pages
-
Which would bring me into another problem, I want to put the JSPs in an <iframe>
, 2 of them make use of <jsp:forward>
tags, I'm unsure if all of the forwarding and form submitting will remain within the iframe, because as far as I know <jsp:forward>
doesn't have a target attribute, if this is going to be a problem, could anyone point me in the right direction for how to go about this?
-
Finally, I've only been taught how to the Tomcat server within the IDE, after I've extracted the JSP files from the IDE, how do I run Tomcat independently?
Thanks very much, I really appreciate your time and effort :)
发布评论
评论(1)
在 Eclipse 或资源管理器中选择源文件,按 Ctrl+C,打开资源管理器中的目标文件夹,按 Ctrl+V。
目前还不清楚你拥有什么以及你正在努力解决什么问题,但所有这些听起来都不太好。看起来你处理事情的方式很错误。我建议开始学习 servlet。我还建议开发不使用
,只要所有页面都在同一网络服务器上运行。如果您需要某种头/左菜单/页脚包含,那么您应该使用服务器端包含。为此,JSP 提供了
。假设你已经正确创建了一个动态 Web 项目,只需右键单击它,选择“导出”> WAR 文件。然后将获得的WAR文件放入Tomcat的
/webapps
文件夹中并启动它。Select source file(s) in Eclipse or explorer, hit Ctrl+C, open target folder in explorer, hit Ctrl+V.
It's unclear what you have and what you're struggling with, but all with all this doesn't smell good. It look much like that you're approaching things the wrong way. I'd suggest to start learning servlets. I'd also suggest to develop without
<iframe>
as long as all pages runs at the same webserver. If you need some kind of head/leftmenu/footer includes, then you should be using server-side includes. JSP offers you the<jsp:include>
for this.Assuming that you've properly created a dynamic web project, just rightclick it, choose Export > WAR file. Then just drop the obtained WAR file in
/webapps
folder of Tomcat and start it.