欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

javascript当中null和undefined的==和===的比较

程序员文章站 2022-03-29 10:41:52
javascript当中null和undefined的==和===的比较 ......

1.用init-param获取:

例:1.1.1

servlethello1.java:
package com;
import java.io.ioexception;
import java.io.printwriter;
import javax.servlet.servletexception;
import javax.servlet.http.httpservlet;
import javax.servlet.http.httpservletrequest;
import javax.servlet.http.httpservletresponse;

public class servlethello1 extends httpservlet {
    protected void doget(httpservletrequest request,httpservletresponse response) throws servletexception, ioexception {
        string salary = getinitparameter("zhangsan");
        system.out.println("salary is "+salary);
    }
}

 

在web.xml中加入:

    <servlet>
        <servlet-name>servlethello1</servlet-name>
        <servlet-class>com.servlethello1</servlet-class>
             <init-param>
                 <param-name>zhangsan</param-name>
                 <param-value>1000</param-value>
             </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>servlethello1</servlet-name>

文章转载自原文: