You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vadim Tesis <va...@hotmail.com> on 2010/01/18 21:36:55 UTC

root context, IE, home page is not found

all,

 

my wicket 1.4.5 application is configured to run in root context.  for some reason, when it sets response page to the home page (which is not mounted), the webserver produces error: The requested resource () is not available.

 

here's the code:

  formFooter.add(new Link<Void>(ID_LINK_HOME)
      {
       private static final long serialVersionUID = 1L;
       @Override
       public void onClick()
       {
        setResponsePage(getApplication().getHomePage());
       }
      });


 

it happens only with IE (6, 7), only with root context, with Tomcat 6 and Sun's Glassfish servers.  looks like URL generated in that case has '.' appended to it: "http://localhost/.".

if i simply hit F5 in the browser after the error shows up, it opens home page just fine.

if i use bookmarkable link, it works fine: formFooter.add(new BookmarkablePageLink<HomePage>(ID_LINK_HOME, getApplication().getHomePage()).setAutoEnable(true));

 

the issue looks very similar to http://issues.apache.org/jira/browse/WICKET-1449

 

is there a workaround?

 

Thanks,

Vadim
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/196390707/direct/01/

Re: root context, IE, home page is not found

Posted by Erik van Oosten <e....@grons.nl>.
I don't get it.
I tested this fix with Tomcat and several IE versions. And "." just 
worked then whereas "./" did not.

Regards,
     Erik.


Op 04-05-10 14:56, Martin Grotzke wrote:
> Hi,
>
> we also just experienced issues with this, and the fix of WICKET-2600
> still causes problems (as already described in this post):
>
> For the redirect to "." tomcat produces a Location header like
> http://www.example.org/. (notice the trailing dot), which causes IE to
> do request exactly this url, for which no page ist mounted. Therefore
> the 404 page not found.
>
> Is there a special reason why "." was chosen here?
>
> What do you think about an alternative handling like this:
>
> if (redirectUrl.startsWith("./")) {
>    if (redirectUrl.length() == 2)) {
>      WebRequest request = (WebRequest) requestCycle.getRequest();
>      String contextPath = request.getHttpServletRequest().getContextPath(); // e.g. "/myapp"
>      String servletPath = request.getServletPath(); // e.g. "/"
>      redirectUrl = contextPath + servletPath;
>    }
>    else {
>      redirectUrl.substring( 2 )
>    }
> }
>
> Cheers,
> Martin
>
>
> On Sat, 2010-05-01 at 10:47 +0200, Erik van Oosten wrote:
>    
>> This might be related to https://issues.apache.org/jira/browse/WICKET-2600?
>>
>> Regards,
>>       Erik.
>    

-- 
Sent from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: root context, IE, home page is not found

Posted by Martin Grotzke <ma...@javakaffee.de>.
Hi,

we also just experienced issues with this, and the fix of WICKET-2600
still causes problems (as already described in this post):

For the redirect to "." tomcat produces a Location header like
http://www.example.org/. (notice the trailing dot), which causes IE to
do request exactly this url, for which no page ist mounted. Therefore
the 404 page not found.

Is there a special reason why "." was chosen here?

What do you think about an alternative handling like this:

if (redirectUrl.startsWith("./")) {
  if (redirectUrl.length() == 2)) {
    WebRequest request = (WebRequest) requestCycle.getRequest();
    String contextPath = request.getHttpServletRequest().getContextPath(); // e.g. "/myapp"
    String servletPath = request.getServletPath(); // e.g. "/"
    redirectUrl = contextPath + servletPath;
  }
  else {
    redirectUrl.substring( 2 )
  }
}

Cheers,
Martin


On Sat, 2010-05-01 at 10:47 +0200, Erik van Oosten wrote:
> This might be related to https://issues.apache.org/jira/browse/WICKET-2600?
> 
> Regards,
>      Erik.
> 
> 
> Op 29-04-10 16:57, Jimi wrote:
> > I would also like to know if there is any solution (bug fix or workaround) to
> > this bug. Currently each time a IE-user logs out from my web application he
> > gets this ugly 404-error page, stating "The requested resource (/.) is not
> > available".
> >
> > I use Wicket 1.4.7 and the web application is deployed as ROOT context on
> > Tomcat 6.0.26.
> >
> > Is there no solution for this?
> >
> > Regards
> > /Jimi
> >    
> 
> 

-- 
Martin Grotzke
http://www.javakaffee.de/blog/

Re: root context, IE, home page is not found

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Great.  We definitely want to see it if you can reproduce it.  What I find
is that 75% of the time, it turns out to be an error of something else
conflicting, or else I find the problem in my own code if I try to boil it
down to the simplest quickstart possible.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 11, 2010 at 2:34 AM, Jimi <ji...@mogul.com> wrote:

