well ... sorry for that , this is a wrong typing when I post this
question.
In my struts-config.xml , the slash is not missing.
I add log4J in my app to trace my code :
public class ShowDocsAct extends org.apache.struts.action.Action{
private Category _cat = Category.getInstance(this.getClass());
public ActionForward execute(ActionMapping mapping,
ActionForm form,
ServletRequest request,
ServletResponse response)
throws Exception{
//print out this line in log file to prove the process has come
into this class
_cat.info("come into Action");
return mapping.findForward("success");
}
}
But I can not find the evidence that the process has come into this
Action class.
My struts-config.xml is as following :
<action-mappings>
<action path="/Welcome" forward="/welcomeStruts.jsp"/>
<action path="/ShowDocs"
type="com.kenhu.cdms.servlet.ShowDocsAct">
<forward name="success" path="/showDocs.jsp" />
</action>
</action-mappings>
The URL that I ask my browser to browse is :
http://localhost:8080/cdms/ShowDocs.do
Help ! what do I go wrong ?
Ken
於 四,2006-11-16 於 15:16 +0000,Lance Semmens 提到:
> I think you're missing a '/'
> <forward name="success" path="/showDocs.jsp" />
>
> To keep your webapp a bit cleaner, perhaps consider
> <forward name="success" path="/WEB-INF/jsps/showDocs.jsp" />
>
> -----Original Message-----
> From: Ken Hu [mailto:[EMAIL PROTECTED]
> Sent: 16 November 2006 09:03
> To: [email protected]
> Subject: can not reach the jsp file
>
> Dear All:
>
> I'm doing a simple strus test, but all I can see after I try to visit
> "ShowDocs.do" is a blank page.
>
> struts-config.xml:
> <action-mappings>
> <action path="/Welcome" forward="/welcomeStruts.jsp"/>
> <action path="/ShowDocs"
> type="com.kenhu.cdms.servlet.ShowDocsAct">
> <forward name="success" path="showDocs.jsp" />
> </action>
> </action-mappings>
>
> My Action class:
> public ActionForward execute(ActionMapping mapping,
> ActionForm form,
> ServletRequest request,
> ServletResponse response)
> throws Exception{
> return mapping.findForward("success");
> }
>
> I can not find anything wrong , could someone please tell me what's
> going on here ?
>
> Thanks
--
研發部 胡重威 Ken Hu [EMAIL PROTECTED]
孟華科技股份有限公司
http://www.mmti.com.tw
地址: 高雄市802苓雅區中正一路120號4F-7
電話: 07-7279337 分機: 120
傳真: 07-7279377
行動: 0937083880
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]