posts - 48, comments - 13, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

原来原因在这里:
css文件里font-family: "黑体";这句导致后面的css定义全部不起作用了。
只要把font-family: "黑体";
改成
font-family:黑体;
就行了,去掉空格和双引号。
这个问题只存在于IE6中。
 


posted @ 2009-01-05 17:45 董锐 阅读(2137) | 评论 (1)编辑 收藏

    由于服务器上之前已安装Confluence, 它已自带了tomcat1.5。
而我想在服务器上再启用tomcat1.6,发布我的包。我用的是解压版。
在网上看了很多改端口的设置,在server.xml中将所有端口+1后,运行startup.bat,发现启动的还是tomcat1.5。
于是我修改了startup.bat,终于成功启动tomcat1.6了,以下红色标注的是修改的地方:

@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem     http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem
rem $Id: startup.bat 562770 2007-08-04 22:13:58Z markt $
rem ---------------------------------------------------------------------------

rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
rem# if not "%CATALINA_HOME%" == "" goto gotHome//
set CATALINA_HOME=%CURRENT_DIR%
set JAVA_HOME="C:\Sun\SDK\jdk"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set CATALINA_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find %EXECUTABLE%
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

call "%EXECUTABLE%" start %CMD_LINE_ARGS%

:end


posted @ 2009-01-05 10:09 董锐 阅读(2371) | 评论 (0)编辑 收藏

在Eclipse下打开Window-preference,点击ant,钩中 create problem markers from "javac" results

在bulid.xml中配置红色属性就行了。

<project name="YGKH" default="help" basedir="." >

 <property name="build.dir" value="WEB-INF/classes"/>
 <property name="lib.dir" value="WEB-INF/lib"/>
 <property name="src.dir" value="src"/>
 
 <target name="help">
  <echo>
  This script requires Ant 1.5 or higher

  usage:
     ant -help  display ant help screen
     ant help   display this message
     ant clean  delete the built directory
     ant war   war
  </echo>
 </target>
 <path id="master-classpath">
  <fileset dir="${lib.dir}">
    <include name="*.jar"/>
  </fileset>
 </path>
 <target name="clean">
  <delete file="${war.file}" quiet="true"/>
  <delete dir="${build.dir}"/>
 </target>


 <target name="build" description="Compile main source tree java files into class files, generate jar files">

   <mkdir dir="${build.dir}"/>

   <javac destdir="${build.dir}"  listfiles="true"
    debug="true" deprecation="false" optimize="false" failonerror="true">
    <src path="${src.dir}"/>
    <classpath refid="master-classpath"/>
   </javac>
   <copy todir="${build.dir}" preservelastmodified="true">
     <fileset dir="${src.dir}">
      <include name="**/*.xml"/>
     </fileset>
   </copy>
 </target>

 <target name="war" depends="build">
  <war warfile="YGKH.war" webxml="WEB-INF/web.xml">
   <fileset dir="../YGKH">
    <include name="images/**"/>
    <include name="WEB-INF/**"/>
    <include name="css/**"/>
    <include name="js/**"/>
    <include name="*.html"/>
   </fileset>
   
  </war>
 </target>
 <target name="all" depends="clean,build,war" description="Clean,build,war"/>
</project>

posted @ 2009-01-05 10:03 董锐 阅读(697) | 评论 (0)编辑 收藏

如:
public abstract void setModifyItem(String item);
 public abstract String getModifyItem();

public void saveAndSubmit(){
  saveEach();
  setModifyItem("");
  refreshDetailItem();
 }



<span jwcid="@If" condition="ognl:modifyItem">
    .......
</span>
    <span jwcid="@Else" >
    ...........
</span>

在listener中将modifyItem设为空字符串后,页面显示的还是@If下的内容,而不是@Else后的内容,这是为什么呢?

posted @ 2009-01-03 22:41 董锐 阅读(247) | 评论 (1)编辑 收藏

