cancel
Showing results for 
Search instead for 
Did you mean: 

jspnative File - howto redirect to another jsp

Former Member
0 Kudos

Hello,

I have a PortalComponent consisting of some native JSP files. The first one ist registered in the portalapp.xml as jspnative. This works fine.

On this JSP I have a native button (input). If the user click on these button i need a forward to another jsp. Simple add an action attr. on the form tag within the JSP. But: how to calculate the path for that ?

If I use the IResource obj and use the URL of that, I got the msg. 'directory browsing not allowed in WEB-INF'.

Any ideas to solve this ?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

you can calculate the path by calling the request.getContextPath().

something like this

<form name = '' action = '<%= request.getContextPath()%>/forward.jsp'>.

Or on click of the button you can set the document location like this in a javascript mwthod.

document.location.href = '<%= request.getContextPath()%>/forward.jsp'.

Hope this solves your problem

Regards,

Sesh