2009-05-28 3 views

답변

0

덕분에 나는 내 인터셉터에 다음을 추가 :

/** 
* @param strutsActionExtension the strutsActionExtension to set 
*/ 
@Inject(StrutsConstants.STRUTS_ACTION_EXTENSION) //Note this isn't necessarily supported 
public void setStrutsActionExtension(String strutsActionExtension) { 
    this.strutsActionExtension = strutsActionExtension; 
} 

웨스 Wannemacher이 in't 실제로 지원되는 동일한 목록에 메모 만에 변경하기가 매우 어렵다으로 미래 릴리스.

1

저는 이전 버전의 struts에 대한 대답을 알고 있습니다. 스트럿츠 버전에서 작동하지 않았습니다 (struts v2.2). 다음은 액션 맵핑이 org.apache.struts2.dispatcher.mapper.ActionMapping된다

final ActionContext context = actionInvocation.getInvocationContext();  
com.opensymphony.xwork2.util.ValueStack vs=context.getValueStack(); 
((ActionMapping)vs.getContext().get("struts.actionMapping")).getExtension(); 

... ...하지만, 작업을했다.

누군가에게 도움이 될 수 있다고 생각했습니다.

+0

문자열 "struts.actionMapping"대신 "ServletActionContext.ACTION_MAPPING"상수를 사용할 수도 있습니다.이 경우에는 이후 릴리스에서 해당 값을 변경하기로 결정합니다. – rveach