Any Portlet or j2ee Web application always include resources like css, images, js files.
In a web application, you can directly refer these resources using relative urls, but for Portlet Application it is NOT a good practice to use relative urls for including these types of resources.
<link rel="stylesheet" href="../css/styles.css" type="text/css" />
Works well in a WebApplication.
BUT, in a portlet application, this will be interpreted relative to the portal
url by the browser and thus will not point to the resource you
intend to embed in your markup.
So basically, if the css and jsp are both present in a sub folder of the root
folder of your portlet application, It would be resolved by the browser
something like this
Which is not the case and you would like browser to request like this
What you would like the browser to request is
So, in portlet you should be using absolute path including
the context path of your portlet app