Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to redirect your page?

Status
Not open for further replies.

gghMatt

Programmer
Oct 24, 2007
5
US
I am trying to make it to were when you type in the url to mysite.domain.net/PrayerHTML it will redirect you to mysite.domain.net unless you type in the password on mysite.domain.net!

I hope you understood that. Really I am just trying to make a password protected site with no eazy way around it.
 
<%@ page errorPage="errorpage.jsp" %>

<html>
<head>
<title>UseSession</title>
</head>
<body>
<%
Integer count = (Integer)session.getAttribute("COUNT");
// If COUNT is not found, create it and add it to the session
if ( count == null ) {

count = new Integer(1);
session.setAttribute("COUNT", count);
}
else {
count = new Integer(count.intValue() + 1);
session.setAttribute("COUNT", count);
}
out.println("<b>Hello you have visited this site: "
+ count + " times.</b>");
%>
</body>
</<%@ page errorPage="errorpage.jsp" %>

<html>
<head>
<title>UseSession</title>
</head>
<body>
<%
Integer count = (Integer)session.getAttribute("COUNT");
// If COUNT is not found, create it and add it to the session
if ( count == null ) {

count = new Integer(1);
session.setAttribute("COUNT", count);
}
else {
count = new Integer(count.intValue() + 1);
session.setAttribute("COUNT", count);
}
out.println("<b>Hello you have visited this site: "
+ count + " times.</b>");
%>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top