org.apache.jasper.JasperException: Unable to compile class for JSP 解決方案

來源:互聯網
上載者:User
org.apache.jasper.JasperException: Unable to compile class for JSP 解決方案

 

(最近經常在論壇上看到問這個錯誤的朋友,這幾天不下於4次了,在網上搜集整理一下,大家參考一下)

 

1,檢查是否將classpath設定錯誤:正確的為.;%java_home%/lib/rt.jar;%java_home%/lib/tools.jar  <!--java_home is your jdk directory-->2,This   can   usually   be   solved   by   copying   manually   $JAVA_HOME/lib/tools.jar   from   the   JDK    
  to   the   common/lib   directory   of   the   Tomcat   server,   followed   by   a   Tomcat   restart.       
  看到了嗎?  
  把jdk安裝目錄下的lib/tools.jar拷貝到tomcat安裝目錄下的common/lib目錄下,然後重啟tomcat,試試   。3,設定tomcat的字元集為GBK,預防亂碼的產生:F:/Tomcat 5.0/conf目錄下的server.xml中增加一個參數URIEncoding="GBK"for example:    <Connector  URIEncoding="GBK"
port="8080"      maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />4,增大tomcat的jvm記憶體使用量參數:在F:/Tomcat 5.0/bin目錄下的catalina.bat檔案中增加set JAVA_OPTS=-Xms256m -Xmx512mfor example:  the first word is added by us.set JAVA_OPTS=-Xms384m -Xmx768m
set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.