>
> I tried to recreate the issue in a simple quickstart project, but that
> seems
> to be easier said then done. The only time this bug shows its ugly face is
> when a logged in user uses the logout link, and is [supposed to be]
> redirected to the home page (ie the login page). I tried to debug it to see
> where it goes wrong, but there are just too many filters and too many
> classes involved so the task was too daunting for me at the moment.
>
> I guess the only way to recreate this is to use Wicket Security, and
> possibly also Spring Security, in the "quickstart". I will try to do this
> when I have the time, maybe during the upcoming public holiday this week.
>
> /Jim
>
>
> Jeremy Thomerson wrote:
> >
> > Can you reopen that issue and attach a quickstart that demonstrates the
> > problem?
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, May 10, 2010 at 8:26 AM, Jimi <ji...@mogul.com> wrote:
> >
> >>
> >> Erik van Oosten wrote:
> >> > This might be related to
> >> > https://issues.apache.org/jira/browse/WICKET-2600?
> >>
> >> Well, it sure is related, and that ticket is marked as resolved with
> >> 1.4.5.
> >> But the bug still exist in 1.4.7, at least for me.
> >>
> >> /Jimi
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2165392.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2173452.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: root context, IE, home page is not found

Posted by Jimi <ji...@mogul.com>.
I tried to recreate the issue in a simple quickstart project, but that seems
to be easier said then done. The only time this bug shows its ugly face is
when a logged in user uses the logout link, and is [supposed to be]
redirected to the home page (ie the login page). I tried to debug it to see
where it goes wrong, but there are just too many filters and too many
classes involved so the task was too daunting for me at the moment.

I guess the only way to recreate this is to use Wicket Security, and
possibly also Spring Security, in the "quickstart". I will try to do this
when I have the time, maybe during the upcoming public holiday this week.

/Jim


Jeremy Thomerson wrote:
> 
> Can you reopen that issue and attach a quickstart that demonstrates the
> problem?
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Mon, May 10, 2010 at 8:26 AM, Jimi <ji...@mogul.com> wrote:
> 
>>
>> Erik van Oosten wrote:
>> > This might be related to
>> > https://issues.apache.org/jira/browse/WICKET-2600?
>>
>> Well, it sure is related, and that ticket is marked as resolved with
>> 1.4.5.
>> But the bug still exist in 1.4.7, at least for me.
>>
>> /Jimi
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2165392.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2173452.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: root context, IE, home page is not found

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Can you reopen that issue and attach a quickstart that demonstrates the
problem?

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, May 10, 2010 at 8:26 AM, Jimi <ji...@mogul.com> wrote:

>
> Erik van Oosten wrote:
> > This might be related to
> > https://issues.apache.org/jira/browse/WICKET-2600?
>
> Well, it sure is related, and that ticket is marked as resolved with 1.4.5.
> But the bug still exist in 1.4.7, at least for me.
>
> /Jimi
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2165392.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: root context, IE, home page is not found

Posted by Jimi <ji...@mogul.com>.
Erik van Oosten wrote:
> This might be related to
> https://issues.apache.org/jira/browse/WICKET-2600?

Well, it sure is related, and that ticket is marked as resolved with 1.4.5.
But the bug still exist in 1.4.7, at least for me.

/Jimi
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2165392.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: root context, IE, home page is not found

Posted by Erik van Oosten <e....@grons.nl>.
This might be related to https://issues.apache.org/jira/browse/WICKET-2600?

Regards,
     Erik.


Op 29-04-10 16:57, Jimi wrote:
> I would also like to know if there is any solution (bug fix or workaround) to
> this bug. Currently each time a IE-user logs out from my web application he
> gets this ugly 404-error page, stating "The requested resource (/.) is not
> available".
>
> I use Wicket 1.4.7 and the web application is deployed as ROOT context on
> Tomcat 6.0.26.
>
> Is there no solution for this?
>
> Regards
> /Jimi
>    


-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: root context, IE, home page is not found

Posted by Jimi <ji...@mogul.com>.
I would also like to know if there is any solution (bug fix or workaround) to
this bug. Currently each time a IE-user logs out from my web application he
gets this ugly 404-error page, stating "The requested resource (/.) is not
available".

I use Wicket 1.4.7 and the web application is deployed as ROOT context on
Tomcat 6.0.26.

Is there no solution for this?

Regards
/Jimi
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/root-context-IE-home-page-is-not-found-tp1877009p2075624.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: root context, IE, home page is not found

