You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jprideaux <jp...@snapdiagnostics.com> on 2011/09/12 17:50:13 UTC

*.iface;jessionid=xxx gives 404 error

My webapps has some icefaces pages where I need to tag on the jsessionid. 
This was working in Tomcat 6.0.32 and all earlier versions but not for
Tomcat 6.0.33.  It also does not work for the Tomcat 7.0.x minor editions I
have tested.  It is as if the most recent Tomcat minor versions cannot tell
that ;jsessionid is not part of the file-name for iface pages.  

I was able to simply recreate the problem using MyEclipse by generating a
web-project, turning on JSF, turn on icefaces, turn on facelets, then add a
simple xhtml page.  Just use the page it creates for you.  Then set
MyEclispe up to use an external Tomcat instance.  Point to a 6.0.32 Tomcat
instance and the page will come up even if you add a jsessionid to it. 
Point to a 6.0.33 instance and the page won't come up with the ;sessionid
added to the URL.  You will get a page not fouind (404) error.  
For example, you might be using a URL like follows:
http://localhost:8080/testProject/a.iface;jsessionid=123
It comes up for Tomcat 6.0.32
but Tomcat 6.0.33 fives a page not found (404) error

Whay is that?  Is this a bug?  Is it intended?  Is there a Tomcat
configuration setting that will enable it to tell that the the ;jsessionid
is not part of the page name?

I have no problem tagging on jsessionid to JSP pages in any version of
Tomcat.  I just can't get it to work with iface pages.
-- 
View this message in context: http://old.nabble.com/*.iface-jessionid%3Dxxx-gives-404-error-tp32449101p32449101.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: *.iface;jessionid=xxx gives 404 error

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/9/13 Konstantin Kolinko <kn...@gmail.com>:
> 2011/9/13 jprideaux <jp...@snapdiagnostics.com>:
>>
>> Is it intended that request.getRequestURI() should return a path parameter
>> as part of the URI?
>
> Yes, That is required by the Servlet Specification.
>
> See servlet-2_5-mrel2-spec.pdf  ch. SRV.3.1 (page number 26), Quote:
> [[[
> Path parameters that are part of a GET request (as defined by HTTP 1.1) are not
> exposed by these APIs. They must be parsed from the String values
> returned by the
> getRequestURI method or the getPathInfo method.
> ]]]
>
> It means that getRequestURI() must return the path parameters as is.
>
>
> I am looking at the source code of PathDispatcher for icefaces-1.8.2
> in their svn repository...  It uses regex matching against the value
> of request.getRequestURI(),
> and those regexes are \\.jsp$ and so on
>  (in com.icesoft.faces.webapp.http.servlet.MainServlet)
> using $ to match the end of string.
>

I think you can write a filter and use RequestDispatcher.forward() to
corrected URL,
or configure urlrewrite filter [1] to do this.

Thought it would be better if icefaces fixed their bug.

[1] http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html


Best regards,
Konstantin Kolinko

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


Re: *.iface;jessionid=xxx gives 404 error

Posted by jprideaux <jp...@snapdiagnostics.com>.
Since you suggested that the problem may well be with the 1.8.2 icefaces
implementation, I set up two nearly identical test webapps both running on
the latest version of Tomcat (7.0.20).  One webApp used icefaces 1.8.2 and
the other one used the new icefaces 2.0.2 release.  I was able to duplicate
my previous problems with the Tomcat 7.0.20/icefaces 1.8.2 combination. 
Although, when I used the Tomcat 7.0.20 with icefaces 2.0.2, adding the
;jsessionid=xxx worked on my icefaces pages as I need it.  

Thanks you so much for pointing me in the right direction - that I needed to
be focused on icefaces and not Tomcat in solving my problem.  Now I just
need to port my site over to the new version of icefaces.  Hopefully, their
"compatibility" mode of using 2.0.x for processing older 1.x tags will not
be too painful. 

Thanks again,

Jeff Prideaux.
  

