no trouble.. will find it tonight.. hope so
the reason.. is because if I usd the same servletPath.. GWS didn't catch the
URL.. look like the mapping wasn't right.
will hardcode values tonight and try again.
2009/4/17 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>
> Salut,
>
> rushing for j1 slides :-) Deadline today.
>
> Survivant 00 wrote:
>
>> good.. I been able to make my test running on Jetty, but still not able on
>> GWS. I extract the info from the logs. I,m pretty sure that I almost have
>> it.. does someone see the problem just but look at these snippets ?
>>
>> The servlet path is not the same...why setting servletPath to /war2?
>
> -- Jeanfrancois
>
>
>
>
>
>>
>> here GWS
>>
>> String[] aliases = new String[] { "/*.jsp" };
>> String context = "/";
>> String servletPath = "/war2/";
>> String rootFolder = "C:/Source/grizzly/modules/http-servlet-deployer";
>> for (String alias : aliases) {
>> addAdapter(context + servletPath + alias, context, servletPath,
>> rootFolder + servletPath);
>> }
>>
>> String url = context + servletPath + "index.jsp";
>>
>> ......
>>
>> private ServletAdapter addAdapter(final String alias, final String
>> context, final String servletPath, final String rootFolder) {
>> ServletAdapter adapter = new ServletAdapter();
>>
>> Servlet servlet = (Servlet)
>> ClassLoaderUtil.load("org.apache.jasper.servlet.JspServlet");
>> adapter.setServletInstance(servlet);
>>
>> adapter.setContextPath(context);
>> adapter.setServletPath(servletPath);
>> adapter.setRootFolder(rootFolder);
>>
>> gws.addGrizzlyAdapter(adapter, new String[] { alias });
>> return adapter;
>> }
>>
>>
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service:JspEngine --> /war2/index.jsp
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service: ServletPath: /war2/
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service: PathInfo: index.jsp
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service: RealPath:
>> C:\Source\grizzly\modules\http-servlet-deployer\war2\index.jsp
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service: RequestURI:
>> //war2/index.jsp
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service: QueryString: null
>> [http18900-WorkerThread(0)] Fri Apr 17 15:18:52 EDT 2009 [FIN]
>> org.apache.jasper.servlet.JspServlet service: Request Params:
>>
>> here Jetty
>>
>> String context = "/";
>> String servletPath = "war2/";
>> String rootFolder = "C:/Source/grizzly/modules/http-servlet-deployer/";
>> WebAppContext webappcontext = new WebAppContext();
>> webappcontext.setContextPath(context);
>> webappcontext.setWar(rootFolder + servletPath);
>> HandlerList handlers = new HandlerList();
>>
>> handlers.setHandlers(new Handler[]{ webappcontext,new DefaultHandler()});
>> server.setHandler(handlers);
>> server.start();
>>
>> String url = "/index.jsp";
>>
>> 2009-04-17 15:05:56.205::DEBUG: JspEngine --> [/index.jsp]
>> ServletPath: [/index.jsp]
>> PathInfo: [null]
>> RealPath: [C:\Source\grizzly\modules\http-servlet-deployer\war2\index.jsp]
>> RequestURI: [/index.jsp]
>> QueryString: [null]
>> RequestParams: [ ]
>>
>>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>
>