±Û¾´ÀÌ :ÀÌÀç¸í 1999³â 12¿ù 21ÀÏ 13:19:15
Á¦¸ñ¿¡¼ ó·³ applet»ó¿¡¼ ÀÎÁõÀ» °ÅÃÄ,
servletÀ» È£ÃâÇÏ·ÁÇÕ´Ï´Ù.
ÀÎÁõ°úÁ¤ÀÎÁö¶ó Post¹æ¹ýÀ»½á¼
´Ü¼ø URL·ÎÀÇ Á¢¼ÓÀ» ¸·À¸·Á°í ¸»ÀÌÁÒ
±Ùµ¥ ÀÌ°Ô Àß ¾ÈµÇ´Â±º¿ä... µµ¿ò ¹ÞÀ¸·¯ ¿Ô½À´Ï´Ù.
²Ù¹÷~
¾Æ·¡ Á¦°¡ÇÑ ¾ÖÇø´°ú ¼ºí¸´ÀÇ Áß¿äºÎºÐÀ» ³²°Üº¾´Ï´Ù.
applet
=================================================
URLConnection conn = new URL("http://ip:port/servlet/UsrtestServlet" ).openConnection();
conn.setDoOutput(true);
conn.setUseCaches(false);
PrintWriter out = new PrintWriter(conn.getOutputStream());
StringBuffer sb = new StringBuffer();
sb.append(URLEncoder.encode("ID")+"="+URLEncoder.encode(vid));
out.print(sb.toString());
servlet
=================================================
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
res.setContentType("text/html; charset=edu-kr");
PrintWriter out = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), "KSC5601"));
String id = req.getParameter("ID");
if(req.getParameter("ID") != null)
{
out.print("<html>");
out.print("<body>");
out.print("<p>"+ Uni2ksc(id)+"</p>");
out.print("</body>");
out.print("</html>");
out.close();
}
}
ÀÌ·¸°Ô ½ÇÇàÇϸé
´ÙÀ½°ú °°Àº ¿¡·¯°¡ ³ª¿À´õ±º¿©...ÂÁ
405 Method Not Allowed
HTTP method GET is not supported by this URL
°í¼ö´ÔµéÀÇ ÈûÀ» ´Ù½ÃÇѹø ±â´Ù¸®°Ú½À´Ï´Ù.
±×·³ ²Ù¹÷~