Question

Is this good practice to put../in context path. But this is working fine.

<pg:pager maxPageItems="20" maxSetPages="1"
        url="../cases/handleCaseSearchResults.do"
        prevNextUrl="../cases/findCaseSearchResults.do"
        listName="Cases">
Was it helpful?

Solution

I would say no. Doing so will make it harder to change the URL of the page containing this code (because all the relative paths will have to change).

It will also be harder to change the path of findCaseSearchResults.do, because you won't be able to do a global search/replace to switch from one absolute path to another one.

It also makes it impossible to forward to the same JSP page from multiple paths, since the location is relative to the URL of the action (.do) and not to the URL of the JSP.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top