掲示板
Go from 1 jsp page to another one in same portlet.
11年前 に Pavel Ivanov によって更新されました。
Go from 1 jsp page to another one in same portlet.
New Member 投稿: 17 参加年月日: 12/08/22 最新の投稿
Hi , i m trying to make redirect from 1 pahe to another with :
if (bIsVoted == true) {
%>
<script type="text/javascript">
<meta http-equiv="refresh" content="0; url=vote-portlet/completed.jsp">
</script>
<%
} else {
//VotedPeople.add(signedInAs);
%>
<script type="text/javascript">
<meta http-equiv="refresh" content="0; url=vote-portlet/edit.jsp">
</script>
<%
}
%>
and i have error with it. Whats wrong? Or there will be any another way 2 do it?
I m novice in Java/JSP so i ask you about complete answer pls.
if (bIsVoted == true) {
%>
<script type="text/javascript">
<meta http-equiv="refresh" content="0; url=vote-portlet/completed.jsp">
</script>
<%
} else {
//VotedPeople.add(signedInAs);
%>
<script type="text/javascript">
<meta http-equiv="refresh" content="0; url=vote-portlet/edit.jsp">
</script>
<%
}
%>
and i have error with it. Whats wrong? Or there will be any another way 2 do it?
I m novice in Java/JSP so i ask you about complete answer pls.
11年前 に Ibrahim Mahammad によって更新されました。
RE: Go from 1 jsp page to another one in same portlet.
Junior Member 投稿: 47 参加年月日: 11/11/30 最新の投稿
Pavel,
Specify what error your getting with this?
Specify what error your getting with this?
11年前 に Sushil Kumar Saini によって更新されました。
RE: Go from 1 jsp page to another one in same portlet.
Regular Member 投稿: 104 参加年月日: 11/07/27 最新の投稿
Hi Pavel,
Try the following code for redirect. I am using it my application and working fine for me.
Cheers
Sushil Saini
Try the following code for redirect. I am using it my application and working fine for me.
<script type="text/javascript">
window.location="http://www.redirecturl.com";
</script>
Cheers
Sushil Saini
11年前 に Pavel Ivanov によって更新されました。
RE: Go from 1 jsp page to another one in same portlet.
New Member 投稿: 17 参加年月日: 12/08/22 最新の投稿
Thx for an answer, but it doesnt work properly. That script opens new page not in a portlet window.
11年前 に Vishal Panchal によって更新されました。
RE: Go from 1 jsp page to another one in same portlet.
Expert 投稿: 289 参加年月日: 12/05/20 最新の投稿Pavel Ivanov:
Thx for an answer, but it doesnt work properly. That script opens new page not in a portlet window.
Hi Pavel,
You may either use
self.location = url;
or
window.location.assign(url);
Hope it will help you.!
Thanks&Regards,
Vishal R. Panchal