相对路径/绝对路径(举例一html)
http://localhost:8080/tj16/
"/"代表根目录,"./" 代表当前目录,"../"代表上级目录。
服务器端的相对地址指的是相对于你的web应用的地址,是在服务器端解析的。(http://localhost:8080/tj16/)
html页面中的相对地址都是相对于服务器根目录,是客户端浏览器解析的。(http://localhost:8080/)
webapp tj16
i:/test/tj16/a.jsp
i:/test/tj16/aa/aa.jsp
i:/test/tj16/aa/bb.jsp
i:/test/tj16/aa/cc/c.jsp
地址栏中输入地址:[http://localhost:8080/tj16/aa/aa.jsp]
aa.jsp中内容
(1)<a href="../a.jsp">test1</a> || 连接到[http://localhost:8080/tj16/a.jsp]
(2)<a href="/tj16/a.jsp">test2</a> || 连接到[http://localhost:8080/tj16/a.jsp]
(3)<a href="/a.jsp">test3</a> || 连接到[http://localhost:8080/a.jsp]
(4)<a href="./bb.jsp">test4</a> || 连接到[http://localhost:8080/aa/bb.jsp]
(5)<a href="bb.jsp">test5</a> || 连接到[http://localhost:8080/aa/bb.jsp]
(6)<a href="cc/c.jsp">test6</a> || 连接到[http://localhost:8080/aa/cc/c.jsp]
设置<form>标签中的action值为上面的href值,两者得到的结果一致(一致:地址栏中的结果和页面显示的结果)。
[for example:]
<form action="/tj16/a.jsp">
<input type="submit">
</form>
路径解析:[http://localhost:8080/tj16/aa/aa.jsp]
(a) "/" ---->[http://localhost:8080/] (根目录)
(b) "./" --->[http://localhost:8080/tj16/aa/] (当前目录)
(c) "../"--->[http://localhost:8080/tj16/] (上一级目录)
注:当前目录可以省略不写,如aa.jsp中的(5)和(4)结果是一样的
从结果可以看出,这三者"/",
相关文档:
此处嵌入的flash里面的图片是可以随时发生改变的图片(动态图片)
注意蓝色字体的地方,这些地方都要统一
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="${ctx}/ui/Login/AC_RunActiveContent.js"
language="javascript"></script& ......
1. web.config
<connectionStrings>
<add name ="myconn" connectionString="Data Source=who\SQLEXPRESS; Initial Catalog=dbname;Integrated Security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>
2.
string htmlPath = "D:\\htmlFiles";
......
这些天因为工作需要,要将一些html文件转换为chm文件,当然是需要和程序结合在一起。
后来找到NDoc,里头有一段代码是相关的,于是开始分析代码,写完之后,总结:主要是利用微软的hhc.exe来编译html文件,程序需要将具体的数据写入hhp和hhc文件。
主要代码如下:
复制C#代码保存代码public void CompileProject()
{ ......
首先在layout文件夹下的xml中 加入WebView控件
<WebView
android:id="@+id/wv1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
再在主文件中输入如下代码
public class TestDemo extends Activity {
/** Called when the activity is first created. */ ......
=======<html:messages>============
Action 中 :
ActionMessages message = new ActionMessages();
message.add(" 消息句柄 ",new ActionMessage(" 资源文件中 Key 值 ",String 类型描述信息 ));
this.addMessages(request,message);
......