Konstantin Kolinko wrote:
> 
> 2011/9/13 jprideaux <jp...@snapdiagnostics.com>:
>>
>> One other tidbit.  When I call request.getRequestURI(), I get something
>> like
>> PathDispatcher.service: /test3/a.iface from
>> org.apache.catalina.connector.RequestFacade@a245b0
>> when I'm using Tomcat 6.0.32
>> and
>> PathDispatcher.service: /test3/a.iface;jsessionid=blah from
>> org.apache.catalina.connector.RequestFacade@a83987
>> when I am using tomcat 6.0.33 (or Tomcat 7).
>>
>> Is it intended that request.getRequestURI() should return a path
>> parameter
>> as part of the URI?
> 
> Yes, That is required by the Servlet Specification.
> 
> See servlet-2_5-mrel2-spec.pdf  ch. SRV.3.1 (page number 26), Quote:
> [[[
> Path parameters that are part of a GET request (as defined by HTTP 1.1)
> are not
> exposed by these APIs. They must be parsed from the String values
> returned by the
> getRequestURI method or the getPathInfo method.
> ]]]
> 
> It means that getRequestURI() must return the path parameters as is.
> 
> 
> I am looking at the source code of PathDispatcher for icefaces-1.8.2
> in their svn repository...  It uses regex matching against the value
> of request.getRequestURI(),
> and those regexes are \\.jsp$ and so on
>  (in com.icesoft.faces.webapp.http.servlet.MainServlet)
> using $ to match the end of string.
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/*.iface-jessionid%3Dxxx-gives-404-error-tp32449101p32457247.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: *.iface;jessionid=xxx gives 404 error

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/9/13 jprideaux <jp...@snapdiagnostics.com>:
>
> One other tidbit.  When I call request.getRequestURI(), I get something like
> PathDispatcher.service: /test3/a.iface from
> org.apache.catalina.connector.RequestFacade@a245b0
> when I'm using Tomcat 6.0.32
> and
> PathDispatcher.service: /test3/a.iface;jsessionid=blah from
> org.apache.catalina.connector.RequestFacade@a83987
> when I am using tomcat 6.0.33 (or Tomcat 7).
>
> Is it intended that request.getRequestURI() should return a path parameter
> as part of the URI?

Yes, That is required by the Servlet Specification.

See servlet-2_5-mrel2-spec.pdf  ch. SRV.3.1 (page number 26), Quote:
[[[
Path parameters that are part of a GET request (as defined by HTTP 1.1) are not
exposed by these APIs. They must be parsed from the String values
returned by the
getRequestURI method or the getPathInfo method.
]]]

It means that getRequestURI() must return the path parameters as is.


I am looking at the source code of PathDispatcher for icefaces-1.8.2
in their svn repository...  It uses regex matching against the value
of request.getRequestURI(),
and those regexes are \\.jsp$ and so on
 (in com.icesoft.faces.webapp.http.servlet.MainServlet)
using $ to match the end of string.

Best regards,
Konstantin Kolinko

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


Re: *.iface;jessionid=xxx gives 404 error

Posted by jprideaux <jp...@snapdiagnostics.com>.
One other tidbit.  When I call request.getRequestURI(), I get something like 
PathDispatcher.service: /test3/a.iface from
org.apache.catalina.connector.RequestFacade@a245b0
when I'm using Tomcat 6.0.32 
and 
PathDispatcher.service: /test3/a.iface;jsessionid=blah from
org.apache.catalina.connector.RequestFacade@a83987
when I am using tomcat 6.0.33 (or Tomcat 7).

Is it intended that request.getRequestURI() should return a path parameter
as part of the URI?  
Or is it a bug?




jprideaux wrote:
> 
> The examples as part of the 6.0.33 Tomcat deployment have both JSP and
> servlets.  You are right that appending a path parameter of
> ";jsessionid=123" works for those.  What is different and specific about
> my webapplication is that I am using icefaces pages which are different
> than either JSP or servlets.  I could append path parameters to the URL
> for iface pages in Tomcat 6.0.32 and earlier but I cannot for Tomcat
> version 6.0.33 (and Tomcat 7).  The reason why I am wanting to do this is
> to preserve the session in some special situations for my webapp.  I'm
> also asking this in the icefaces forums on that company's web-site.  They
> may also be interested in not losing any capability with their technology
> with the newer Tomcat versions.
> 
> I'm hoping to learn of a configuration setting in web.xml or server.xml
> that might let Tomcat recognize the page...  For the time being, I will
> simply continue to use Tomcat 6.0.32.  In the future, though, I would like
> to be able to upgrade.
> 
> If you are so inclined to test out a simple webapp that has an iceface
> page, you can download a simple war file from
> http://snapdiagnostics.org/test3.war and test it out with both Tomcat
> 6.0.32 and 6.0.33.  This war file is the most simple possible site that
> has an icefaces page.
> 
> Once deployed, try browsing to the following two URLs by typing the
> following in the address line:
> http://localhost:8080/test3/a.iface 
> http://localhost:8080/test3/a.iface;jsessionid=123 
> 
> You will see that with Tomcat 6.0.32, that both pages will be served.
> For Tomcat 6.0.33, only the page without this specific path parameter will
> be served.
> 
> Thanks,
> 
> Jeff Prideaux
> 
>  
> 
> Konstantin Kolinko wrote:
>> 
>> 2011/9/12 jprideaux <jp...@snapdiagnostics.com>:
>>>
>>> My webapps has some icefaces pages where I need to tag on the
>>> jsessionid.
>>> This was working in Tomcat 6.0.32 and all earlier versions but not for
>>> Tomcat 6.0.33.  It also does not work for the Tomcat 7.0.x minor
>>> editions I
>>> have tested.  It is as if the most recent Tomcat minor versions cannot
>>> tell
>>> that ;jsessionid is not part of the file-name for iface pages.
>>>
>>> I was able to simply recreate the problem using MyEclipse by generating
>>> a
>>> web-project, turning on JSF, turn on icefaces, turn on facelets, then
>>> add a
>>> simple xhtml page.  Just use the page it creates for you.  Then set
>>> MyEclispe up to use an external Tomcat instance.  Point to a 6.0.32
>>> Tomcat
>>> instance and the page will come up even if you add a jsessionid to it.
>>> Point to a 6.0.33 instance and the page won't come up with the
>>> ;sessionid
>>> added to the URL.  You will get a page not fouind (404) error.
>>> For example, you might be using a URL like follows:
>>> http://localhost:8080/testProject/a.iface;jsessionid=123
>>> It comes up for Tomcat 6.0.32
>>> but Tomcat 6.0.33 fives a page not found (404) error
>>>
>>> Whay is that?  Is this a bug?  Is it intended?  Is there a Tomcat
>>> configuration setting that will enable it to tell that the the
>>> ;jsessionid
>>> is not part of the page name?
>>>
>>> I have no problem tagging on jsessionid to JSP pages in any version of
>>> Tomcat.  I just can't get it to work with iface pages.
>> 
>> It does work with the standard examples webapp that comes with 6.0.33,
>> (regardless of whether you add ";jsessionid=value" or your misprinted
>> jessionid).
>> 
>> You need to
>> 1) Check what is different/specific in your configuration
>> 2) Explain what you are trying to do and why.
>> 
>> There was improvement in "path parameters" handling in 6.0.33 (that is
>> what those (";" + foo) in URLs are called), but that should not
>> concern spec-compliant applications.
>> 
>> Some discussion about "path parameters" should be in the archives of
>> the dev@ list.
>> 
>> Best regards,
>> Konstantin Kolinko
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/*.iface-jessionid%3Dxxx-gives-404-error-tp32449101p32450969.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: *.iface;jessionid=xxx gives 404 error

Posted by jprideaux <jp...@snapdiagnostics.com>.
The examples as part of the 6.0.33 Tomcat deployment have both JSP and
servlets.  You are right that appending a path parameter of
";jsessionid=123" works for those.  What is different and specific about my
webapplication is that I am using icefaces pages which are different than
either JSP or servlets.  I could append path parameters to the URL for iface
pages in Tomcat 6.0.32 and earlier but I cannot for Tomcat version 6.0.33
(and Tomcat 7).  The reason why I am wanting to do this is to preserve the
session in some special situations for my webapp.  I'm also asking this in
the icefaces forums on that company's web-site.  They may also be interested
in not losing any capability with their technology with the newer Tomcat
versions.

I'm hoping to learn of a configuration setting in web.xml or server.xml that
might let Tomcat recognize the page...  For the time being, I will simply
continue to use Tomcat 6.0.32.  In the future, though, I would like to be
able to upgrade.

If you are so inclined to test out a simple webapp that has an iceface page,
you can download a simple war file from http://snapdiagnostics.org/test3.war
and test it out with both Tomcat 6.0.32 and 6.0.33.  This war file is the
most simple possible site that has an icefaces page.

Once deployed, try browsing to the following two URLs by typing the
following in the address line:
http://localhost:8080/test3/a.iface 
http://localhost:8080/test3/a.iface;jsessionid=123 

You will see that with Tomcat 6.0.32, that both pages will be served.
For Tomcat 6.0.33, only the page without this specific path parameter will
be served.

Thanks,

Jeff Prideaux

 

Konstantin Kolinko wrote:
> 
> 2011/9/12 jprideaux <jp...@snapdiagnostics.com>:
>>
>> My webapps has some icefaces pages where I need to tag on the jsessionid.
>> This was working in Tomcat 6.0.32 and all earlier versions but not for
>> Tomcat 6.0.33.  It also does not work for the Tomcat 7.0.x minor editions
>> I
>> have tested.  It is as if the most recent Tomcat minor versions cannot
>> tell
>> that ;jsessionid is not part of the file-name for iface pages.
>>
>> I was able to simply recreate the problem using MyEclipse by generating a
>> web-project, turning on JSF, turn on icefaces, turn on facelets, then add
>> a
>> simple xhtml page.  Just use the page it creates for you.  Then set
>> MyEclispe up to use an external Tomcat instance.  Point to a 6.0.32
>> Tomcat
>> instance and the page will come up even if you add a jsessionid to it.
>> Point to a 6.0.33 instance and the page won't come up with the ;sessionid
>> added to the URL.  You will get a page not fouind (404) error.
>> For example, you might be using a URL like follows:
>> http://localhost:8080/testProject/a.iface;jsessionid=123
>> It comes up for Tomcat 6.0.32
>> but Tomcat 6.0.33 fives a page not found (404) error
>>
>> Whay is that?  Is this a bug?  Is it intended?  Is there a Tomcat
>> configuration setting that will enable it to tell that the the
>> ;jsessionid
>> is not part of the page name?
>>
>> I have no problem tagging on jsessionid to JSP pages in any version of
>> Tomcat.  I just can't get it to work with iface pages.
> 
> It does work with the standard examples webapp that comes with 6.0.33,
> (regardless of whether you add ";jsessionid=value" or your misprinted
> jessionid).
> 
> You need to
> 1) Check what is different/specific in your configuration
> 2) Explain what you are trying to do and why.
> 
> There was improvement in "path parameters" handling in 6.0.33 (that is
> what those (";" + foo) in URLs are called), but that should not
> concern spec-compliant applications.
> 
> Some discussion about "path parameters" should be in the archives of
> the dev@ list.
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/*.iface-jessionid%3Dxxx-gives-404-error-tp32449101p32450085.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: *.iface;jessionid=xxx gives 404 error

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/9/12 jprideaux <jp...@snapdiagnostics.com>:
>
> My webapps has some icefaces pages where I need to tag on the jsessionid.
> This was working in Tomcat 6.0.32 and all earlier versions but not for
> Tomcat 6.0.33.  It also does not work for the Tomcat 7.0.x minor editions I
> have tested.  It is as if the most recent Tomcat minor versions cannot tell
> that ;jsessionid is not part of the file-name for iface pages.
>
> I was able to simply recreate the problem using MyEclipse by generating a
> web-project, turning on JSF, turn on icefaces, turn on facelets, then add a
> simple xhtml page.  Just use the page it creates for you.  Then set
> MyEclispe up to use an external Tomcat instance.  Point to a 6.0.32 Tomcat
> instance and the page will come up even if you add a jsessionid to it.
> Point to a 6.0.33 instance and the page won't come up with the ;sessionid
> added to the URL.  You will get a page not fouind (404) error.
> For example, you might be using a URL like follows:
> http://localhost:8080/testProject/a.iface;jsessionid=123
> It comes up for Tomcat 6.0.32
> but Tomcat 6.0.33 fives a page not found (404) error
>
> Whay is that?  Is this a bug?  Is it intended?  Is there a Tomcat
> configuration setting that will enable it to tell that the the ;jsessionid
> is not part of the page name?
>
> I have no problem tagging on jsessionid to JSP pages in any version of
> Tomcat.  I just can't get it to work with iface pages.

It does work with the standard examples webapp that comes with 6.0.33,
(regardless of whether you add ";jsessionid=value" or your misprinted
jessionid).

You need to
1) Check what is different/specific in your configuration
2) Explain what you are trying to do and why.

There was improvement in "path parameters" handling in 6.0.33 (that is
what those (";" + foo) in URLs are called), but that should not
concern spec-compliant applications.

Some discussion about "path parameters" should be in the archives of
the dev@ list.

Best regards,
Konstantin Kolinko

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