<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form method="post" action="sessionOlustur.jsp">
KULLANICI ADI :
<input type="text" name="kullaniciadi" size=25>
<p><input type="submit" value="Kullanici adini goruntule">
</form>
</body>
</html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<% String kullaniciAdi=request.getParameter("kullaniciadi");
session.setAttribute("oturumdakiKullanici",kullaniciAdi);
%>
Session hazır !
<a href="sessionGoster.jsp">Diğer JSP sayfasında görmek için tıklayın...</a>
</body>
</html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
Hosgeldiniz Sayın : <% session.getAttribute("oturumdakiKullanici"); %>
</body>
</html>
Hiç yorum yok:
Yorum Gönder