if u use <img src="/test.gif">, u should put the test.gif in webapps/Root/ folder, so that, i suggest that to write <img src="<%=request.getContextPath()%>/test.gif">!
and if u wanna use the Root folder for ur webapp.
Just delete the Root folder. and write as before.
and if u wanna use the Root folder for ur webapp.
Just delete the Root folder. and write as before.
1 编辑server文件(x:\tomcat\conf\server.xml)2 只要在server.xml文件中加入如下代码即可:注意:(在server.xml中,此语句 <Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
后面添加如下语句:)
<!-- This is my site path,power by aaa -->
<Context path="/aaa" docBase="C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\aaa" debug="0"
reloadable="true" crossContext="true">
</Context>
<!-- Site setup end -->3 因为在tomcat启动时要读取server文件的信息,所以更改server文件后,一定要重新启动tomcat。
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
后面添加如下语句:)
<!-- This is my site path,power by aaa -->
<Context path="/aaa" docBase="C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\aaa" debug="0"
reloadable="true" crossContext="true">
</Context>
<!-- Site setup end -->3 因为在tomcat启动时要读取server文件的信息,所以更改server文件后,一定要重新启动tomcat。
Tags: TOMCAT
复制内容到剪贴板 程序代码
public List getMaxRsRandArticle(String hql, int num) {
List list = new ArrayList();
Transaction tx = null;
Session session = HibernateUtil.getSession();
try {
tx = session.beginTransaction();
Query query = session.createQuery(hql);
log.info("随机HQL:"+hql);
List list = new ArrayList();
Transaction tx = null;
Session session = HibernateUtil.getSession();
try {
tx = session.beginTransaction();
Query query = session.createQuery(hql);
log.info("随机HQL:"+hql);