好贷网好贷款

jsp写手机服务端、 wap

发布时间:2016-12-5 18:33:42 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"jsp写手机服务端、 wap",主要涉及到jsp写手机服务端、 wap方面的内容,对于jsp写手机服务端、 wap感兴趣的同学可以参考一下。

<%@ page language="java" import="java.util.*" contentType="text/html" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <%! String strXMLPrologue = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; %> <%-- WML CONTENT BEGINS --%> <%= strXMLPrologue %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Cache-Control" content="no-cache"/> <meta id="viewport" name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0" /> <meta name="MobileOptimized" content="230" /> <title>app</title> <style> .l_herf { clear: both; border-bottom: 1px solid #d9d9d9; padding: 8px 0; margin: 0; font-size: 25px; line-height: 1.5; font-family: 'XinGothic-SinaWeibo','Microsoft Yahei','Simsun'; } </style> </head> <body> <div id="pick" title="download" class="l_herf"> <p> <a href='<%=basePath%>server/downloadAction!download.do' >下载App</a> </p> </div> </body> </html> <%-- WML CONTENT ENDS --%> 上面是照着sohu,sina 手机 网页写的,电脑浏览器上也可以看见 还有一种是扩展名是  <%@ page language="java" import="java.util.*" contentType="text/vnd.wap.wml" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <%! String strXMLPrologue = "<?xml version=\"1.0\"?>"; %> <%-- WML CONTENT BEGINS --%> <%= strXMLPrologue %> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="pick" title="download"> <p> <a href='<%=basePath%>server/txgjAction!download.do'>下载app</a> </p> </card> </wml>此种只可在手机上浏览,而在电脑,浏览器上不可浏览,可能还需要插件之类的

上一篇:基于S3C2410的SD卡linux驱动工作原理
下一篇:鸟哥私房菜---linux账号管理1

相关文章

相关评论