锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
]]>
欏跺灝變袱琛屾彁紺轟俊鎭?渚嬪:
涓ラ噸: Error listenerStart
涓ラ噸: Context [/] startup failed due to previous errors
鎴栬?/p>
涓ラ噸: Error filterStart
org.apache.catalina.core.StandardContext start
涓ラ噸: Context startup failed due to previous errors
鏌ユ壘logs鐩綍涓嬬殑淇℃伅,闄や簡榪欎袱鍙ヨ瘽,涔熸病鍒殑杈呭姪鍐呭.
緇欐煡閿欏甫鏉ヤ簡鍥伴毦,鍦ㄨ繖縐嶆儏鍐典笅,鏄洜涓篢omcat鑷韓鐨勯粯璁ゆ棩蹇楁病鏈夊皢涓浜涢敊璇俊鎭緭鍑哄埌鎺у埗鍙版垨鏂囦歡,
榪欎釜鏃跺欏垯闇瑕侀厤緗甌omcat鑷韓鐨刲og,鍚敤璇︾粏鐨勮皟璇曟棩蹇?
3.log4j閰嶇疆鏂囦歡:
log4j.properties
閰嶇疆鍐呭涓?
log4j.rootLogger=ERROR,R
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%p]%t-%c-%m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%p]%t-%c-%m%n
log4j.logger.org.apache.catalina=INFO,R,CONSOLE
#鏃ュ織綰у埆涓嶈兘澶綆,濡傛灉閰嶇疆涓篸ebug鐨勮瘽,杈撳嚭鐨勬棩蹇椾俊鎭お澶?瀵艱嚧tomcat鍚姩闈炲父鐨勬參.
4.Tomcat 6.0鎵闇鐨刯uli鏇挎崲鏂囦歡:
http://www.apache.org/dist/--escaped_anchor:079305423cce36d6691457475e081123--/tomcat-6/v6.0.18/bin/extras/tomcat-juli-adapters.jar
http://www.apache.org/dist/--escaped_anchor:079305423cce36d6691457475e081123--/tomcat-6/v6.0.18/bin/extras/tomcat-juli.jar
浠ヤ笂涓や釜閾炬帴鍩烘湰娌$敤錛屽ぇ瀹跺彲浠ユ悳绱竴涓嬶紝csdn涓婇潰鏈変漢鎻愪緵jar鍖呬笅杞斤紝榪欓噷闄勪歡涔熶笉鑳藉姞錛屾病鏈夊姙娉曘?br />
鍦═omcat6.0涓?
灝唗omcat-juli-adapters.jar,log4j-1.2.15.jar,log4j.properties澶嶅埗鍒癉:\Java\ApacheTomcat6.0.14\lib涓嬮潰.
灝唗omcat-juli.jar澶嶅埗鍒癉:\Java\apache-tomcat-6.0.14\bin\涓嬮潰.
鐒跺悗鍚姩tomcat,灝卞彲浠ュ湪D:\Java\apache-tomcat-6.0.14\logs涓嬬湅鍒皌omcat.log浜?
鍦ㄨ繖涓椂鍊?鍐嶉氳繃鏃ュ織鏂囦歡鏉ュ垎鏋?鍒欎細鍙戠幇鍑虹幇榪欑閿欒鐨勬儏鍐靛彲鑳芥湁:
(浠ヤ笅鏄垜閬囧埌鐨勫嚭閿欐儏鍐?澶у鏄簺浣庣駭閿欒)
1.webapps瑕佺敤鍒扮殑classe鏂囦歡鏍規(guī)湰娌℃湁澶嶅埗鍒癢EB-INF/classes鐩綍涓嬮潰
(java.lang.NoClassDefFoundError,鑰岃繖涓俊鎭彲鑳介粯璁ゆ病杈撳嚭鍒版帶鍒跺彴,灝ゅ叾鏄敤浜唖pring鐨?鏄ㄥぉ灝辨槸榪欎釜綺楀績鐨勪綆綰ч敊璇?
2.瑕佺敤鍒發(fā)ib鏂囦歡娌℃湁澶嶅埗瀹?緙哄皯lib
3.lib涓嬬殑鍚屼竴涓簱鐨刯ar鏂囦歡瀛樺湪澶氫釜涓嶅悓鐗堟湰,寮曡搗鐗堟湰鍐茬獊.
4.lib涓嬬殑jar涓巘omcat鐗堟湰涓嶇浉瀵瑰簲(鎴戦亣鍒扮殑闂鏄痺eb搴旂敤鍦═omcat5.5涓婅繍琛屾甯?鎹㈠埌Tomcat6.0涓婂氨鍑洪敊,
渚嬪涓涓敤浜唖truts鐨剋ebapp鍦═omcat 6涓婃姤涓嬮潰鐨勯敊璇?br />“Parse Fatal Error at line 17 column 6: The processing instruction
target matching “[xX][mM][lL]” is not allowed” )
鎰挎剰鐪嬭嫳鏂囩殑鍙互鍙傝冨畼鏂圭綉绔欒鏄?
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
鏍囪涓涓嬶細錛?nbsp;
鐩墠璁$畻鏈轟腑鐢ㄥ緱鏈騫挎硾鐨勫瓧絎﹂泦鍙婂叾緙栫爜錛屾槸鐢?a class=vLink1 id=vad_0 onmouseover="if(typeof(showTitle)!='undefined'){this.title='';window.clearTimeout(hideTO);showTitle(event, this, 0,'');}" title="嬈ф床鏃呮父鏈鍗撹秺鏈嶅姟涓庢姤浠?@Vogate.com" style="FONT-SIZE: 1em" onclick="" onmouseout="if(typeof(showTitle)!='undefined'){mouseIsOverLayer = false; mouseOverWhileLoad = false; hideTO = window.setTimeout('checkIfMouseOverLayer()',500);}" target=_blank>緹庡浗鍥藉鏍囧噯灞(ANSI)鍒跺畾鐨凙SCII鐮侊紙American Standard Code for Information Interchange錛岀編鍥芥爣鍑嗕俊鎭氦鎹㈢爜錛夛紝瀹冨凡琚浗闄呮爣鍑嗗寲緇勭粐錛圛SO錛夊畾涓哄浗闄呮爣鍑嗭紝縐頒負ISO 646鏍囧噯銆傞傜敤浜庢墍鏈夋媺涓佹枃瀛楀瓧姣嶏紝ASCII鐮佹湁7浣嶇爜鍜?浣嶇爜涓ょ褰㈠紡銆?br> 鍥犱負1浣嶄簩榪涘埗鏁板彲浠ヨ〃紺猴紙21=錛?縐嶇姸鎬侊細0銆?錛涜?浣嶄簩榪涘埗鏁板彲浠ヨ〃紺猴紙22錛?4縐嶇姸鎬侊細00銆?1銆?0銆?1錛涗緷嬈$被鎺紝7浣嶄簩榪涘埗鏁板彲浠ヨ〃紺猴紙27=錛?28縐嶇姸鎬侊紝姣忕鐘舵侀兘鍞竴鍦扮紪涓轟竴涓?浣嶇殑浜岃繘鍒剁爜錛屽搴斾竴涓瓧絎︼紙鎴栨帶鍒剁爜錛夛紝榪欎簺鐮佸彲浠ユ帓鍒楁垚涓涓崄榪涘埗搴忓彿0锝?27銆傛墍浠ワ紝7浣岮SCII鐮佹槸鐢ㄤ竷浣嶄簩榪涘埗鏁拌繘琛岀紪鐮佺殑錛屽彲浠ヨ〃紺?28涓瓧絎︺?br> 絎?锝?2鍙峰強絎?27鍙?鍏?4涓?鏄帶鍒跺瓧絎︽垨閫氳涓撶敤瀛楃錛屽鎺у埗絎︼細LF錛堟崲琛岋級銆丆R錛堝洖杞︼級銆丗F錛堟崲欏碉級銆丏EL錛堝垹闄わ級銆丅EL錛堟尟閾冿級絳夛紱閫氳涓撶敤瀛楃錛歋OH錛堟枃澶達級銆丒OT錛堟枃灝撅級銆丄CK錛堢‘璁わ級絳夛紱
絎?3锝?26鍙?鍏?4涓?鏄瓧絎︼紝鍏朵腑絎?8锝?7鍙蜂負0锝?鍗佷釜闃挎媺浼?a class=vLink1 id=vad_2 onmouseover="if(typeof(showTitle)!='undefined'){this.title='';window.clearTimeout(hideTO);showTitle(event, this, 2,'');}" title="TCL鐢?shù)瑙?@Vogate.com" style="FONT-SIZE: 1em" onclick="" onmouseout="if(typeof(showTitle)!='undefined'){mouseIsOverLayer = false; mouseOverWhileLoad = false; hideTO = window.setTimeout('checkIfMouseOverLayer()',500);}" target=_blank>鏁板瓧錛?5锝?0鍙蜂負26涓ぇ鍐欒嫳鏂囧瓧姣嶏紝97锝?22鍙蜂負26涓皬鍐欒嫳鏂囧瓧姣嶏紝鍏朵綑涓轟竴浜涙爣鐐圭鍙楓佽繍綆楃鍙風(fēng)瓑銆?br> 娉ㄦ剰錛氬湪璁$畻鏈虹殑瀛樺偍鍗曞厓涓紝涓涓狝SCII鐮佸煎崰涓涓瓧鑺?8涓簩榪涘埗浣?錛屽叾鏈楂樹綅(b7)鐢ㄤ綔濂囧伓鏍¢獙浣嶃傛墍璋撳鍋舵牎楠岋紝鏄寚鍦ㄤ唬鐮佷紶閫佽繃紼嬩腑鐢ㄦ潵媯楠屾槸鍚﹀嚭鐜伴敊璇殑涓縐嶆柟娉曪紝涓鑸垎濂囨牎楠屽拰鍋舵牎楠屼袱縐嶃傚鏍¢獙瑙勫畾錛氭紜殑浠g爜涓涓瓧鑺備腑1鐨勪釜鏁板繀欏繪槸濂囨暟錛岃嫢闈炲鏁幫紝鍒欏湪鏈楂樹綅b7娣?錛涘伓鏍¢獙瑙勫畾錛氭紜殑浠g爜涓涓瓧鑺備腑1鐨勪釜鏁板繀欏繪槸鍋舵暟錛岃嫢闈炲伓鏁幫紝鍒欏湪鏈楂樹綅b7娣?銆?br> 涓轟簡渚夸簬鏌ヨ錛屼互涓嬪垪鍑篈SCII鐮佽〃錛?br> 絎?28锝?55鍙蜂負鎵╁睍瀛楃錛堜笉甯哥敤錛?
import java.io.IOException;
import java.net.URL;
import java.util.Iterator;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;
public class Feed {
聽聽聽 public static void main(String[] args) throws Exception {
聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 SyndFeedInput input = new SyndFeedInput();
聽聽聽聽聽聽聽 //System.out.println(warmedFeed);
聽聽聽聽聽聽聽 SyndFeed feed = input.build(new XmlReader(new URL("
http://rss.news.yahoo.com/rss/topstories
")));
聽聽聽聽聽聽聽 // Iterate through feed items, adding a footer each item
聽聽聽聽聽聽聽 Iterator entryIter = feed.getEntries().iterator();
聽聽聽聽聽聽聽 while (entryIter.hasNext()) {
聽聽聽聽聽聽聽聽聽聽聽 SyndEntry entry = (SyndEntry) entryIter.next();
聽聽聽聽聽聽聽聽聽聽聽 System.out.println(entry.getPublishedDate());
聽聽聽聽聽聽聽聽聽聽聽 System.out.println(entry.getTitle());
聽聽聽聽聽聽聽聽聽聽聽 //System.out.println(entry.getDescription());
聽聽聽聽聽聽聽聽聽聽聽 //System.out.println(entry.getAuthor());
聽聽聽聽聽聽聽聽聽聽聽 System.out.println(entry.getLink());
聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 }
聽聽聽 }
}
2銆佷嬌鐢╮ome+rome fetcher
package com.ivo.rss;
import java.net.URL;
import java.util.List;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.fetcher.FeedFetcher;
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
public class RssReader {
聽聽聽 public static void main(String[] args) throws Exception {
聽聽聽聽聽聽聽 FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
聽聽聽聽聽聽聽 FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
聽聽聽聽聽聽聽 SyndFeed feed = feedFetcher.retrieveFeed(new URL(
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 "
http://feeds.feedburner.com/jscud
"));
聽聽聽聽聽聽聽 List entryList = feed.getEntries();
聽聽聽聽聽聽聽 for (int i = 0; i < entryList.size(); i++) {
聽聽聽聽聽聽聽聽聽聽聽 SyndEntry entry = (SyndEntry) entryList.get(i);
聽聽聽聽聽聽聽聽聽聽聽 System.out.println("Published Date: "+entry.getPublishedDate());
聽聽聽聽聽聽聽聽聽聽聽 System.out.println("Title: "+entry.getTitle());
聽聽聽聽聽聽聽聽聽聽聽 System.out.println("Link: "+entry.getLink());
聽聽聽聽聽聽聽聽聽聽聽 //System.out.println(entry.getDescription());
聽聽聽聽聽聽聽聽聽聽聽 SyndContent sc = entry.getDescription();
聽聽聽聽聽聽聽聽聽聽聽 System.out.println("Description: "+sc.getValue());
聽聽聽聽聽聽聽聽聽聽聽 System.out.println("------------------------------");
聽聽聽聽聽聽聽 }
聽聽聽 }
}
涓婇潰鏄嬌鐢ㄤ簡緙撳瓨鐨?涔熷氨鏄鏇存柊鎵嶈鍙?濡傛灉姣忔閮借鍙?鍒欎慨鏀瑰搴旇涓?
FeedFetcher feedFetcher = new HttpURLFeedFetcher();