开发者

JSP - What's the first step to serve JSP pages on my PC?

开发者 https://www.devze.com 2023-03-23 22:44 出处:网络
I want to start developing JSP pages. I need to set up a localhost on my PC at home. What do I need to do to serve JSP pages locally?

I want to start developing JSP pages. I need to set up a localhost on my PC at home.

What do I need to do to serve JSP pages locally?

I don't know if it makes a difference, but I am a ColdFusion developer and am running CF Builder as well as ColdFusion 开发者_运维百科9.

Here's the code I am trying to run saved as HelloWorld.jsp

<%
  java.util.Date dateToday = new java.util.Date();
%>

<html>
<body>
<p>Todays date is <%= dateToday %> </p>
</body>
</html>


first of all you need an Application server that interprets your JSP pages. I would suggest you to use Apache Tomcat. It is in charge of receiving the requests from the client and return a result that is an HTML page. In other worlds apache transforms your JSP page (which is a mix of Java and HTML) in a pure HTML page. So the client doesn't need a virtual machine on it's side.

I would suggest you to use the eclipse web developments tools. They offer a good suite for programming and testing your page in eclipse.

Here you can find the instructions for installing tomcat. And Here some hints for configuring tomcat in eclipse.

If you already know Java it would be easy for you starting with JSP!

0

精彩评论

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