2007-11-22
关于iis asp安装和java路径小结
在servlet中
out.println(window.location="/
/指的是服务器的根路径,而不是应用的!而相对是却指的是应用上下文目录
if (uib.checkByStringItem("username", userName)) {
out
.print("<script>alert(\"用户名相同\"); window.location=\"/user/register.jsp\";</script>");..不正确
} else if (uib.checkByStringItem("user_Email", email)) {
out
.println("<script>alert(\"Email相同\"); window.location=\"user/register.jsp\";</script>");正确
} else {
uib.add(ui);
out
.println("<script>alert(\"注册成功\"); window.location=\""+appPath+"/user/login.jsp\";</script>");正确
}
RequestDispatcher rd = request.getRequestDispatcher("user/linklist.jsp");
rd.forward(request, response);
RequestDispatcher rd = request.getRequestDispatcher("/user/linklist.jsp");
rd.forward(request, response);
由于/指的和相对路径都是应用!所以两个都正确了.当然,这个路径不存在的话会先报exception!
asp的安装:
尽管2003号称安全性有很大突破,但其默认支持.net架构,而抛弃使用了很久的大众化的Asp的路线缺饱受质疑,
一、 启用Asp支持
windowsServer2003默认安装,是不安装IIS 6的需要另外安装,安装完IIS 6,还需要单独开启对于ASP的支持.
第一步:启用Asp,进入:控制面板→管理工具→IIS(Internet服务器) →Web服务扩展→Active Server Pages→允许
控制面板→管理工具→IIS(Internet服务器) →Web服务扩展→在服务端的包含文件→允许
第二步,用父路径支持.
IIS-网站-主目录-配置-选项-启用父路径
第三步,权限分配
IIS-网站-(具体站点)-(右键)权限-Users完全控制
二、 解决windows最大只能上载200K的限制.
先在服务里关闭iis admin service服务先到windows\system32\inesrv\下的metabase.xml,打开,找到ASPMaxrequestEntyAllowed?把他修改为需要的值,然后重启iis admin service服务
以上操作完成这后,在windows2003中即可以实现动态ASP技术了.
在windows 2003 server中编写asp代码,你可能会碰到下面的错误提示“不允许的父路径”,涉及到的代码有:
Server.MapPath(../)
<!--#include file="../"-->
out.println(window.location="/
/指的是服务器的根路径,而不是应用的!而相对是却指的是应用上下文目录
if (uib.checkByStringItem("username", userName)) {
out
.print("<script>alert(\"用户名相同\"); window.location=\"/user/register.jsp\";</script>");..不正确
} else if (uib.checkByStringItem("user_Email", email)) {
out
.println("<script>alert(\"Email相同\"); window.location=\"user/register.jsp\";</script>");正确
} else {
uib.add(ui);
out
.println("<script>alert(\"注册成功\"); window.location=\""+appPath+"/user/login.jsp\";</script>");正确
}
RequestDispatcher rd = request.getRequestDispatcher("user/linklist.jsp");
rd.forward(request, response);
RequestDispatcher rd = request.getRequestDispatcher("/user/linklist.jsp");
rd.forward(request, response);
由于/指的和相对路径都是应用!所以两个都正确了.当然,这个路径不存在的话会先报exception!
asp的安装:
尽管2003号称安全性有很大突破,但其默认支持.net架构,而抛弃使用了很久的大众化的Asp的路线缺饱受质疑,
一、 启用Asp支持
windowsServer2003默认安装,是不安装IIS 6的需要另外安装,安装完IIS 6,还需要单独开启对于ASP的支持.
第一步:启用Asp,进入:控制面板→管理工具→IIS(Internet服务器) →Web服务扩展→Active Server Pages→允许
控制面板→管理工具→IIS(Internet服务器) →Web服务扩展→在服务端的包含文件→允许
第二步,用父路径支持.
IIS-网站-主目录-配置-选项-启用父路径
第三步,权限分配
IIS-网站-(具体站点)-(右键)权限-Users完全控制
二、 解决windows最大只能上载200K的限制.
先在服务里关闭iis admin service服务先到windows\system32\inesrv\下的metabase.xml,打开,找到ASPMaxrequestEntyAllowed?把他修改为需要的值,然后重启iis admin service服务
以上操作完成这后,在windows2003中即可以实现动态ASP技术了.
在windows 2003 server中编写asp代码,你可能会碰到下面的错误提示“不允许的父路径”,涉及到的代码有:
Server.MapPath(../)
<!--#include file="../"-->
发表评论
- 浏览: 17275 次
- 性别:

- 来自: 广州

- 详细资料
搜索本博客
最新评论
-
WebWork教程二
一个字"好". 现在公司正在用这个框架,太感谢楼主了. 希望加我MSN:lei ...
-- by leibin2009 -
对天乙社区bbscs8实现的详 ...
太爽了交个朋友可以吗?? QQ10046417 MSN:kson34@hotma ...
-- by jason34 -
对天乙社区bbscs8实现的详 ...
好东西呀,谢谢!
-- by xp84012493 -
同行一边居左 一边居右 d ...
<div style="float:left;width=100px;bo ...
-- by sgwood -
对天乙社区bbscs8实现的详 ...
非常感谢楼主!
-- by qinghe3012






评论排行榜