2013-01-01 22 views
1

我使用Maven創建項目如下的Struts 2:在struts.properties ui.theme變化沒有得到體現

mvn archetype:generate -B -DgroupId=com.myApplication -DartifactId=MyApplication - 
DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-starter - 
DarchetypeVersion=2.3.7 

後,在struts.properties文件,我改變

struts.ui.theme=xhtml 

struts.ui.theme=simple 

但是當我運行應用程序simple主題不應用。

+0

嘗試在struts.xml中定義它''。另外你如何檢查簡單的主題不適用? –

+0

它爲控件創建默認的表格結構與爲theme = xhtml – jaychapani

回答

1

在項目中和部署中查找文件struts.propertiesstruts.xml。檢查每個找到的文件在運行前和運行後都包含必要的更改。而struts.xml不包含<constant name="struts.ui.theme"。如果它不幫助嘗試搜索關鍵字struts.ui.theme的磁盤或計算機。 HTH

+0

<常數名稱=「struts.ui.theme」value =「simple」/>一起工作,但我不知道爲什麼struts.properties文件無法識別。 – jaychapani

相關問題