On Apr 20, 2005, at 3:20 PM, Naveen Nagulapally wrote:As you can see, the request URL is myJSP,so url generated is wrong.
What would be the easiest way to change this.
Great question. I have just duplicated this issue with the sitemesh-example.war that SiteMesh includes (after applying my Tapestry decorator patch). I added <a jwcid="@PageLink" page="Tapestry">link back to this page</a> to decorators/Tapestry.html and it generated this link:
http://localhost:8080/sitemesh-example/tapestry.html?service=page/ Tapestry
I have been using the Tapestry decorator, but without any Tapestry components to generate links so I hadn't seen this before.
At this point all I'm doing is confirming the bug. I will look into this further when I can and let you know. Feel free to try to resolve this yourself somehow and let me know the fix if you discover it.
I have tinkered with this for a little while this morning to see if I could find a workaround. Luckily there is one. In a custom engine, override the getServletPath() method:
public class TapestryEngine extends BaseEngine {
public String getServletPath() {
return getContextPath() + "/tapestry";
}
}Register this custom engine in your .application and replace the "/tapestry" with "/app" or whatever your servlet mapping is to the Tapestry ApplicationServlet. "/tapestry" it the path used by the SiteMesh example application, but typically it's "/app".
This is a workaround, but it seems that SiteMesh is really where the fix should be such that when it forwards to the decorator the request wrapper should be adjusted to have the path of the decorator servlet path rather than the original request. I'll inquire on the SiteMesh list about this. Thankfully there is an easy and relatively painless workaround though.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
