感谢google,感谢"webwork2.2.2的富文本编辑器的不完美解决方法"一文,感谢李李。当然,最应该感谢的是开源(刨源代码刨出来的)。
		1、解决/webwork/*的路径问题
解决办法见“http://www.blogjava.net/mmwy/archive/2006/08/18/64234.html”
BTW:也可以象“不完美解决方法”一文中描述的一样,设webwork.serve.static=false,将static/下的东西拷至/webwork目录下。
		2、重写(继承)DefaultRichtexteditorConnector类,解决无法在windows平台上创建目录的问题
		
				 1
				 
				 public
				 
				class
				 RichtexteditorConnector 
				extends
				 DefaultRichtexteditorConnector
				public
				 
				class
				 RichtexteditorConnector 
				extends
				 DefaultRichtexteditorConnector 
				
						 {
				
				
						{
						 2
						
								 
								 /** */
						
								/**
  
						/** */
						
								/**
								
										
								
								 3
								
										 * 解决无法在windows平台上创建目录的问题
   * 解决无法在windows平台上创建目录的问题
								 4
								
										 * overriding methods
   * overriding methods
								 5
								
										 * (non-Javadoc)
   * (non-Javadoc)
								 6
								
										 * 
								@see
								 com.opensymphony.webwork.components.DefaultRichtexteditorConnector#calculateActualServerPath(java.lang.String, java.lang.String, java.lang.String)
   * 
								@see
								 com.opensymphony.webwork.components.DefaultRichtexteditorConnector#calculateActualServerPath(java.lang.String, java.lang.String, java.lang.String)
								 7
								
										 */
   
								*/
						
						
								
						
						 8
						
								 protected
						 String calculateActualServerPath(String actualServerPath,
  
						protected
						 String calculateActualServerPath(String actualServerPath,
						 9
						
								 
								 String type, String folderPath) 
						throws
						 Exception
      String type, String folderPath) 
						throws
						 Exception 
						
								 {
						
						
								{
								10
								
										 String path 
								=
								 StringUtils.replaceChars(
								"
								file:///
								"
    String path 
								=
								 StringUtils.replaceChars(
								"
								file:///
								"
								
										
								
								11
								
										 +
								 servletContext.getRealPath(
								"
								/
								"
								 
								+
								 actualServerPath), 
								'
								\\
								'
								, 
								'
								/
								'
								);
        
								+
								 servletContext.getRealPath(
								"
								/
								"
								 
								+
								 actualServerPath), 
								'
								\\
								'
								, 
								'
								/
								'
								);
								12
								
										 makeDirIfNotExists(path);
    makeDirIfNotExists(path);
								13
								
										 path 
								=
								 path.endsWith(
								"
								/
								"
								)
    path 
								=
								 path.endsWith(
								"
								/
								"
								)
								14
								
										 ?
								 path
      
								?
								 path
								15
								
										 : path 
								+
								 
								"
								/
								"
								;
      : path 
								+
								 
								"
								/
								"
								;
								16
								
										 return
								 path 
								+
								 type 
								+
								 folderPath;
    
								return
								 path 
								+
								 type 
								+
								 folderPath;
								17
								
										 }
  }
						
						
								
						
						18
						
								 
								
						
						19
						
								 private
						 ServletContext servletContext;
  
						private
						 ServletContext servletContext;
						20
						
								 
								
						
						21
						
								 
								 public
						 
						void
						 setServletContext(ServletContext servletContext)
  
						public
						 
						void
						 setServletContext(ServletContext servletContext) 
						
								 {
						
						
								{
								22
								
										 this
								.servletContext 
								=
								 servletContext;
    
								this
								.servletContext 
								=
								 servletContext;
								23
								
										 }
  }
						
						
								
						
						24
						
								 }
}
				
		 
		3、配置webwork.xml,解决上传路径自定义问题(actualServerPath参数,默认的使用DefaultRichtexteditorConnector类中protected String _actualServerPath = "/com/opensymphony/webwork/static/richtexteditor/data/";的定义),解决获取上传文件url路径问题(默认的使用AbstractRichtexteditorConnector类中String _serverPath = "/webwork/richtexteditor/data/";的定义)
		
				 1
				 <
				package
				    
				<
				package
				 2
				
						 name
				="richtexteditor-browse"
        
				name
				="richtexteditor-browse"
				
						
				
				 3
				
						 extends
				="webwork-default"
        extends
				="webwork-default"
				
						
				
				 4
				
						 namespace
				="/webwork/richtexteditor/editor/filemanager/browser/default/connectors/jsp"
				>
        namespace
				="/webwork/richtexteditor/editor/filemanager/browser/default/connectors/jsp"
				>
				
						
				
				 5
				
						 <
				action
        
				<
				action
				 6
				
						 name
				="connector"
            
				name
				="connector"
				
						
				
				 7
				
						 class
				="com.mmwy.weblogic_sitemesh.util.RichtexteditorConnector"
            class
				="com.mmwy.weblogic_sitemesh.util.RichtexteditorConnector"
				
						
				
				 8
				
						 method
				="browse"
				>
            method
				="browse"
				>
				
						
				
				 9
				
						 <
				result
            
				<
				result
				10
				
						 name
				="getFolders"
                
				name
				="getFolders"
				
						
				
				11
				
						 type
				="richtexteditorGetFolders"
				 
				/>
                type
				="richtexteditorGetFolders"
				 
				/>
				
						
				
				12
				
						 <
				result
            
				<
				result
				13
				
						 name
				="getFoldersAndFiles"
                
				name
				="getFoldersAndFiles"
				
						
				
				14
				
						 type
				="richtexteditorGetFoldersAndFiles"
				 
				/>
                type
				="richtexteditorGetFoldersAndFiles"
				 
				/>
				
						
				
				15
				
						 <
				result
            
				<
				result
				16
				
						 name
				="createFolder"
                
				name
				="createFolder"
				
						
				
				17
				
						 type
				="richtexteditorCreateFolder"
				 
				/>
                type
				="richtexteditorCreateFolder"
				 
				/>
				
						
				
				18
				
						 <
				result
            
				<
				result
				19
				
						 name
				="fileUpload"
                
				name
				="fileUpload"
				
						
				
				20
				
						 type
				="richtexteditorFileUpload"
				 
				/>
                type
				="richtexteditorFileUpload"
				 
				/>
				
						
				
				21
				
						 <
						param 
						name
						="actualServerPath"
						>
						/upload/
						</
						param
						>
            
				
						<
						param 
						name
						="actualServerPath"
						>
						/upload/
						</
						param
						>
				
				
						
				
				22
				
						 <
						param 
						name
						="serverPath"
						>
						/upload/
						</
						param
						>
            
				
						<
						param 
						name
						="serverPath"
						>
						/upload/
						</
						param
						>
				
				
						
				
				23
				
						 </
				action
				>
        
				</
				action
				>
				
						
				
				24
				
						 </
				package
				>
    
				</
				package
				>
				
						
				
				25
				
						 
						
				
				26
				
						 <
				package
    
				<
				package
				27
				
						 name
				="richtexteditor-upload"
        
				name
				="richtexteditor-upload"
				
						
				
				28
				
						 extends
				="webwork-default"
        extends
				="webwork-default"
				
						
				
				29
				
						 namespace
				="/webwork/richtexteditor/editor/filemanager/upload"
				>
        namespace
				="/webwork/richtexteditor/editor/filemanager/upload"
				>
				
						
				
				30
				
						 <
				action
        
				<
				action
				31
				
						 name
				="uploader"
            
				name
				="uploader"
				
						
				
				32
				
						 class
				="com.mmwy.weblogic_sitemesh.util.RichtexteditorConnector"
            class
				="com.mmwy.weblogic_sitemesh.util.RichtexteditorConnector"
				
						
				
				33
				
						 method
				="upload"
				>
            method
				="upload"
				>
				
						
				
				34
				
						 <
				result 
				name
				="richtexteditorFileUpload"
				 
				/>
            
				<
				result 
				name
				="richtexteditorFileUpload"
				 
				/>
				
						
				
				35
				
						 <
						param 
						name
						="actualServerPath"
						>
						/upload/
						</
						param
						>
            
				
						<
						param 
						name
						="actualServerPath"
						>
						/upload/
						</
						param
						>
				
				
						
				
				36
				
						 <
						param 
						name
						="serverPath"
						>
						/upload/
						</
						param
						>
            
				
						<
						param 
						name
						="serverPath"
						>
						/upload/
						</
						param
						>
				
				
						
				
				37
				
						 </
				action
				>
        
				</
				action
				>
				
						
				
				38
				
						 </
				package
				>
    
				</
				package
				>
		 
		注意:serverPath路径必须有后面的"/"。
