struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li <ampyx...@gmail.com>
Subject Re: StrutsTestCases
Date Mon, 24 Apr 2006 10:07:58 GMT
A web application that is packed as a war file and deployed to Tomcat or
JBoss can work properly without having web.xml. Since you are using struts
and jsp. You need tell the server what is the servlet parser as well as
someother info. So make sure there is a "VALID" web.xml in your application
folder /WEB-INF.

On 4/24/06, Chaitanya Parkhi <struts.cdp@gmail.com> wrote:
>
> hi guys i hav created a java file by using MockObjectStrutsTestCases which
> tests for a simple login form which takes Login Name & password as a
> input.in this file i hav following method
>
> public void testSuccessfulLogin() {
>
>         setConfigFile("/WEB-INF/struts-config.xml");
>
>         setRequestPathInfo("/login");
>         addRequestParameter("username","cdp");
>         addRequestParameter("password","cdp@7");
>
>         actionPerform();
>
>         String[] actionErrors = {"username.required","password.required"};
>         verifyActionErrors(actionErrors);
> }
>
> if i run the above test junit window shows that ther  r no errors,but
> shows
> a warning that WB-INF\web.xml not found  does any1 knows why?
>
>


--
=====================================
The world will be ended if love is everywhere.
                                               ---- Shawzi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message