在浏览器中输入http://localhost:8080/jeecms,回车
首先进入配置文件web.xml,
<context-param> <param-name>contextConfigLocation</param-name> <!----> <param-value> /WEB-INF/config/application-context.xml /WEB-INF/config/cache-context.xml /WEB-INF/config/captcha-context.xml /WEB-INF/config/jeecore-context.xml /WEB-INF/config/jeecms-context.xml </param-value> </context-param>
应用范围内的初始化参数
其中jeecms-context.xml是对标签的初始化
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.shtml</welcome-file> <welcome-file>index.jhtml</welcome-file> </welcome-file-list>
通过以上标签找到应该加载哪一个页面
<servlet> <servlet-name>JeeCmsFront</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/jeecms-servlet-front.xml</param-value> </init-param> 2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>JeeCmsFront</servlet-name> <url-pattern>*.jhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>JeeCmsFront</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>JeeCmsFront</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>JeeCmsFront</servlet-name> <url-pattern>*.htm</url-pattern> </servlet-mapping>
通过servlet配置,可以找到jeecms-servlet-front.xml,在此配置文件的最后有
<import resource="jeecms-servlet-front-action.xml"/>代码
找到jeecms-servlet-front-action.xml,在此配置文件中有
<bean id="dynamicAct" class="com.jeecms.cms.action.front.DynamicPageAct"/>
可以找到类DynamicPageAct,此类是首页模板。
在类DynamicPageAct中有
public static final String TPL_INDEX = "tpl.index";
找到WEB-INFlanguagesjeecms_front下messages_zh_CN.properties配置文件,可以找到对应的首页面
tpl.index=首页(工程中的首页.html文件)