Re: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-16 Thread Bertrand Guay-Paquet

Hi Joachim,

I have never inspected them closely, but I think the classes in play are :
WicketLinkTagHandler
AutoLinkResolver

As for the usefulness of this process, consider panels. Panels can be 
instantiated on any mount path so their links must be adjusted.


Good luck!
Bertrand

On 15/08/2012 5:37 PM, Joachim Schrod wrote:

Well, one answer yet, with an assertion that Wicket does what I
don't want it to do. :-(

So, is it really not possible to exchange bidirectionally HTML
files with an HTML designer who does *not* put all his HTML files
in web root? I thought being able to share files bidirectionally
with HTML designers was one of the major selling points of Wicket?!

I assume nobody has the energy to really look at my issue. Would it
help if I put up a minimal example project for download that shows
my problem? Anybody willing to look then at it?

I don't need a full solution. An hint like class X does the URL
rewriting for images would be most welcome, overwriting that
behavior with appropriate subclassing is something I can well do on
my own.

Best,
Joachim


Joachim Schrod wrote:

Hi,

I'm new to Wicket and write my first application in it. I use
Wicket in Action and online resources as documentation. (I
stumbled already about the 1st few roadblocks owing to changes from
Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
question, don't hesitate to just send it.

My problem: I have a page that's mounted as URL cat/entry. In the
page's HTML there are links to images and CSS files that start with
.., e.g., ../images/bg_blabla.img. These are no Wicket
components, just plain HTML.

When Wicket renders the page, it rewrites the image URLs and
prepends ../, e.g., the image URL now is output as
../../images/bg_blabla.img. I suppose it tries to adept to the
extra path level that I introduced during mount and compensates for it.

How can I stop Wicket from adding this ../ prefix? I searched via
Google and read through Javadocs, but to no avail.

For background: The URL in the HTML file is right... My HTML
designers deliver their design files as cat/entry.html, my mounts
just follow their lead. I would like to change their files as
little as possible, it makes files swapping back to/with them much
easier.

I hope somebody here may help me, thanks in advance.

Joachim




Joachim




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



Re: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-16 Thread Joachim Schrod
Thanks for these pointers! I'll check the classes out and see how I
can influence their behavior.

Cheers,
Joachim


Bertrand Guay-Paquet wrote:
 Hi Joachim,
 
 I have never inspected them closely, but I think the classes in
 play are :
 WicketLinkTagHandler
 AutoLinkResolver
 
 As for the usefulness of this process, consider panels. Panels can
 be instantiated on any mount path so their links must be adjusted.
 
 Good luck!
 Bertrand
 
 On 15/08/2012 5:37 PM, Joachim Schrod wrote:
 Well, one answer yet, with an assertion that Wicket does what I
 don't want it to do. :-(

 So, is it really not possible to exchange bidirectionally HTML
 files with an HTML designer who does *not* put all his HTML files
 in web root? I thought being able to share files bidirectionally
 with HTML designers was one of the major selling points of Wicket?!

 I assume nobody has the energy to really look at my issue. Would it
 help if I put up a minimal example project for download that shows
 my problem? Anybody willing to look then at it?

 I don't need a full solution. An hint like class X does the URL
 rewriting for images would be most welcome, overwriting that
 behavior with appropriate subclassing is something I can well do on
 my own.

 Best,
 Joachim


 Joachim Schrod wrote:
 Hi,

 I'm new to Wicket and write my first application in it. I use
 Wicket in Action and online resources as documentation. (I
 stumbled already about the 1st few roadblocks owing to changes from
 Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
 question, don't hesitate to just send it.

 My problem: I have a page that's mounted as URL cat/entry. In the
 page's HTML there are links to images and CSS files that start with
 .., e.g., ../images/bg_blabla.img. These are no Wicket
 components, just plain HTML.

 When Wicket renders the page, it rewrites the image URLs and
 prepends ../, e.g., the image URL now is output as
 ../../images/bg_blabla.img. I suppose it tries to adept to the
 extra path level that I introduced during mount and compensates
 for it.

 How can I stop Wicket from adding this ../ prefix? I searched via
 Google and read through Javadocs, but to no avail.

 For background: The URL in the HTML file is right... My HTML
 designers deliver their design files as cat/entry.html, my mounts
 just follow their lead. I would like to change their files as
 little as possible, it makes files swapping back to/with them much
 easier.

 I hope somebody here may help me, thanks in advance.

 Joachim


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



Re: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-16 Thread Martin Grigorov
The markup filter that is responsible for this is:
org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler
You can setup a custom MarkupParser that doesn't use this markup
filter to solve your issue.

On Fri, Aug 17, 2012 at 3:06 AM, Joachim Schrod jsch...@acm.org wrote:
 Thanks for these pointers! I'll check the classes out and see how I
 can influence their behavior.

 Cheers,
 Joachim


 Bertrand Guay-Paquet wrote:
 Hi Joachim,

 I have never inspected them closely, but I think the classes in
 play are :
 WicketLinkTagHandler
 AutoLinkResolver

 As for the usefulness of this process, consider panels. Panels can
 be instantiated on any mount path so their links must be adjusted.

 Good luck!
 Bertrand

 On 15/08/2012 5:37 PM, Joachim Schrod wrote:
 Well, one answer yet, with an assertion that Wicket does what I
 don't want it to do. :-(

 So, is it really not possible to exchange bidirectionally HTML
 files with an HTML designer who does *not* put all his HTML files
 in web root? I thought being able to share files bidirectionally
 with HTML designers was one of the major selling points of Wicket?!

 I assume nobody has the energy to really look at my issue. Would it
 help if I put up a minimal example project for download that shows
 my problem? Anybody willing to look then at it?

 I don't need a full solution. An hint like class X does the URL
 rewriting for images would be most welcome, overwriting that
 behavior with appropriate subclassing is something I can well do on
 my own.

 Best,
 Joachim


 Joachim Schrod wrote:
 Hi,

 I'm new to Wicket and write my first application in it. I use
 Wicket in Action and online resources as documentation. (I
 stumbled already about the 1st few roadblocks owing to changes from
 Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
 question, don't hesitate to just send it.

 My problem: I have a page that's mounted as URL cat/entry. In the
 page's HTML there are links to images and CSS files that start with
 .., e.g., ../images/bg_blabla.img. These are no Wicket
 components, just plain HTML.

 When Wicket renders the page, it rewrites the image URLs and
 prepends ../, e.g., the image URL now is output as
 ../../images/bg_blabla.img. I suppose it tries to adept to the
 extra path level that I introduced during mount and compensates
 for it.

 How can I stop Wicket from adding this ../ prefix? I searched via
 Google and read through Javadocs, but to no avail.

 For background: The URL in the HTML file is right... My HTML
 designers deliver their design files as cat/entry.html, my mounts
 just follow their lead. I would like to change their files as
 little as possible, it makes files swapping back to/with them much
 easier.

 I hope somebody here may help me, thanks in advance.

 Joachim


 --
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Joachim Schrod, Roedermark, Germany
 Email: jsch...@acm.org


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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-15 Thread Joachim Schrod
Well, one answer yet, with an assertion that Wicket does what I
don't want it to do. :-(

So, is it really not possible to exchange bidirectionally HTML
files with an HTML designer who does *not* put all his HTML files
in web root? I thought being able to share files bidirectionally
with HTML designers was one of the major selling points of Wicket?!

I assume nobody has the energy to really look at my issue. Would it
help if I put up a minimal example project for download that shows
my problem? Anybody willing to look then at it?

I don't need a full solution. An hint like class X does the URL
rewriting for images would be most welcome, overwriting that
behavior with appropriate subclassing is something I can well do on
my own.

Best,
Joachim


Joachim Schrod wrote:
 Hi,
 
 I'm new to Wicket and write my first application in it. I use
 Wicket in Action and online resources as documentation. (I
 stumbled already about the 1st few roadblocks owing to changes from
 Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
 question, don't hesitate to just send it.
 
 My problem: I have a page that's mounted as URL cat/entry. In the
 page's HTML there are links to images and CSS files that start with
 .., e.g., ../images/bg_blabla.img. These are no Wicket
 components, just plain HTML.
 
 When Wicket renders the page, it rewrites the image URLs and
 prepends ../, e.g., the image URL now is output as
 ../../images/bg_blabla.img. I suppose it tries to adept to the
 extra path level that I introduced during mount and compensates for it.
 
 How can I stop Wicket from adding this ../ prefix? I searched via
 Google and read through Javadocs, but to no avail.
 
 For background: The URL in the HTML file is right... My HTML
 designers deliver their design files as cat/entry.html, my mounts
 just follow their lead. I would like to change their files as
 little as possible, it makes files swapping back to/with them much
 easier.
 
 I hope somebody here may help me, thanks in advance.
 
   Joachim
 



Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



Re: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-14 Thread Martin Grigorov
Hi,

If your images/css are in the web root then use something like
images/image.img in your .html.
Wicket will make the url relative to the web root no matter what mount
path you use for the page.

On Mon, Aug 13, 2012 at 5:41 PM, Joachim Schrod jsch...@acm.org wrote:
 Hi,

 I'm new to Wicket and write my first application in it. I use
 Wicket in Action and online resources as documentation. (I
 stumbled already about the 1st few roadblocks owing to changes from
 Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
 question, don't hesitate to just send it.

 My problem: I have a page that's mounted as URL cat/entry. In the
 page's HTML there are links to images and CSS files that start with
 .., e.g., ../images/bg_blabla.img. These are no Wicket
 components, just plain HTML.

 When Wicket renders the page, it rewrites the image URLs and
 prepends ../, e.g., the image URL now is output as
 ../../images/bg_blabla.img. I suppose it tries to adept to the
 extra path level that I introduced during mount and compensates for it.

 How can I stop Wicket from adding this ../ prefix? I searched via
 Google and read through Javadocs, but to no avail.

 For background: The URL in the HTML file is right... My HTML
 designers deliver their design files as cat/entry.html, my mounts
 just follow their lead. I would like to change their files as
 little as possible, it makes files swapping back to/with them much
 easier.

 I hope somebody here may help me, thanks in advance.

 Joachim

 --
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Joachim Schrod, Roedermark, Germany
 Email: jsch...@acm.org


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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-14 Thread Joachim Schrod
Yes, that's what I observed and described below. And that behavior
is not appropriate for my use case.

So, how can I stop Wicket to make the url relative to the web root
no matter what mount path I use for the page?

I want to *change* that: my designer delivers HTML where the images
are *not* relative to the web root, but to one directory below. In
our HTML files are URLs like ../images/image.img and I don't want
to change these URLs.

Alternatively, how can I tell Wicket that the web root has a
different prefix just for rewriting these image URLs?

Thanks,
Joachim

Martin Grigorov wrote:
 Hi,
 
 If your images/css are in the web root then use something like
 images/image.img in your .html.
 Wicket will make the url relative to the web root no matter what mount
 path you use for the page.
 
 On Mon, Aug 13, 2012 at 5:41 PM, Joachim Schrod jsch...@acm.org wrote:
 Hi,

 I'm new to Wicket and write my first application in it. I use
 Wicket in Action and online resources as documentation. (I
 stumbled already about the 1st few roadblocks owing to changes from
 Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
 question, don't hesitate to just send it.

 My problem: I have a page that's mounted as URL cat/entry. In the
 page's HTML there are links to images and CSS files that start with
 .., e.g., ../images/bg_blabla.img. These are no Wicket
 components, just plain HTML.

 When Wicket renders the page, it rewrites the image URLs and
 prepends ../, e.g., the image URL now is output as
 ../../images/bg_blabla.img. I suppose it tries to adept to the
 extra path level that I introduced during mount and compensates for it.

 How can I stop Wicket from adding this ../ prefix? I searched via
 Google and read through Javadocs, but to no avail.

 For background: The URL in the HTML file is right... My HTML
 designers deliver their design files as cat/entry.html, my mounts
 just follow their lead. I would like to change their files as
 little as possible, it makes files swapping back to/with them much
 easier.

 I hope somebody here may help me, thanks in advance.

 Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



RE: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-14 Thread Paul Bors
Wicket rewrite the SRC attribute of the image as relative to your webapp 
context unless you declare that image as a wicket component, give it a 
wicket:id and then use a ContextImage.

Thus you would turn a img src=../images/image.jpg to a img wicket:id=img 
src=../images/image.jpg.

If you do so, then you can still preserve the wrong src relative path of 
../images/image.jpg so that your web developers can see the images while 
editing the static HTML resources and when you run the web-app Wicket will take 
care of fixing that URL for you no matter at what point you mount the page.

If you have too many such images and refactoring might take you too long, then 
consider write your own Custom Wicket Tag Resolver for an attribute of the img 
HTML tag and override what the framework does for you (do call super) by 
changing the src attribute in a similar way ContextImage would do it for you.

For example see this article:
http://sanityresort.blogspot.com/2011/08/creating-custom-wicket-tag-resolver.html

Or see how other such resolvers or AttributeModifer are used by Wicket itself, 
you can start with the AutoComponentResolver.

~ Good look to you!
  Paul Bors

-Original Message-
From: Joachim Schrod [mailto:jsch...@acm.org] 
Sent: Tuesday, August 14, 2012 2:53 AM
To: users@wicket.apache.org
Subject: Re: How to control IMG/CSS URL-Rewriting in mounted pages?

Yes, that's what I observed and described below. And that behavior is not 
appropriate for my use case.

So, how can I stop Wicket to make the url relative to the web root no matter 
what mount path I use for the page?

I want to *change* that: my designer delivers HTML where the images are *not* 
relative to the web root, but to one directory below. In our HTML files are 
URLs like ../images/image.img and I don't want to change these URLs.

Alternatively, how can I tell Wicket that the web root has a different prefix 
just for rewriting these image URLs?

Thanks,
Joachim

Martin Grigorov wrote:
 Hi,
 
 If your images/css are in the web root then use something like 
 images/image.img in your .html.
 Wicket will make the url relative to the web root no matter what mount 
 path you use for the page.
 
 On Mon, Aug 13, 2012 at 5:41 PM, Joachim Schrod jsch...@acm.org wrote:
 Hi,

 I'm new to Wicket and write my first application in it. I use Wicket 
 in Action and online resources as documentation. (I stumbled already 
 about the 1st few roadblocks owing to changes from Wicket 1.4 to 1.5. 
 ;-)) So, if there's an easy pointer to answer my question, don't 
 hesitate to just send it.

 My problem: I have a page that's mounted as URL cat/entry. In the 
 page's HTML there are links to images and CSS files that start with 
 .., e.g., ../images/bg_blabla.img. These are no Wicket 
 components, just plain HTML.

 When Wicket renders the page, it rewrites the image URLs and prepends 
 ../, e.g., the image URL now is output as 
 ../../images/bg_blabla.img. I suppose it tries to adept to the 
 extra path level that I introduced during mount and compensates for it.

 How can I stop Wicket from adding this ../ prefix? I searched via 
 Google and read through Javadocs, but to no avail.

 For background: The URL in the HTML file is right... My HTML 
 designers deliver their design files as cat/entry.html, my mounts 
 just follow their lead. I would like to change their files as little 
 as possible, it makes files swapping back to/with them much easier.

 I hope somebody here may help me, thanks in advance.

 Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



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



How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-13 Thread Joachim Schrod
Hi,

I'm new to Wicket and write my first application in it. I use
Wicket in Action and online resources as documentation. (I
stumbled already about the 1st few roadblocks owing to changes from
Wicket 1.4 to 1.5. ;-)) So, if there's an easy pointer to answer my
question, don't hesitate to just send it.

My problem: I have a page that's mounted as URL cat/entry. In the
page's HTML there are links to images and CSS files that start with
.., e.g., ../images/bg_blabla.img. These are no Wicket
components, just plain HTML.

When Wicket renders the page, it rewrites the image URLs and
prepends ../, e.g., the image URL now is output as
../../images/bg_blabla.img. I suppose it tries to adept to the
extra path level that I introduced during mount and compensates for it.

How can I stop Wicket from adding this ../ prefix? I searched via
Google and read through Javadocs, but to no avail.

For background: The URL in the HTML file is right... My HTML
designers deliver their design files as cat/entry.html, my mounts
just follow their lead. I would like to change their files as
little as possible, it makes files swapping back to/with them much
easier.

I hope somebody here may help me, thanks in advance.

Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



Re: Link URLs (with JSessionID) truncated during URL rewriting

2012-02-23 Thread Ian Marshall
I fixed the problem by going around it.

All my web pages are descended from my PageBase class, which in turn
descends from Wicket's WebPage.

  ·  I disable my automatic removal of JSessionID by overriding

   public String ServletWebResponse.encodeURL(CharSequence url)

 in my WebApplication.

  ·  In my PageBase constructor, I determine whether (session) cookies are
 detected are being stored or not.

  ·  If not, then I raise an

   org.apache.wicket.RestartResponseException(final ClassC pageClass)

 to show my PageCookiesDisabled. This interrupts a Not found error
from
 an invalid URL containing .. characters, which I encountered
previously.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-URLs-with-JSessionID-truncated-tp4381881p4414037.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Link URLs (with JSessionID) truncated during URL rewriting

2012-02-23 Thread Bartosz Jakubowski
I've had the same issue. It happens when you have mounted home page to 
/ and another page Foo to /foo. Then the URL with jsessionid looks 
like this: /foo/..;jsessionid and the mapper of page Foo takes it as if 
it is a URL to this page with parameter ... And this mapper always 
goes before home page mapper, because it has score 1 for matching first 
segment.


I fixed it by overloading newWebRequest in Application class:

 protected WebRequest newWebRequest(HttpServletRequest servletRequest,
String filterPath) {
WebRequest webRequest = super.newWebRequest(servletRequest, 
filterPath);
return new ServletWebRequest(servletRequest, filterPath, 
webRequest.getUrl().canonical());

}


Re: Link URLs (with JSessionID) truncated during URL rewriting

2012-02-23 Thread Martin Grigorov
On Thu, Feb 23, 2012 at 4:09 PM, Bartosz Jakubowski bumbu...@wp.pl wrote:
 I've had the same issue. It happens when you have mounted home page to /
 and another page Foo to /foo. Then the URL with jsessionid looks like
 this: /foo/..;jsessionid and the mapper of page Foo takes it as if it is a
 URL to this page with parameter ... And this mapper always goes before
 home page mapper, because it has score 1 for matching first segment.

 I fixed it by overloading newWebRequest in Application class:

     protected WebRequest newWebRequest(HttpServletRequest servletRequest,
            String filterPath) {
        WebRequest webRequest = super.newWebRequest(servletRequest,
 filterPath);
        return new ServletWebRequest(servletRequest, filterPath,
 webRequest.getUrl().canonical());
    }

https://issues.apache.org/jira/browse/WICKET-4401
There is a patch attached to this ticket. Try it and send feedback.



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Link URLs (with JSessionID) truncated during URL rewriting

2012-02-23 Thread Ian Marshall
I run my Wicket app on Google App Engine for Java, which I believe uses Jetty
(or modified Jetty?) not Tomcat as its web application server.

The JIRA ticket states

  The bug does only show up when using tomcat (6.0.29) and not in jetty,

so I'll dip out of testing this particular ticket if that's OK.


Martin Grigorov-4 wrote
 https://issues.apache.org/jira/browse/WICKET-4401
 There is a patch attached to this ticket. Try it and send feedback.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-URLs-with-JSessionID-truncated-tp4381881p4414160.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Link URLs (with JSessionID) truncated during URL rewriting

2012-02-23 Thread Bartosz Jakubowski

I use Jetty 6.1.26 and this patch works fine for me. Thanks.

On 23.02.2012 16:23, Ian Marshall wrote:

I run my Wicket app on Google App Engine for Java, which I believe uses Jetty
(or modified Jetty?) not Tomcat as its web application server.

The JIRA ticket states

   The bug does only show up when using tomcat (6.0.29) and not in jetty,

so I'll dip out of testing this particular ticket if that's OK.


Martin Grigorov-4 wrote

https://issues.apache.org/jira/browse/WICKET-4401
There is a patch attached to this ticket. Try it and send feedback.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-URLs-with-JSessionID-truncated-tp4381881p4414160.html
Sent from the Users forum mailing list archive at Nabble.com.

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






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



Link URLs (with JSessionID) truncated during URL rewriting

2012-02-14 Thread Ian Marshall
Hello All,

Has anyone else apart from me suffered from this problem of URLs being
truncated to become invalid?

I would appreciate it if anyone else shared my pain!

Ian Marshall


Ian Marshall wrote
 
 Hello All,
 
 A user's first visit to my app's home page results in the URL
 
   http://[My domain]/main/PageHome;jsessionid=v_qqIGVQlKBbkNSOcHkAQw?0
 
 Each org.apache.wicket.markup.html.link.Link on my home page has the URL
 of the form
 
   http://[My
 domain]/main/..;jsessionid=v_qqIGVQlKBbkNSOcHkAQw?0-1.ILinkListener-lnkAbout
 
 (of length 102 characters for the particular link URL copied here). These
 URLs are invalid, because of the two dots present instead of the completed
 path.
 
 Is there any way I can configure Wicket to suppress this URL abbreviation,
 or is this operation the province of the web application server or web
 browser?
 
 As a work-around, I have already coded the supression of JSessionIDs in my
 links' URLs, and am coding the app to give a warning if session cookies
 are disabled. But I would appreciate any pointers.
 
 Ian Marshall
 
 
 My operating environment
 -
 Web application server: (Jetty? in) Google App Engine
 Wicket version: 1.5.3 (I know: it's not the very latest version!)
 Web browsers:   Mozilla Firefox 10.0.1
 Microsoft Internet Explorer 8.0.6001.18702
 as found on my HTC Wildfire S running Google
 Android 2.3.5
 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-URLs-with-JSessionID-truncated-tp4381881p4386619.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: URL Rewriting in Wicket

2009-12-14 Thread Erik van Oosten
Actually, you should override the WebRequestProcessor and return a 
custom RequestCodingStrategy from there. The custom 
RequestCodingStrategy would extend one of the default implementation and 
override urlCodingStrategyForPath and getRequestPath.


Regards,
Erik.


Andreas Maza wrote:

Hello,

I would like to do a simple URL rewriting in my application: All requests
containing a given path (e.g., a /x/...) should be filtered and redirected
accordingly.

In other words, for a request to http://www.example.com/x/something I want
to do a database lookup based on the value of something and then redirect
the user to the appropriate wicket page.

What is the recommended way to do this in wicket? Make a hook into the
WebApplication.newRequestCycle() method?

thanks for your help,
andr

  


--

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



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



Buffer not retrieved if RENDER_TO_BUFFER is used with IndexedHybridUrlCodingStrategy and the web server uses URL rewriting (cookies switched off)

2009-12-14 Thread Engler Adrian
Hello,

In a Wicket web application (Wicket 1.4.3) I noticed that feedback
messages were not displayed when cookies were disabled in the browser.
It turned out that this problem had to do with the combination of the
URL coding strategy that was used (IndexedHybridUrlCodingStrategy) and
the render strategy, RenderStrategy.REDIRECT_TO_BUFFER (which is the
default). What actually happens when cookies are switched off is that
the page is rendered to a buffer, a redirect is sent, but then the
server does not recognize that it should use the contents of the buffer
because the URLs do not match, and therefore the page is rendered again
(this time without the feedback messages because they are now already
marked as rendered), the buffer is not used.

If the render strategy is changed to RenderStrategy.REDIRECT_TO_RENDER,
there is no problem without cookies; the problem only exists when the
page is first rendered to a buffer and then this buffer is not used.

The attached minimal application demonstrates this behavior: When
cookies are enabled, you can click the button Show feedback message on
the page, and a message Info message generated time is shown. If
cookies are disabled, no feedback message is shown.

Example from debugging:
In WebRequestCycle.redirectTo(...), the variable redirectURL is assigned
the value home.0;jsessionid=1ie4koskoj2bn; addBufferedResponse is then
called with the value home.0;jsessionid=1ie4koskoj2bn for buffered.
Then, after the redirect, in WicketFilter.doGet(...),
WebApplication.popBufferedResponse is called with the value home.0 for
the relativePath parameter. In that method, the buffered response is not
found (because the real key is home.0;jsessionid=1ie4koskoj2bn).

The problem is that when the buffer is put to the map, a key that
includes the session ID is used, while for retrieval of the buffered
page, a key without the session ID is used.

This problem occurs when IndexedHybridUrlCodingStrategy or the super
class HybridUrlCodingStrategy is used. 

If the page is not mounted (and not bookmarkable after the form has been
submitted), there are no problems without cookies because a key without
the jsessionid is used for storing the buffered response in a map. This
has to do with the fact that in WebRequestCycle.redirectTo(...) only the
part of the URL after the ? is used as a key:

int index = stripped.indexOf(?);
[...]
((WebApplication) application).addBufferedResponse(sessionId,
stripped.substring(index + 1), servletResponse);

If the page is mounted with a HybridUrlCodingStrategy, the value
assigned to the variable stripped is a string without a ?, therefore,
index has the value -1 and a URL with jsessionid is used as a key for
the buffered page.

I think it might be good if someone has a look into this; it might also
be hat in some settings a response is rendered twice (first into the
buffer then for the client because the buffer is not retrieved because
of a URL mismatch) without users noticing anything (as long as feedback
messages are not used).

Thank you!


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

Re: Buffer not retrieved if RENDER_TO_BUFFER is used with IndexedHybridUrlCodingStrategy and the web server uses URL rewriting (cookies switched off)

2009-12-14 Thread Martijn Dashorst
Use the URL Rewriting features of your container.

Martijn

On Mon, Dec 14, 2009 at 2:52 PM, Engler Adrian adrian.eng...@ecofin.ch wrote:
 Hello,

 In a Wicket web application (Wicket 1.4.3) I noticed that feedback
 messages were not displayed when cookies were disabled in the browser.
 It turned out that this problem had to do with the combination of the
 URL coding strategy that was used (IndexedHybridUrlCodingStrategy) and
 the render strategy, RenderStrategy.REDIRECT_TO_BUFFER (which is the
 default). What actually happens when cookies are switched off is that
 the page is rendered to a buffer, a redirect is sent, but then the
 server does not recognize that it should use the contents of the buffer
 because the URLs do not match, and therefore the page is rendered again
 (this time without the feedback messages because they are now already
 marked as rendered), the buffer is not used.

 If the render strategy is changed to RenderStrategy.REDIRECT_TO_RENDER,
 there is no problem without cookies; the problem only exists when the
 page is first rendered to a buffer and then this buffer is not used.

 The attached minimal application demonstrates this behavior: When
 cookies are enabled, you can click the button Show feedback message on
 the page, and a message Info message generated time is shown. If
 cookies are disabled, no feedback message is shown.

 Example from debugging:
 In WebRequestCycle.redirectTo(...), the variable redirectURL is assigned
 the value home.0;jsessionid=1ie4koskoj2bn; addBufferedResponse is then
 called with the value home.0;jsessionid=1ie4koskoj2bn for buffered.
 Then, after the redirect, in WicketFilter.doGet(...),
 WebApplication.popBufferedResponse is called with the value home.0 for
 the relativePath parameter. In that method, the buffered response is not
 found (because the real key is home.0;jsessionid=1ie4koskoj2bn).

 The problem is that when the buffer is put to the map, a key that
 includes the session ID is used, while for retrieval of the buffered
 page, a key without the session ID is used.

 This problem occurs when IndexedHybridUrlCodingStrategy or the super
 class HybridUrlCodingStrategy is used.

 If the page is not mounted (and not bookmarkable after the form has been
 submitted), there are no problems without cookies because a key without
 the jsessionid is used for storing the buffered response in a map. This
 has to do with the fact that in WebRequestCycle.redirectTo(...) only the
 part of the URL after the ? is used as a key:

 int index = stripped.indexOf(?);
 [...]
 ((WebApplication) application).addBufferedResponse(sessionId,
 stripped.substring(index + 1), servletResponse);

 If the page is mounted with a HybridUrlCodingStrategy, the value
 assigned to the variable stripped is a string without a ?, therefore,
 index has the value -1 and a URL with jsessionid is used as a key for
 the buffered page.

 I think it might be good if someone has a look into this; it might also
 be hat in some settings a response is rendered twice (first into the
 buffer then for the client because the buffer is not retrieved because
 of a URL mismatch) without users noticing anything (as long as feedback
 messages are not used).

 Thank you!



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




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: Buffer not retrieved if RENDER_TO_BUFFER is used with IndexedHybridUrlCodingStrategy and the web server uses URL rewriting (cookies switched off)

2009-12-14 Thread Martijn Dashorst
Ah... ok. this is a bug, file a JIRA issue please.

Martijn

On Mon, Dec 14, 2009 at 2:59 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 Use the URL Rewriting features of your container.

 Martijn

 On Mon, Dec 14, 2009 at 2:52 PM, Engler Adrian adrian.eng...@ecofin.ch 
 wrote:
 Hello,

 In a Wicket web application (Wicket 1.4.3) I noticed that feedback
 messages were not displayed when cookies were disabled in the browser.
 It turned out that this problem had to do with the combination of the
 URL coding strategy that was used (IndexedHybridUrlCodingStrategy) and
 the render strategy, RenderStrategy.REDIRECT_TO_BUFFER (which is the
 default). What actually happens when cookies are switched off is that
 the page is rendered to a buffer, a redirect is sent, but then the
 server does not recognize that it should use the contents of the buffer
 because the URLs do not match, and therefore the page is rendered again
 (this time without the feedback messages because they are now already
 marked as rendered), the buffer is not used.

 If the render strategy is changed to RenderStrategy.REDIRECT_TO_RENDER,
 there is no problem without cookies; the problem only exists when the
 page is first rendered to a buffer and then this buffer is not used.

 The attached minimal application demonstrates this behavior: When
 cookies are enabled, you can click the button Show feedback message on
 the page, and a message Info message generated time is shown. If
 cookies are disabled, no feedback message is shown.

 Example from debugging:
 In WebRequestCycle.redirectTo(...), the variable redirectURL is assigned
 the value home.0;jsessionid=1ie4koskoj2bn; addBufferedResponse is then
 called with the value home.0;jsessionid=1ie4koskoj2bn for buffered.
 Then, after the redirect, in WicketFilter.doGet(...),
 WebApplication.popBufferedResponse is called with the value home.0 for
 the relativePath parameter. In that method, the buffered response is not
 found (because the real key is home.0;jsessionid=1ie4koskoj2bn).

 The problem is that when the buffer is put to the map, a key that
 includes the session ID is used, while for retrieval of the buffered
 page, a key without the session ID is used.

 This problem occurs when IndexedHybridUrlCodingStrategy or the super
 class HybridUrlCodingStrategy is used.

 If the page is not mounted (and not bookmarkable after the form has been
 submitted), there are no problems without cookies because a key without
 the jsessionid is used for storing the buffered response in a map. This
 has to do with the fact that in WebRequestCycle.redirectTo(...) only the
 part of the URL after the ? is used as a key:

 int index = stripped.indexOf(?);
 [...]
 ((WebApplication) application).addBufferedResponse(sessionId,
 stripped.substring(index + 1), servletResponse);

 If the page is mounted with a HybridUrlCodingStrategy, the value
 assigned to the variable stripped is a string without a ?, therefore,
 index has the value -1 and a URL with jsessionid is used as a key for
 the buffered page.

 I think it might be good if someone has a look into this; it might also
 be hat in some settings a response is rendered twice (first into the
 buffer then for the client because the buffer is not retrieved because
 of a URL mismatch) without users noticing anything (as long as feedback
 messages are not used).

 Thank you!



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




 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.4 increases type safety for web applications
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



RE: Buffer not retrieved if RENDER_TO_BUFFER is used with IndexedHybridUrlCodingStrategy and the web server uses URL rewriting (cookies switched off)

2009-12-14 Thread Engler Adrian
Thank you for your answer; I have created the JIRA issue
https://issues.apache.org/jira/browse/WICKET-2615

Since the problem only occurs with the default render strategy
RenderStrategy.REDIRECT_TO_BUFFER in combination with certain URL coding
strategies, there are workarounds, such as using
RenderStrategy.REDIRECT_TO_RENDER, therefore I suppose it should be
categorized as Minor.

However, I think this issue points at potential problems with the key
used with RenderStrategy.REDIRECT_TO_BUFFER for storing buffered
responses that might (in combination with certain URL coding strategies)
go beyond the issue observed with URL rewriting in this case - so,
although it is not urgent, it might still be important.

Adrian Engler

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Montag, 14. Dezember 2009 15:00
To: users@wicket.apache.org
Subject: Re: Buffer not retrieved if RENDER_TO_BUFFER is used with
IndexedHybridUrlCodingStrategy and the web server uses URL rewriting
(cookies switched off)

Ah... ok. this is a bug, file a JIRA issue please.

Martijn

On Mon, Dec 14, 2009 at 2:59 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 Use the URL Rewriting features of your container.

 Martijn

 On Mon, Dec 14, 2009 at 2:52 PM, Engler Adrian
adrian.eng...@ecofin.ch wrote:
 Hello,

 In a Wicket web application (Wicket 1.4.3) I noticed that feedback
 messages were not displayed when cookies were disabled in the
browser.
 It turned out that this problem had to do with the combination of the
 URL coding strategy that was used (IndexedHybridUrlCodingStrategy)
and
 the render strategy, RenderStrategy.REDIRECT_TO_BUFFER (which is the
 default). What actually happens when cookies are switched off is that
 the page is rendered to a buffer, a redirect is sent, but then the
 server does not recognize that it should use the contents of the
buffer
 because the URLs do not match, and therefore the page is rendered
again
 (this time without the feedback messages because they are now already
 marked as rendered), the buffer is not used.

 If the render strategy is changed to
RenderStrategy.REDIRECT_TO_RENDER,
 there is no problem without cookies; the problem only exists when the
 page is first rendered to a buffer and then this buffer is not used.

 The attached minimal application demonstrates this behavior: When
 cookies are enabled, you can click the button Show feedback message
on
 the page, and a message Info message generated time is shown. If
 cookies are disabled, no feedback message is shown.

 Example from debugging:
 In WebRequestCycle.redirectTo(...), the variable redirectURL is
assigned
 the value home.0;jsessionid=1ie4koskoj2bn; addBufferedResponse is
then
 called with the value home.0;jsessionid=1ie4koskoj2bn for buffered.
 Then, after the redirect, in WicketFilter.doGet(...),
 WebApplication.popBufferedResponse is called with the value home.0
for
 the relativePath parameter. In that method, the buffered response is
not
 found (because the real key is home.0;jsessionid=1ie4koskoj2bn).

 The problem is that when the buffer is put to the map, a key that
 includes the session ID is used, while for retrieval of the buffered
 page, a key without the session ID is used.

 This problem occurs when IndexedHybridUrlCodingStrategy or the super
 class HybridUrlCodingStrategy is used.

 If the page is not mounted (and not bookmarkable after the form has
been
 submitted), there are no problems without cookies because a key
without
 the jsessionid is used for storing the buffered response in a map.
This
 has to do with the fact that in WebRequestCycle.redirectTo(...) only
the
 part of the URL after the ? is used as a key:

 int index = stripped.indexOf(?);
 [...]
 ((WebApplication) application).addBufferedResponse(sessionId,
 stripped.substring(index + 1), servletResponse);

 If the page is mounted with a HybridUrlCodingStrategy, the value
 assigned to the variable stripped is a string without a ?,
therefore,
 index has the value -1 and a URL with jsessionid is used as a key for
 the buffered page.

 I think it might be good if someone has a look into this; it might
also
 be hat in some settings a response is rendered twice (first into the
 buffer then for the client because the buffer is not retrieved
because
 of a URL mismatch) without users noticing anything (as long as
feedback
 messages are not used).

 Thank you!



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




 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.4 increases type safety for web applications
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http

Re: URL Rewriting in Wicket

2009-12-14 Thread A. Maza
Thanks for the hint. I found out that the IndexedParamUrlCodingStrategy 
actually provides exactly what I need...


The fine thing with wicket is that you can realize things really fast - 
great job!


regards,
andr


On 14.12.2009 11:26, Erik van Oosten wrote:

Actually, you should override the WebRequestProcessor and return a
custom RequestCodingStrategy from there. The custom
RequestCodingStrategy would extend one of the default implementation and
override urlCodingStrategyForPath and getRequestPath.

Regards,
Erik.


Andreas Maza wrote:

Hello,

I would like to do a simple URL rewriting in my application: All requests
containing a given path (e.g., a /x/...) should be filtered and
redirected
accordingly.

In other words, for a request to http://www.example.com/x/something I
want
to do a database lookup based on the value of something and then
redirect
the user to the appropriate wicket page.

What is the recommended way to do this in wicket? Make a hook into the
WebApplication.newRequestCycle() method?

thanks for your help,
andr






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



URL Rewriting in Wicket

2009-12-13 Thread Andreas Maza
Hello,

I would like to do a simple URL rewriting in my application: All requests
containing a given path (e.g., a /x/...) should be filtered and redirected
accordingly.

In other words, for a request to http://www.example.com/x/something I want
to do a database lookup based on the value of something and then redirect
the user to the appropriate wicket page.

What is the recommended way to do this in wicket? Make a hook into the
WebApplication.newRequestCycle() method?

thanks for your help,
andr


URL rewriting

2009-04-10 Thread DV

We are evaluating wicket to rewrite our consumer UI.

There is one requirement in which I would like to get advice on.

We have a requirement in which the wildcard url gets dispatched to a controller 
that renders a page. The url pattern is in the form of 
/company/**-details.html.

We have a single controller that receives the above url and figures out the 
company name and displays the page accordingly or throws a http 404 error if 
the company is not found.

e.g /company/ABC-details.html, /company/TOTO-details.html etc

Can this be done in wicket?

Any advice or hints would be appreciated!

Dinp


  

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



Re: URL rewriting

2009-04-10 Thread Martin Makundi
I am not sure but maybe one simple way is to
mountBookmarkablePage(/company, CompanyHandler.class);

and then perform uour stuff in CompanyHandler, look at the request url etc.

**
Martin


2009/4/10 DV huc...@yahoo.com:

 We are evaluating wicket to rewrite our consumer UI.

 There is one requirement in which I would like to get advice on.

 We have a requirement in which the wildcard url gets dispatched to a 
 controller that renders a page. The url pattern is in the form of 
 /company/**-details.html.

 We have a single controller that receives the above url and figures out the 
 company name and displays the page accordingly or throws a http 404 error if 
 the company is not found.

 e.g /company/ABC-details.html, /company/TOTO-details.html etc

 Can this be done in wicket?

 Any advice or hints would be appreciated!

 Dinp




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



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



Re: URL rewriting

2009-04-10 Thread Janos Cserep
You have to mount your page via MixedParamUrlCodingStrategy:

mount(new MixedParamUrlCodingStrategy(/company, CompanyPage.class, new
String[] {companyName});

and in CompanyPage(PageParameters parameters) constructor do something like
this:

String nameInUrl = parameters.getString();
String company = nameInUrl.substring(0, ...);


On Fri, Apr 10, 2009 at 5:11 PM, DV huc...@yahoo.com wrote:


 We are evaluating wicket to rewrite our consumer UI.

 There is one requirement in which I would like to get advice on.

 We have a requirement in which the wildcard url gets dispatched to a
 controller that renders a page. The url pattern is in the form of
 /company/**-details.html.

 We have a single controller that receives the above url and figures out the
 company name and displays the page accordingly or throws a http 404 error if
 the company is not found.

 e.g /company/ABC-details.html, /company/TOTO-details.html etc

 Can this be done in wicket?

 Any advice or hints would be appreciated!

 Dinp



Re: URL rewriting

2009-04-10 Thread DV

Thanks for the responses. 3 decent responses within an hour or two. I'm 
impressed. The reputation about this group is definitely a plus in my 
evaluation.


--- On Fri, 4/10/09, David Brown dbr...@sexingtechnologies.com wrote:

 From: David Brown dbr...@sexingtechnologies.com
 Subject: Re: URL rewriting
 To: users@wicket.apache.org, huc...@yahoo.com
 Date: Friday, April 10, 2009, 10:17 AM
 Hello, one thing you could do is to not worry with Wicket
 doing this but instead allow a proxy to do this for you such
 as Squid with the very good Squid URL rewriting engine. I
 think even Apache has some very good URL rewriting
 configurations. Just an idea, David.
 
 
 
 
 There are 10 kinds of people in this world: those who
 understand binary and those who don’t (Valid only for
 2's complement).
 
 - Original Message -
 From: DV huc...@yahoo.com
 To: users@wicket.apache.org
 Sent: Friday, April 10, 2009 10:11:24 AM GMT -06:00
 US/Canada Central
 Subject: URL rewriting
 
 
 We are evaluating wicket to rewrite our consumer UI.
 
 There is one requirement in which I would like to get
 advice on.
 
 We have a requirement in which the wildcard url gets
 dispatched to a controller that renders a page. The url
 pattern is in the form of
 /company/**-details.html.
 
 We have a single controller that receives the above url and
 figures out the company name and displays the page
 accordingly or throws a http 404 error if the company is not
 found.
 
 e.g /company/ABC-details.html, /company/TOTO-details.html
 etc
 
 Can this be done in wicket?
 
 Any advice or hints would be appreciated!
 
 Dinp
 
 
   
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail:
 users-h...@wicket.apache.org




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



Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten

Now thats *really* friendly :-)

On 15 okt 2008, at 13:11, James Carman wrote:


Right, I guess that's what I meant by friendly too.  Friendly to
search engines, not just our eyes.

On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote:

Keeping keywords in URLs also improves search engine rankings.

Regards,

Daan

On 15 okt 2008, at 13:01, James Carman wrote:

When Amazon.com does something like this, they still use an id on  
the
URL.  Check out these two URLs (which are equivalent and happen to  
be

for a book I was suggesting to someone):


http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063

http://www.amazon.com/dp/0974514063

They just add in the text to make it more friendly I guess.


On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED]  
wrote:


Hi Hbiloo,

I don't know of an existing working solution. A while ago some  
people

where
working on this, according to the mailing list:

http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
PROTECTED]

You can prefix the article title with the date (as I did on my  
blog), so

you
have less chance on name clashes.

Regards,

Daan

On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:


Hi Daan,

Thanks for your quick response :). It's a really interesting  
article to

read.
I don't really want to set the ID's of my product in the URL. I  
was

thinking
to do something like this :) :


http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket 


in stead of


http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket 



The problem is that you cannot be sure that the article title is  
unique.


Kind regards,

Hbiloo
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED]  
wrote:



Hi Hbiloo,

Check out the various UrlCodingStrategies. See
http://cwiki.apache.org/WICKET/url-coding-strategies.html

I wrote something about RESTful urls here:
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

Regards,

Daan



On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

Hi,


I wanna just know if there is a way to rewrite URLs. For  
example to do

something like this:

From: http://mydomain.com/product/productNumber/12345
To: http://mydomain.com/product/this-is-my-product


Regards,

Hbiloo




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread Witold Czaplewski
Hmm...could be. Google shows only one urls [1]

Maybe amazon uses other techniques like robots.txt or the meta-tag
robots to block the other urls. But i didn't look at it.

If you are interested in duplicate content, the google webmaster
central blog has some very nice posts [2] [3].

[1]
http://www.google.com/search?hl=enq=site%3Aamazon.com+%22Pragmatic+Version+Control+Using+Subversion+Mike+Mason%22btnG=Search
[2]
http://googlewebmastercentral.blogspot.com/2006/12/deftly-dealing-with-duplicate-content.html
[3]
http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html

Witold

Am Wed, 15 Oct 2008 07:45:39 -0400
schrieb James Carman [EMAIL PROTECTED]:

 To be fair, I didn't find that second URL.  I hand-crafted it.  So,
 maybe Amazon doesn't let the search engines find those types of URLs
 by crawling.  Wouldn't that help?
 
 On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski
 [EMAIL PROTECTED] wrote:
  Btw...
 
  amazon.com is a very bad example for a search engine friendly site.
  Duplicate content like the posted urls are more problematic than
  non-friendly urls.
  The perfect solution (unfortunately not always possible) is only one
  friendly or meaningful url for every unique page.
 
  Witold
 
  Am Wed, 15 Oct 2008 07:11:16 -0400
  schrieb James Carman [EMAIL PROTECTED]:
 
  Right, I guess that's what I meant by friendly too.  Friendly to
  search engines, not just our eyes.
 
  On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
   Keeping keywords in URLs also improves search engine rankings.
  
   Regards,
  
   Daan
  
   On 15 okt 2008, at 13:01, James Carman wrote:
  
   When Amazon.com does something like this, they still use an id
   on the URL.  Check out these two URLs (which are equivalent and
   happen to be for a book I was suggesting to someone):
  
  
   http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063
  
   http://www.amazon.com/dp/0974514063
  
   They just add in the text to make it more friendly I guess.
  
  
   On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED]
   wrote:
  
   Hi Hbiloo,
  
   I don't know of an existing working solution. A while ago some
   people where
   working on this, according to the mailing list:
  
   http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
   PROTECTED]
  
   You can prefix the article title with the date (as I did on my
   blog), so you
   have less chance on name clashes.
  
   Regards,
  
   Daan
  
   On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:
  
   Hi Daan,
  
   Thanks for your quick response :). It's a really interesting
   article to read.
   I don't really want to set the ID's of my product in the URL.
   I was thinking
   to do something like this :) :
  
  
   http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
   in stead of
  
  
   http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  
   The problem is that you cannot be sure that the article title
   is unique.
  
   Kind regards,
  
   Hbiloo
   http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
   On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten
   [EMAIL PROTECTED] wrote:
  
   Hi Hbiloo,
  
   Check out the various UrlCodingStrategies. See
   http://cwiki.apache.org/WICKET/url-coding-strategies.html
  
   I wrote something about RESTful urls here:
   http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  
   Regards,
  
   Daan
  
  
  
   On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:
  
   Hi,
  
   I wanna just know if there is a way to rewrite URLs. For
   example to do something like this:
  
   From: http://mydomain.com/product/productNumber/12345
   To: http://mydomain.com/product/this-is-my-product
  
  
   Regards,
  
   Hbiloo
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL 

Re: Small question about URL rewriting

2008-10-15 Thread Jon Stockdill
Django adds a slug field, which is unique, for its urls.  Then you
look up the content by slug instead of id

Its admin interface suggests a slug, which is alterable if it is not unique.




On 10/15/08, James Carman [EMAIL PROTECTED] wrote:
 To be fair, I didn't find that second URL.  I hand-crafted it.  So,
 maybe Amazon doesn't let the search engines find those types of URLs
 by crawling.  Wouldn't that help?

 On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski
 [EMAIL PROTECTED] wrote:
 Btw...

 amazon.com is a very bad example for a search engine friendly site.
 Duplicate content like the posted urls are more problematic than
 non-friendly urls.
 The perfect solution (unfortunately not always possible) is only one
 friendly or meaningful url for every unique page.

 Witold

 Am Wed, 15 Oct 2008 07:11:16 -0400
 schrieb James Carman [EMAIL PROTECTED]:

 Right, I guess that's what I meant by friendly too.  Friendly to
 search engines, not just our eyes.

 On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote:
  Keeping keywords in URLs also improves search engine rankings.
 
  Regards,
 
  Daan
 
  On 15 okt 2008, at 13:01, James Carman wrote:
 
  When Amazon.com does something like this, they still use an id on
  the URL.  Check out these two URLs (which are equivalent and
  happen to be for a book I was suggesting to someone):
 
 
  http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063
 
  http://www.amazon.com/dp/0974514063
 
  They just add in the text to make it more friendly I guess.
 
 
  On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
 
  Hi Hbiloo,
 
  I don't know of an existing working solution. A while ago some
  people where
  working on this, according to the mailing list:
 
  http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
  PROTECTED]
 
  You can prefix the article title with the date (as I did on my
  blog), so you
  have less chance on name clashes.
 
  Regards,
 
  Daan
 
  On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:
 
  Hi Daan,
 
  Thanks for your quick response :). It's a really interesting
  article to read.
  I don't really want to set the ID's of my product in the URL. I
  was thinking
  to do something like this :) :
 
 
  http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  in stead of
 
 
  http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 
  The problem is that you cannot be sure that the article title is
  unique.
 
  Kind regards,
 
  Hbiloo
  http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
 
  Hi Hbiloo,
 
  Check out the various UrlCodingStrategies. See
  http://cwiki.apache.org/WICKET/url-coding-strategies.html
 
  I wrote something about RESTful urls here:
  http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 
  Regards,
 
  Daan
 
 
 
  On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:
 
  Hi,
 
  I wanna just know if there is a way to rewrite URLs. For
  example to do something like this:
 
  From: http://mydomain.com/product/productNumber/12345
  To: http://mydomain.com/product/this-is-my-product
 
 
  Regards,
 
  Hbiloo
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
Sent from Gmail for mobile | mobile.google.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten

Hi Hbiloo,

Check out the various UrlCodingStrategies. See 
http://cwiki.apache.org/WICKET/url-coding-strategies.html

I wrote something about RESTful urls here: 
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

Regards,

Daan


On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:


Hi,

I wanna just know if there is a way to rewrite URLs. For example to do
something like this:

From: http://mydomain.com/product/productNumber/12345
To: http://mydomain.com/product/this-is-my-product


Regards,

Hbiloo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten

Hi Hbiloo,

I don't know of an existing working solution. A while ago some people  
where working on this, according to the mailing list:

http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
PROTECTED]

You can prefix the article title with the date (as I did on my blog),  
so you have less chance on name clashes.


Regards,

Daan

On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:


Hi Daan,

Thanks for your quick response :). It's a really interesting article  
to

read.
I don't really want to set the ID's of my product in the URL. I was  
thinking

to do something like this :) :
http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket 


in stead of
http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket 



The problem is that you cannot be sure that the article title is  
unique.


Kind regards,

Hbiloo
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote:


Hi Hbiloo,

Check out the various UrlCodingStrategies. See
http://cwiki.apache.org/WICKET/url-coding-strategies.html

I wrote something about RESTful urls here:
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

Regards,

Daan



On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

Hi,


I wanna just know if there is a way to rewrite URLs. For example  
to do

something like this:

From: http://mydomain.com/product/productNumber/12345
To: http://mydomain.com/product/this-is-my-product


Regards,

Hbiloo




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread Daan van Etten

Keeping keywords in URLs also improves search engine rankings.

Regards,

Daan

On 15 okt 2008, at 13:01, James Carman wrote:


When Amazon.com does something like this, they still use an id on the
URL.  Check out these two URLs (which are equivalent and happen to be
for a book I was suggesting to someone):

http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063

http://www.amazon.com/dp/0974514063

They just add in the text to make it more friendly I guess.


On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote:

Hi Hbiloo,

I don't know of an existing working solution. A while ago some  
people where

working on this, according to the mailing list:
http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
PROTECTED]

You can prefix the article title with the date (as I did on my  
blog), so you

have less chance on name clashes.

Regards,

Daan

On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:


Hi Daan,

Thanks for your quick response :). It's a really interesting  
article to

read.
I don't really want to set the ID's of my product in the URL. I was
thinking
to do something like this :) :

http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket 


in stead of

http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket 



The problem is that you cannot be sure that the article title is  
unique.


Kind regards,

Hbiloo
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED]  
wrote:



Hi Hbiloo,

Check out the various UrlCodingStrategies. See
http://cwiki.apache.org/WICKET/url-coding-strategies.html

I wrote something about RESTful urls here:
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

Regards,

Daan



On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

Hi,


I wanna just know if there is a way to rewrite URLs. For example  
to do

something like this:

From: http://mydomain.com/product/productNumber/12345
To: http://mydomain.com/product/this-is-my-product


Regards,

Hbiloo




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread James Carman
When Amazon.com does something like this, they still use an id on the
URL.  Check out these two URLs (which are equivalent and happen to be
for a book I was suggesting to someone):

http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063

http://www.amazon.com/dp/0974514063

They just add in the text to make it more friendly I guess.


On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote:
 Hi Hbiloo,

 I don't know of an existing working solution. A while ago some people where
 working on this, according to the mailing list:
 http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
 PROTECTED]

 You can prefix the article title with the date (as I did on my blog), so you
 have less chance on name clashes.

 Regards,

 Daan

 On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:

 Hi Daan,

 Thanks for your quick response :). It's a really interesting article to
 read.
 I don't really want to set the ID's of my product in the URL. I was
 thinking
 to do something like this :) :

 http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 in stead of

 http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

 The problem is that you cannot be sure that the article title is unique.

 Kind regards,

 Hbiloo
 http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote:

 Hi Hbiloo,

 Check out the various UrlCodingStrategies. See
 http://cwiki.apache.org/WICKET/url-coding-strategies.html

 I wrote something about RESTful urls here:
 http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

 Regards,

 Daan



 On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

 Hi,

 I wanna just know if there is a way to rewrite URLs. For example to do
 something like this:

 From: http://mydomain.com/product/productNumber/12345
 To: http://mydomain.com/product/this-is-my-product


 Regards,

 Hbiloo



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread James Carman
Right, I guess that's what I meant by friendly too.  Friendly to
search engines, not just our eyes.

On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote:
 Keeping keywords in URLs also improves search engine rankings.

 Regards,

 Daan

 On 15 okt 2008, at 13:01, James Carman wrote:

 When Amazon.com does something like this, they still use an id on the
 URL.  Check out these two URLs (which are equivalent and happen to be
 for a book I was suggesting to someone):


 http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063

 http://www.amazon.com/dp/0974514063

 They just add in the text to make it more friendly I guess.


 On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote:

 Hi Hbiloo,

 I don't know of an existing working solution. A while ago some people
 where
 working on this, according to the mailing list:

 http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
 PROTECTED]

 You can prefix the article title with the date (as I did on my blog), so
 you
 have less chance on name clashes.

 Regards,

 Daan

 On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:

 Hi Daan,

 Thanks for your quick response :). It's a really interesting article to
 read.
 I don't really want to set the ID's of my product in the URL. I was
 thinking
 to do something like this :) :


 http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 in stead of


 http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

 The problem is that you cannot be sure that the article title is unique.

 Kind regards,

 Hbiloo
 http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote:

 Hi Hbiloo,

 Check out the various UrlCodingStrategies. See
 http://cwiki.apache.org/WICKET/url-coding-strategies.html

 I wrote something about RESTful urls here:
 http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

 Regards,

 Daan



 On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

 Hi,

 I wanna just know if there is a way to rewrite URLs. For example to do
 something like this:

 From: http://mydomain.com/product/productNumber/12345
 To: http://mydomain.com/product/this-is-my-product


 Regards,

 Hbiloo



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread Azzeddine Daddah
Hi Daan,

Thanks for your quick response :). It's a really interesting article to
read.
I don't really want to set the ID's of my product in the URL. I was thinking
to do something like this :) :
http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
in stead of
http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

The problem is that you cannot be sure that the article title is unique.

Kind regards,

Hbiloo
http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote:

 Hi Hbiloo,

 Check out the various UrlCodingStrategies. See
 http://cwiki.apache.org/WICKET/url-coding-strategies.html

 I wrote something about RESTful urls here:
 http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket

 Regards,

 Daan



 On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:

  Hi,

 I wanna just know if there is a way to rewrite URLs. For example to do
 something like this:

 From: http://mydomain.com/product/productNumber/12345
 To: http://mydomain.com/product/this-is-my-product


 Regards,

 Hbiloo



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Small question about URL rewriting

2008-10-15 Thread James Carman
To be fair, I didn't find that second URL.  I hand-crafted it.  So,
maybe Amazon doesn't let the search engines find those types of URLs
by crawling.  Wouldn't that help?

On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski
[EMAIL PROTECTED] wrote:
 Btw...

 amazon.com is a very bad example for a search engine friendly site.
 Duplicate content like the posted urls are more problematic than
 non-friendly urls.
 The perfect solution (unfortunately not always possible) is only one
 friendly or meaningful url for every unique page.

 Witold

 Am Wed, 15 Oct 2008 07:11:16 -0400
 schrieb James Carman [EMAIL PROTECTED]:

 Right, I guess that's what I meant by friendly too.  Friendly to
 search engines, not just our eyes.

 On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote:
  Keeping keywords in URLs also improves search engine rankings.
 
  Regards,
 
  Daan
 
  On 15 okt 2008, at 13:01, James Carman wrote:
 
  When Amazon.com does something like this, they still use an id on
  the URL.  Check out these two URLs (which are equivalent and
  happen to be for a book I was suggesting to someone):
 
 
  http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063
 
  http://www.amazon.com/dp/0974514063
 
  They just add in the text to make it more friendly I guess.
 
 
  On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
 
  Hi Hbiloo,
 
  I don't know of an existing working solution. A while ago some
  people where
  working on this, according to the mailing list:
 
  http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
  PROTECTED]
 
  You can prefix the article title with the date (as I did on my
  blog), so you
  have less chance on name clashes.
 
  Regards,
 
  Daan
 
  On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:
 
  Hi Daan,
 
  Thanks for your quick response :). It's a really interesting
  article to read.
  I don't really want to set the ID's of my product in the URL. I
  was thinking
  to do something like this :) :
 
 
  http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  in stead of
 
 
  http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 
  The problem is that you cannot be sure that the article title is
  unique.
 
  Kind regards,
 
  Hbiloo
  http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
 
  Hi Hbiloo,
 
  Check out the various UrlCodingStrategies. See
  http://cwiki.apache.org/WICKET/url-coding-strategies.html
 
  I wrote something about RESTful urls here:
  http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 
  Regards,
 
  Daan
 
 
 
  On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:
 
  Hi,
 
  I wanna just know if there is a way to rewrite URLs. For
  example to do something like this:
 
  From: http://mydomain.com/product/productNumber/12345
  To: http://mydomain.com/product/this-is-my-product
 
 
  Regards,
 
  Hbiloo
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Small question about URL rewriting

2008-10-15 Thread Witold Czaplewski
Btw...

amazon.com is a very bad example for a search engine friendly site.
Duplicate content like the posted urls are more problematic than
non-friendly urls.
The perfect solution (unfortunately not always possible) is only one
friendly or meaningful url for every unique page.

Witold

Am Wed, 15 Oct 2008 07:11:16 -0400
schrieb James Carman [EMAIL PROTECTED]:

 Right, I guess that's what I meant by friendly too.  Friendly to
 search engines, not just our eyes.
 
 On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote:
  Keeping keywords in URLs also improves search engine rankings.
 
  Regards,
 
  Daan
 
  On 15 okt 2008, at 13:01, James Carman wrote:
 
  When Amazon.com does something like this, they still use an id on
  the URL.  Check out these two URLs (which are equivalent and
  happen to be for a book I was suggesting to someone):
 
 
  http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063
 
  http://www.amazon.com/dp/0974514063
 
  They just add in the text to make it more friendly I guess.
 
 
  On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
 
  Hi Hbiloo,
 
  I don't know of an existing working solution. A while ago some
  people where
  working on this, according to the mailing list:
 
  http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL 
  PROTECTED]
 
  You can prefix the article title with the date (as I did on my
  blog), so you
  have less chance on name clashes.
 
  Regards,
 
  Daan
 
  On 15 okt 2008, at 11:58, Azzeddine Daddah wrote:
 
  Hi Daan,
 
  Thanks for your quick response :). It's a really interesting
  article to read.
  I don't really want to set the ID's of my product in the URL. I
  was thinking
  to do something like this :) :
 
 
  http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  in stead of
 
 
  http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 
  The problem is that you cannot be sure that the article title is
  unique.
 
  Kind regards,
 
  Hbiloo
  http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
  On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED]
  wrote:
 
  Hi Hbiloo,
 
  Check out the various UrlCodingStrategies. See
  http://cwiki.apache.org/WICKET/url-coding-strategies.html
 
  I wrote something about RESTful urls here:
  http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket
 
  Regards,
 
  Daan
 
 
 
  On 15 okt 2008, at 11:19, Azzeddine Daddah wrote:
 
  Hi,
 
  I wanna just know if there is a way to rewrite URLs. For
  example to do something like this:
 
  From: http://mydomain.com/product/productNumber/12345
  To: http://mydomain.com/product/this-is-my-product
 
 
  Regards,
 
  Hbiloo
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]