Hi,

I also noticed this infinite recursion problem when WebServlet is mapped to 
/* as well as an incorrect redirect if you don't access it with a trailing 
slash.

If I try to access the console through localhost:8080/h2, I am being 
redirected to localhost:8080/login.jsp which is not correct. 
However, if I try to access it through localhost:8080/h2/, then I am being 
redirected to localhost:8080/h2/login.jsp which is correct.

This does not happen if the servlet is mapped to /something/*

Regards,
Xavier



On Monday, January 28, 2013 11:10:14 AM UTC+1, Noel Grandin wrote:
>
>  You can probably fix your situation by NOT registering H2 as the default 
> servlet.
>
> On 2013-01-25 14:54, Tuomas Kiviaho wrote:
>  
> I tried to register the web servlet to OSGI Http Service and got infinite 
> recursion from chrome. When I looked what had happened, I discovered that 
> recursion happens when path info is missing and the path is a servlet path. 
>
>  protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
> throws IOException {
>         req.setCharacterEncoding("utf-8");
>         String file = req.getPathInfo();
>         if (file == null) {
>             resp.sendRedirect(req.getRequestURI() + "/");
>             return;
>         } else if (file.startsWith("/")) {
>             file = file.substring(1);
>         }
>  
>  I might be doing it wrong (
> http://bluxte.net/musings/2006/03/29/servletpath-and-pathinfo-servlet-api-weirdness),
>  
> but I think that infinite recursion could anyhow be avoided.
>
>  --
> Tuomas
> -- 
> You received this message because you are subscribed to the Google Groups 
> "H2 Database" group.
> To post to this group, send email to [email protected]<javascript:>
> .
> To unsubscribe from this group, send email to 
> [email protected] <javascript:>.
> Visit this group at http://groups.google.com/group/h2-database?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>
>  

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to