Make sure your second.jsp is available to your webbrowser: You are in a portlet environment, thus you cannot assume that ./second.jsp
is referring to the same directory as the jsp is in that is serving the content you pasted in your question. Most likely you'll need a different path - if your jsp is in /WEB-INF
, you'll even need to move it somewhere else, so that it can be dynamically requested.
Further, if second.jsp needs access to the portal session, you'd better use a resource-request to your portlet. <portlet:resourceURL/>
will be your friend for this.
As charlietfl suggests in the comment to your question, the best way is to use an HTTP-level output in your browser (e.g. firebug) and see what kind of request is actually sent.
Also, as you're in a portal environment, you may want to append/prepend <portlet:namespace/>
to the id you're giving - otherwise you'll have duplicate ids when your portlet is added to the page twice (or someone else chooses to use the same id)