4、解决获取上传文件url只能使用80端口的问题
顺着源码一直跟进,首先是DefaultRichtexteditorConnector类:
		
				1
				 
				 protected
				 String calculateServerPath(String serverPath, String folderPath, String type) 
				throws
				 Exception
				    
				protected
				 String calculateServerPath(String serverPath, String folderPath, String type) 
				throws
				 Exception 
				
						 {
				
				
						{
						2
						
								 //
						return UrlHelper.buildUrl(serverPath, _request, _response, null, _request.getScheme(), true, true, true);
        
						//
						return UrlHelper.buildUrl(serverPath, _request, _response, null, _request.getScheme(), true, true, true);
						
								
						
						3
						
								 return
						 UrlHelper.buildUrl(serverPath
						+
						type
						+
						folderPath, _request, _response, 
						new
						 HashMap(), _request.getScheme(), 
						true
						, 
						true
						, 
						true
						);
						
						        
						return
						 UrlHelper.buildUrl(serverPath
						+
						type
						+
						folderPath, _request, _response, 
						new
						 HashMap(), _request.getScheme(), 
						true
						, 
						true
						, 
						true
						);
						4
						
								 }
    }
				
		 
		再跟进UrlHelper.buildUrl方法
		
				 1
				 
				 public
				 
				static
				 String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, 
				boolean
				 includeContext, 
				boolean
				 encodeResult, 
				boolean
				 forceAddSchemeHostAndPort)
				    
				public
				 
				static
				 String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, 
				boolean
				 includeContext, 
				boolean
				 encodeResult, 
				boolean
				 forceAddSchemeHostAndPort) 
				
						 {
				
				
						{
						 2
						
								 StringBuffer link 
						=
						 
						new
						 StringBuffer();
        StringBuffer link 
						=
						 
						new
						 StringBuffer();
						 3
						
								 
								
						
						 4
						
								 boolean
						 changedScheme 
						=
						 
						false
						;
        
						boolean
						 changedScheme 
						=
						 
						false
						;
						 5
						
								 
								
						
						 6
						
								 int
						 httpPort 
						=
						 DEFAULT_HTTP_PORT;
        
						int
						 httpPort 
						=
						 DEFAULT_HTTP_PORT;
						 7
						
								 
								
						
						 8
						
								 
								 try
        
						try
						 
						
								 {
						
						
								{
								 9
								
										 httpPort 
								=
								 Integer.parseInt((String) Configuration.get(WebWorkConstants.WEBWORK_URL_HTTP_PORT));
            httpPort 
								=
								 Integer.parseInt((String) Configuration.get(WebWorkConstants.WEBWORK_URL_HTTP_PORT));
								10
								
										 
										 }
						
						 
						catch
						 (Exception ex)
        }
						
						 
						catch
						 (Exception ex) 
						
								 {
						
						
								{
								11
								
										 }
        }
						
						
								
						
						12
						
								 
								
						
						13
						
								 int
						 httpsPort 
						=
						 DEFAULT_HTTPS_PORT;
        
						int
						 httpsPort 
						=
						 DEFAULT_HTTPS_PORT;
						14
						
								 
								
						
						15
						
								 
								 try
        
						try
						 
						
								 {
						
						
								{
								16
								
										 httpsPort 
								=
								 Integer.parseInt((String) Configuration.get(WebWorkConstants.WEBWORK_URL_HTTPS_PORT));
            httpsPort 
								=
								 Integer.parseInt((String) Configuration.get(WebWorkConstants.WEBWORK_URL_HTTPS_PORT));
								17
								
										 
										 }
						
						 
						catch
						 (Exception ex)
        }
						
						 
						catch
						 (Exception ex) 
						
								 {
						
						
								{
								18
								
										 }
        }
						
						
								
						
						19
						
								 
						
				
		 
		因此,解决这个问题的方法很简单,只要在webwork.properties中设webwork.url.http.port = 8080即可。
5、语言问题
RichTextEditor标记autoDetectLanguage默认值为true,在中文环境下使用/editor/lang/zh.js,显示繁体中文字符,而简体中文应该使用zh-cn.js,因此,应设置defaultLanguage="zh-cn"。
		
				1
				 <
				@ww
				.richtexteditor
				            
				<
				@ww
				.richtexteditor
				2
				
						 theme
				="simple"
                theme
				="simple"
				
						
				
				3
				
						 defaultLanguage
				="zh-cn"
                defaultLanguage
				="zh-cn"
				
						
				
				4
				
						 width
				="750"
                width
				="750"
				
						
				
				5
				
						 height
				="500"
                height
				="500"
				
						
				
				6
				
						 name
				="description4"
				 
				/>
                name
				="description4"
				 
				/>