jsp命名与struts2的Action方法名关联冲突问题
问题描述如下:
1、jsp命名为:fortuneWayPoints.jsp,文件中只有一行显示文字。
2、Struts的Action配置为:
/jsp/kefu/lieyanzhetian/fortuneWayPoints.jsp
playerLogAction中方法有:
public String initFortuneWayPoints(){
return "fort";
}
public String getFortuneWayPoints(){
return "fortuneWayPoint";
}
3、在进入fortuneWayPoints.jsp页面调用playerLogAction的初始化方法initFortuneWayPoints时,在初始化方法return返回时会自动调用getFortuneWayPoints()方法。
个人认为解决思路:
初步认为与struts框架有关,action方法名与jsp文件名有关联,get+jsp文件名,会被struts2框架自动调用。
是否有知道struts内部规则和命名约定是怎样的。
请各路高手指点