Memory Drive

[JSP] URLEncoder

Computer_IT/JSP2006. 9. 30. 23:39
반응형
  1. <%@ page contentType="text/html; charset=euc-kr" %>
  2. <%@ page import="java.net.URLEncoder" %>
  3. <html>
  4. <head><title>URLEncoder</title></head>
  5. <body>
  6. <%
  7.   String value = "JSP하자";
  8.   String encoded = URLEncoder.encode(value);
  9.   response.sendRedirect("filename.jsp?name=" + encoded);
  10. %>
  11. </body>
  12. </html>
 
반응형

'Computer_IT > JSP' 카테고리의 다른 글

[Servlet] Redirection!  (0) 2007.04.18
[JSP] Java Beans(자바빈)  (0) 2006.10.01
[JSP] page redirect  (0) 2006.09.30
[JSP] request method list  (0) 2006.09.30
[JSP] JSP 필수 Directive  (0) 2006.09.30