ChinaUnix.net
相关文章推荐:

javascript 得到当前jsp的路径

script language="javascript"> var pos,str,para,parastr,tempstr1; tempstr=""; //接收url str = window.location.href; pos = str.indexOf("?") parastr = str.substring(pos+1); document.write(" 文件路径:"+str); if (pos>0){ document.write(" 所有参数:"+parastr); } else { document.write ("无参数"); } if (str.indexOf("&")>0){ para = parastr.split("&"); for(i=0;iscript> 本文来自ChinaUnix博客,如果...

by leaslie - php文档中心 - 2006-03-29 14:39:18 阅读(905) 回复(0)

相关讨论

jsp中获得当前应用的相对路径和绝对路径 根目录所对应的绝对路径:request.getRequestURI() 文件的绝对路径  :application.getRealPath(request.getRequestURI()); 当前web应用的绝对路径 :application.getRealPath("/"); 取得请求文件的上层目录:new File(application.getRealPath(request.getRequestURI())).getParent() Servlet中获得当前应用的相对路径和绝对路径 根目录所对应的绝对路径:request.getServletPath(); 文件...

by qdl2010 - Java文档中心 - 2008-04-23 15:48:58 阅读(934) 回复(0)

OS 是 Solaris Web 服务器是 iPlanet 请问 jsp 中怎么得到Web 的根目录在系统中的绝对路径? 比如得到 "/usr/opt/SUNWapp/roothome/" 这个字符串 谢谢

by vi_liao - Java - 2004-03-26 16:19:39 阅读(4682) 回复(5)

System.out.println("根目录所对应的绝对路径:" + request.getServletPath() + ""); String strPathFile = request.getSession().getServletContext().getRealPath(request.getRequestURI()); System.out.println("文件的绝对路径:" + strPathFile + ""); String strDirPath = new File(request.getSession().getServletContext().getRealPath(request.getRequestURI())).getParent(); System.out.println("目录的绝对路径...

by cyril1014 - Java文档中心 - 2007-09-25 17:09:50 阅读(707) 回复(0)

Date now = new Date(); out.println(DateFormat.getTimeInstance().format(now)); jsp to display the current time The current time is: 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7965/showart_55812.html

by xingsu1021 - Java文档中心 - 2005-11-08 14:35:18 阅读(863) 回复(0)

%@ page contentType="text/html; charset=gb2312" language="java" import="java.io.*" errorPage="" %> html> head> meta http-equiv="Content-Type" content="text/html; charset=gb2312"> title>Untitled Document/title> /head> body> 当前WEB应用的物理路径:%=application.getRealPath("/")%>BR> 当前你求请的jsp文件的物理路径: %=application.getRealPat...

by daizhe - Java文档中心 - 2010-01-01 23:03:03 阅读(3590) 回复(0)

对于tomcat的容器,尝试这个容器的编码改一下 在server.xml的 中加入 URIEncoding="UTF-8" 修改后是这样 (上述出自: http://zhidao.baidu.com/question/48824138.html ) 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/65478/showart_1078631.html

by ybu2008 - Java文档中心 - 2008-07-11 11:04:06 阅读(1140) 回复(0)

script language="javascript"> function chk(){ var obj = document.getElementsByName('imgposition'); for (i=0;iobj.length;i++){ if (obj.checked){ alert(obj.value); return; } } alert('你没选'); } //--> /script> form name=form1> input type="radio" name="imgposition" value="1"> inpu...

by tangzengming - Java文档中心 - 2008-12-14 20:05:19 阅读(937) 回复(0)

请问应该如何修改jsp的发布路径啊?? 我想把它改到c:\java目录下。

by qingyingstudio - Java - 2007-02-11 03:18:46 阅读(1290) 回复(0)

不好意思,问完就可以删了 谢谢

by augusta - Web开发 - 2003-04-25 17:12:14 阅读(6077) 回复(1)

1. % java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); java.util.Date currentTime = new java.util.Date();//得到当前系统时间 String str_date1 = formatter.format(currentTime); //将日期时间格式化 String str_date2 = currentTime.toString(); //将Date型日期时间转换成字符串形式 %> 2. SCRIPT LANGUAGE="javascript"> var myDate = new Date(); myDate.getY...

by klx - Java文档中心 - 2008-11-16 10:03:47 阅读(1219) 回复(0)