但是里面compile的編譯環(huán)境用jdk1.4的編譯
這事為了tomcat jdk5環(huán)境能適應(yīng)jdk1.4的編譯環(huán)境,向下兼容..
突然出現(xiàn)Debug調(diào)試死機問題折騰半天不管用
Flex調(diào)試工具的安裝
一、IE下flex調(diào)試的安裝
Flex builder 3.0中使用trace( )調(diào)試時(debug方式運行,也可直接按F11運行。如果不是debug方式運行,trace函數(shù)的內(nèi)容是不會輸出的),彈出提示:
Installed Flash Player Is Not a Debugger
C:\Windows\System32\Macromed\Flash\Flash10a.ocx
Flex Builder cannot locate the required debugger version of Flash Player. You might need to install the debugger version of Flash Player 9 or reinstall Flex Builder.
Do you want to try to debug with the current version?
這是因為:flex builder 3 默認安裝的是flash player debugger 9.而最新的是 player 10 debugger版。如果安裝的是10a,也會偶爾提示這個錯誤。
下載http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_ax_debug.exe
或者
www.adobe.com/support/flashplayer/downloads.html
尋找到相對應(yīng)的Flex版本安裝后重啟Flex應(yīng)用程序就可以了。
如果出現(xiàn)不能安裝的情況,可能是版本沖突,無法自動卸載已安裝的版本。
解決安裝 Adobe Flash Player ActiveX 控件失敗的方法(也可以試試只執(zhí)行第3步卸載操作)
1、下載 Flash Player 卸載器,執(zhí)行卸載操作
http://download.macromedia.com/pub/flashplayer/current/uninstall_flash_player.exe;
或者 執(zhí)行
C:\WINDOWS\system32\Macromed\Flash\下的卸載文件
卸載完成 重啟電腦,在安裝flashplayer_10_ax_debug.exe ,這樣就可以了.
2、在eclipse中要指定瀏覽器
flex配置瀏覽器的路徑如下:window->preference->Genernal->Web Browser
+++++++++++++++++++++++++++
以上無效果,在flex中換一個debug瀏覽器設(shè)置成默認瀏覽器即可,在firefox中設(shè)置成默認瀏覽器豈可 即可..
使用flash卸載工具卸載flash版本,必須安裝兼容版本nes..,重新裝flexbuilder,在項目屬性中重新配置10.3版本,在項目屬性中重新?lián)Q成fierfox將
NPSWF32.dll
拷貝到firefox的路徑下,
C:\WINDOWS\system32\Macromed\Flash
總之:flexbuilder重新安裝,debug的flash版本先在項目定義10,然后安裝11的兼容版本
錯誤代碼如下:
Installed Flash Player Is Not a Debugger
C:\WINDOWS\system32\Macromed\Flash\Flash10c.ocx
Flex Builder cannot locate the required debugger version of Flash Player.You might need to install the debugger version of Flash Player 9 or reinstall Flex Builder.
Do you want to try to debug with the current version?
解決辦法如下:
1. 打開flex builder 3. 選擇窗口菜單然后是Preferences,選擇General,展開它,選擇web browser.選中use external web browser. 如果你的是ie就選下面的internet explorer. 完后確認.
2. 確認一下你是否已安裝了具有調(diào)試功能的flashplayer10或者9(我這里裝的10)
(1)、 http://get.adobe.com/flashplayer/ (必須先安裝這個,在執(zhí)行下面的)
(2)、 你可以去這里下載新的有調(diào)試功能的flash player.
flash 10
http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_ax_debug.exe
http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_plugin_debug.exe
flash 9
http://download.macromedia.com/pub/flashplayer/updaters/9/flashplayer_9_ax_debug.exe
http://download.macromedia.com/pub/flashplayer/updaters/9/flashplayer_9_plugin_debug.exe
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
Caused by: java.sql.SQLException: 流已被關(guān)閉
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:226)
at oracle.jdbc.driver.LongAccessor.getBytes(LongAccessor.java:165)
... 77 more
解決辦法:
將oracle的long字段,修改成number類型
java中 double類型 --------- oracle中 number類型
java中 int類型 --------- oracle中 integer類型
1.屬性preferences目錄tomcat屬性下version和tomcat home需要設(shè)置對應(yīng)版本
2.comcat advanced目錄下對應(yīng)的tomcat base也需要對應(yīng)相應(yīng)版本
tomcat 6在使用redio進行
DeliveryMainIndex obj = (DeliveryMainIndex)this.bindRequestToBean(DeliveryMainIndex.class);
反射時候取值會有問題.
在對httprequest req
req重新設(shè)置時候每次都會循環(huán)原來的req值所以進行亂碼處理的時候不能用
SUserInfo account = (SUserInfo)session.getAttribute("suserInfo");
session中的account 進行set,然后返回account ,這樣會把set值循環(huán),如果改變了其中一個
convert(username, "ISO8850-1","GBK")
convert(username, "ISO8850-1","ISO8850-1")

public static String convert(String src, String decoding, String encoding)
{
if(src == null || decoding == null || encoding == null)
return null;

if(decoding.equals(encoding))
return src;

String rs = null;

try
{
byte[] tb = src.getBytes(decoding);
rs = new String(tb, 0, tb.length, encoding);

} catch (UnsupportedEncodingException e)
{
rs = src;
}

return rs;
或者:String username =new String(request.getParameter("username").getBytes("iso8859-1"),"gbk");

在tomcat文件夾的conf\catalina\localhost增加project .xml文件
文件內(nèi)容:
<Context path="/project" reloadable="true" docBase="E:\javastudio\oob" workDir="E:\javastudio\oob\work" />
docBase是項目文件夾的web-inf文件夾的上一層目錄
workDir是指Tomcat解析Jsp轉(zhuǎn)換為Java文件,并編譯為class存放的文件夾,設(shè)置 在項目文件夾里面,可以避免移植到其他地方首次讀取jsp文件需要重新解析 。一般格式:項目文件夾\work
reloadable是指可以重新加載,一般設(shè)置為true,方便使用,不需要經(jīng)常重啟Tomcat。
以后啟動Tomcat,在瀏覽器輸入http://localhost:8080/project就能訪問該項目的welcome文件。
***************
為什么要不修改server.xml呢?在Tomcat6的doc幫助文檔中,官方是不提倡修改 server.xml來添加虛擬目錄的!
而我認為,以上使用的方法,非常方便于項目的移植,移植后,只有修改docBase和workDir的值就行了,甚至可以去掉workDir這個屬性!
***************


代碼

<Context path="/ucshop" reloadable="true" docBase="G:\UCshop\ucshop" workDir="G:\UCshop\ucshop\work">

<Resource name="jdbc/ucshop" auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=ucshop"
username="sa"
password="sa"
maxIdle="5"
maxWait="5000"
maxActive="10"/>

</Context>

注:如果不需要數(shù)據(jù)源,可以不寫resource標簽的部分。


