读取.properties文件,校验Mac地址,遍历取值

properties文件中数据格式如下,键为序列号,值为Mac地址:587478=240.010.001.002

需求:读取.properties文件,校验Mac地址格式是否正确,判断该条数据是否在数据库中已存在,不存在时将其数据展示出来,并根据用户选择来决定是否将数据保存到数据库。

最终效果图:
在这里插入图片描述

jsp:

 <div class="portlet-body">
                <form id="searchForm" action="${baseUrl}?act=list" autocomplete="off" style="margin-bottom: 0; display: inline;">
                    <div class="row">
                        <div class="col-md-8 col-sm-12">
                            <div id="sample_1_filter" class="dataTables_filter">
                                <input id="myfile" type="file" name="myfile" style="display:none"  accept=".properties"  >
                                <label>
                                    导入:
                                    <input id="gatewayFile" name="gatewayFile" class="input-large" type="text"  style="height:30px;"  disabled >
                                    <a class="btn default" onclick="$('input[id=myfile]').click();">选择文件</a>
                                    <a class="btn red" onclick="clearUpload()">清除</a>
                                    <a class="btn green doSubmitBtnClass" onclick="doUpload()">上传</a>
                                </label>
                            </div>                           
                        </div>
                    </div>
                </form>
                <div class="row" id="prompt" style="display: none">
                    <div class="col-
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值