在本机调试程序时,有时会出现这个错误,重新启动服务就好了,但不知为什么会出现这样的问题,不知道项目正式上线使用的时候会不会出现这样的问题。
严重: Servlet.service() for servlet ygkh threw exception
java.lang.OutOfMemoryError: PermGen space
 at org.apache.tapestry.error.RequestExceptionReporterImpl.reportRequestException(RequestExceptionReporterImpl.java:46)
 at $RequestExceptionReporter_11e9cad1906.reportRequestException($RequestExceptionReporter_11e9cad1906.java)
 at $RequestExceptionReporter_11e9cad1905.reportRequestException($RequestExceptionReporter_11e9cad1905.java)
 at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:53)
 at $ExceptionPresenter_11e9cad18e8.presentException($ExceptionPresenter_11e9cad18e8.java)
 at $ExceptionPresenter_11e9cad18e7.presentException($ExceptionPresenter_11e9cad18e7.java)
 at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
 at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
 at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
 at $WebRequestServicer_11e9cad1945.service($WebRequestServicer_11e9cad1945.java)
 at org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:48)
 at $WebRequestServicerFilter_11e9cad1947.service($WebRequestServicerFilter_11e9cad1947.java)
 at $WebRequestServicer_11e9cad1949.service($WebRequestServicer_11e9cad1949.java)
 at $WebRequestServicer_11e9cad1941.service($WebRequestServicer_11e9cad1941.java)
 at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
 at $ServletRequestServicer_11e9cad1927.service($ServletRequestServicer_11e9cad1927.java)
 at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
 at $ServletRequestServicerFilter_11e9cad1923.service($ServletRequestServicerFilter_11e9cad1923.java)
 at $ServletRequestServicer_11e9cad1929.service($ServletRequestServicer_11e9cad1929.java)
 at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
 at $ServletRequestServicerFilter_11e9cad1921.service($ServletRequestServicerFilter_11e9cad1921.java)
 at $ServletRequestServicer_11e9cad1929.service($ServletRequestServicer_11e9cad1929.java)
 at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
 at $ServletRequestServicerFilter_11e9cad1925.service($ServletRequestServicerFilter_11e9cad1925.java)
 at $ServletRequestServicer_11e9cad1929.service($ServletRequestServicer_11e9cad1929.java)
 at $ServletRequestServicer_11e9cad191b.service($ServletRequestServicer_11e9cad191b.java)
 at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
 at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

posted @ 2009-01-03 22:31 董锐 阅读(2028) | 评论 (0)编辑 收藏

这是正常的显示效果:<input jwcid="@Submit" listener="listener:deleteUser" parameters="ognl:components.table.tableRow.id" value="删除"/>
这是不正常的显示效果:<input jwcid="@Submit" listener="listener:khDetail" parameters="ognl:components.toDoTable.tableRow" value="去评 "/>

真是好奇怪哦!在.html中都是用的@Submit啊!

posted @ 2009-01-03 21:36 董锐 阅读(229) | 评论 (0)编辑 收藏

.java文件中:
public void pageBeginRender(PageEvent event) {
  if (getUser()==null) {
   getRequestCycle().activate("Home");
  }
  //if (!getRequestCycle().isRewinding()){    !!如果这行不注释掉,就会出现这个错误,注释掉这行就可以正常运行,是为什么啊?
   List<KhItem> itemList=getKhImpl().getKhTodo(getUser().getUserID());
   for(int i=0;i<itemList.size();i++)
    itemList.get(i).setOrderNum(i+1);
   setTodoList(itemList);
  //}
 }

在.page文件中;
<property name="todoList" />
<component id="toDoTable" type="contrib:Table">
  <binding name="source" value="todoList"/>
  <binding name="columns" value="literal:orderNum,khCategaryName,khBegintime,khEndtime,employeeName,todo"/>
  <binding name="pageSize" value="30"/>
  <binding name="tableSessionStateManager"
   value="new org.apache.tapestry.contrib.table.model.common.FullTableSessionStateManager()"/>
 </component>

在.html文件中:
<table class="ForrestTable" cellspacing="1" cellpadding="4" jwcid="toDoTable">
   <tr><th></th><th></th><th></th><th></th><th></th><th></th></tr>
   <tr >
   <td></td>
   <td></td>
   <td></td>
   <td></td>
   <td></td>
   <td jwcid="todoColumnValue@Block" >
    <input jwcid="@Submit" listener="listener:khDetail" parameters="ognl:components.toDoTable.tableRow" value="去评 "/>
   </td>
   </tr>
   </table>

错误:

org.apache.hivemind.ApplicationRuntimeException
Either the tableModel parameter or both source and columns parameters must be specified by component Role/toDoTable.tableView
Stack Trace:
  • org.apache.tapestry.contrib.table.components.TableView.getTableModel(TableView.java:220)
  • org.apache.tapestry.contrib.table.components.TableView.validateValues(TableView.java:465)
  • org.apache.tapestry.contrib.table.components.TableView.renderComponent(TableView.java:497)
  • $TableView_86.renderComponent($TableView_86.java)
  • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
  • org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
  • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
  • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
  • org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:86)
  • $IfBean_71.renderComponent($IfBean_71.java)
  • org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
  • org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
  • org.apache.tapestry.form.FormSupportImpl.rewind(FormSupportImpl.java:573)
  • org.apache.tapestry.form.Form.renderComponent(Form.java:226)

posted @ 2009-01-03 21:25 董锐 阅读(418) | 评论 (0)编辑 收藏

    新年到了,找了个新家,希望能在这里认识众多的邻居,还望各位邻居们能多多指点哦!
    在这里向各位邻居们,还有物业管理的工作者们拜个新年了!!!祝大家在新的一年里一直牛!!!!

posted @ 2009-01-02 11:51 董锐 阅读(64) | 评论 (0)编辑 收藏

仅列出标题
共5页: 上一页 1 2 3 4 5