users@grizzly.java.net

Re: Am I crazy? Yes...

From: Sebastien Dionne <survivant00_at_gmail.com>
Date: Tue, 26 Jan 2010 06:26:14 -0500

I know Deployer used a war.. I was telling to looking into the code. and
the testcase are code example.

if you check in
grizzly\code\samples\comet

you have lot of Comet examples.


and here a test case

grizzly\code\modules\http-servlet\src\test\java\com\sun\grizzly\http\HelloGrizzlyWebServerTest

public void testNPERegression() throws IOException {
        System.out.println("testNPERegression");
        try {
            startGrizzlyWebServer(PORT);
            String[] aliases = new String[] { "*.php" };

            String context = "/";
            String servletPath = "war_autodeploy/php_test";
            String rootFolder = ".";

            ServletAdapter adapter = new ServletAdapter();
            adapter.setServletInstance(new HelloServlet());

            adapter.setContextPath(context);
            adapter.setServletPath(servletPath);
            adapter.setRootFolder(rootFolder);

            gws.addGrizzlyAdapter(adapter, aliases);

            gws.start();

            String url = context + servletPath + "/index.php";
            HttpURLConnection conn = getConnection(url);
            assertEquals(HttpServletResponse.SC_OK,
getResponseCodeFromAlias(conn));

            String response = readResponse(conn).toString();
            assertEquals("Hello, world!", response.trim());

        } finally {
            stopGrizzlyWebServer();
        }
    }



2010/1/25 Paul.M <paul.mattheis_at_gmail.com>

>
> I think you missed the point... Deployer uses WAR and XML? and that vague
> of an example is what is already out there. The point isn't to struggle,
> I've already struggled enough. The point is to get past that and be able
> to
> do what I originally wanted to do...
>
>
> --
> View this message in context:
> http://old.nabble.com/Am-I-crazy--Yes...-tp27316206p27317334.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>


-- 
-------------
A+
Sébastien.
Vous pouvez me suivre sur Twitter / You can follow me on Twitter :
http://twitter.com/survivant