JSP Learning Notes 1

General Run Steps and the Solutions of Configuration Error

  1. Before you run the .jsp file, please start the tomcat in your laptop.
    Find the path of the newest version of apache-tomcat folder, run startup.sh in terminal window.

  2. open a new page of browser, and type localhost:8080/[projectName]/[path of the .jsp file] and go.
    Also before you do it, please make sure you have set the project onto your Tomcat server, right-click the tomcat server in the bottom of eclipse, add-remove option, then do it!

  3. If there is a error like red dotted line under the <% characters, you have to check the status of apache tomcat library.
    -First of first, check the status of the Servers named project, if closed, please open it.
    -Second, go to Preference - Server - Runtime Environments, check and edit the source location and recreate a new server for your project.

Several Shits (which I have to eat)!

  1. Object out which supports us for printing data with different types.
    for example, String str = "hello world"; out.println(str);

  2. JSP declare using <%! and %> to define as universal variables in same page. (Between <bodyand /body>)

  3. JSP expression is also in body session, but with following <br/>. It can print directly as strings.

The content of this blog is summarized from jikexueyuan JSP courses.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值