Does Welcome.do work correctly? I would first try to get that working because then you will know that your jsp's are in the correct directory and you are calling the do from the correct directory.
If Welcome.do doesn't work, check out: - check that you have defined that *.do is mapped to Struts servlet in your web.xml file. There should be a <servlet> section which references org.apache.struts.action.ActionServlet and /WEB-INF/struts-config.xml, and a <servlet-mapping> that maps *.do to the action servlet. - check that your URL is to the correct path, e.g. if you deploy in test.war and your app server is on your machine listening on 8080, your url should be http://localhost:8080/test/Welcome.do and that should bring up your JSP If those are set up right, then: - You want to be able to tell where the problem is, if your action is not being called, or if it's not forwarding to your JSP - put some kind of logging (or a breakpoint if debugging) in your action to verify that your action class is being executed - print out the mapping you get (mapping.findForward()) to make sure that it exists and you haven't made a typo, and see what JSP it's going to forward to. - You have probably already done this, but make your jsp very simple, just "<html><body><h1>hello</h1></body></html>" will do HTH, -ed On 11/16/06, Ken Hu <[EMAIL PROTECTED]> wrote:
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]