Posted by FakeBoy <da...@gmail.com>.
Hi, 
I use Glassfish v 2.1.1 with wicket 1.4.6 and in this version is redirect to
root changed form "./" to "."
(BookmarkablePageRequestTarget.respond(RequestCycle requestCycle)).

But I have still problem with this in IE(See attached picture).

When I send redirect with location finishing with "." IE will generate new
request with url also finishing with "." than IE receives redirect response
(it is not generated from wicket) with location "./" and we are at the same
point like in version wicket 1.4.3 where root context was represented by
"./" Result is the same 404 Page not found.

I used "/" for context root and it works fine in all browser. Why we are
using "." in wicket 1.4.6 or "./" in 1.4.3?

Thanks Dave.

http://old.nabble.com/file/p28151694/ContextRootRedirect.png 
http://old.nabble.com/file/p28151694/ContextRootRedirect.png
ContextRootRedirect.png 






vadikt wrote:
> 
> 
> looks like BookmarkablePageRequestTarget.respond(RequestCycle
> requestCycle) has code to strip "./" if url starts with it.
> 
> can it be changed to strip "." as well?  will it be the right fix?
>  
>> From: vadikt@hotmail.com
>> To: users@wicket.apache.org
>> Subject: root context, IE, home page is not found
>> Date: Mon, 18 Jan 2010 20:36:55 +0000
>> 
>> 
>> all,
>> 
>> 
>> 
>> my wicket 1.4.5 application is configured to run in root context. for
>> some reason, when it sets response page to the home page (which is not
>> mounted), the webserver produces error: The requested resource () is not
>> available.
>> 
>> 
>> 
>> here's the code:
>> 
>> formFooter.add(new Link<Void>(ID_LINK_HOME)
>> {
>> private static final long serialVersionUID = 1L;
>> @Override
>> public void onClick()
>> {
>> setResponsePage(getApplication().getHomePage());
>> }
>> });
>> 
>> 
>> 
>> 
>> it happens only with IE (6, 7), only with root context, with Tomcat 6 and
>> Sun's Glassfish servers. looks like URL generated in that case has '.'
>> appended to it: "http://localhost/.".
>> 
>> if i simply hit F5 in the browser after the error shows up, it opens home
>> page just fine.
>> 
>> if i use bookmarkable link, it works fine: formFooter.add(new
>> BookmarkablePageLink<HomePage>(ID_LINK_HOME,
>> getApplication().getHomePage()).setAutoEnable(true));
>> 
>> 
>> 
>> the issue looks very similar to
>> http://issues.apache.org/jira/browse/WICKET-1449
>> 
>> 
>> 
>> is there a workaround?
>> 
>> 
>> 
>> Thanks,
>> 
>> Vadim
>> 
>> _________________________________________________________________
>> Hotmail: Trusted email with powerful SPAM protection.
>> http://clk.atdmt.com/GBL/go/196390707/direct/01/
>  		 	   		  
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/196390707/direct/01/
> 

-- 
View this message in context: http://old.nabble.com/root-context%2C-IE%2C-home-page-is-not-found-tp27216383p28151694.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: root context, IE, home page is not found

Posted by Vadim Tesis <va...@hotmail.com>.
looks like BookmarkablePageRequestTarget.respond(RequestCycle requestCycle) has code to strip "./" if url starts with it.

can it be changed to strip "." as well?  will it be the right fix?
 
> From: vadikt@hotmail.com
> To: users@wicket.apache.org
> Subject: root context, IE, home page is not found
> Date: Mon, 18 Jan 2010 20:36:55 +0000
> 
> 
> all,
> 
> 
> 
> my wicket 1.4.5 application is configured to run in root context. for some reason, when it sets response page to the home page (which is not mounted), the webserver produces error: The requested resource () is not available.
> 
> 
> 
> here's the code:
> 
> formFooter.add(new Link<Void>(ID_LINK_HOME)
> {
> private static final long serialVersionUID = 1L;
> @Override
> public void onClick()
> {
> setResponsePage(getApplication().getHomePage());
> }
> });
> 
> 
> 
> 
> it happens only with IE (6, 7), only with root context, with Tomcat 6 and Sun's Glassfish servers. looks like URL generated in that case has '.' appended to it: "http://localhost/.".
> 
> if i simply hit F5 in the browser after the error shows up, it opens home page just fine.
> 
> if i use bookmarkable link, it works fine: formFooter.add(new BookmarkablePageLink<HomePage>(ID_LINK_HOME, getApplication().getHomePage()).setAutoEnable(true));
> 
> 
> 
> the issue looks very similar to http://issues.apache.org/jira/browse/WICKET-1449
> 
> 
> 
> is there a workaround?
> 
> 
> 
> Thanks,
> 
> Vadim
> 
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/196390707/direct/01/
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/196390707/direct/01/