I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

Similar documents
Intro to Servlet, EJB, JSP, WS

JavaGeneralProgramming.PDF

TP_jsp7.PDF

14-Servlet

KYO_SCCD.PDF

04장

Interstage5 SOAP서비스 설정 가이드

chapter6.doc

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

J2EE Concepts

chapter1,2.doc

혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 <html> 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 <html> 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가

교육2 ? 그림

신림프로그래머_클린코드.key

PowerPoint Presentation

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

SchoolNet튜토리얼.PDF

No Slide Title

Web Service Computing

Spring Data JPA Many To Many 양방향 관계 예제


ibmdw_rest_v1.0.ppt

rmi_박준용_final.PDF

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp");

1. 스트럿츠는왜필요한가? Model 1 Model 1 방식의웹어플리케이션이란, 한개의 JSP 에서모든비지니스로직 ( 데이터베이스쿼리, 업데이트등실제업무작업 ) 을수행하고, 그결과를바로출력하는방식이다. 현재가장쉽게많이사용되는방식의웹프로그래밍모델이다. 이방식은아주단순한웹

PowerPoint 프레젠테이션

mytalk

PowerPoint 프레젠테이션

chapter5.doc

슬라이드 1

MasoJava4_Dongbin.PDF

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

<4D F736F F F696E74202D20B5A5C0CCC5CDBAA3C0CCBDBA5F3130C1D6C2F75F31C2F7BDC32E >


Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

서블릿의라이프사이클 뇌를자극하는 JSP & Servlet

DocsPin_Korean.pages

(jpetstore \277\271\301\246\267\316 \273\354\306\354\272\270\264\302 Spring MVC\277\315 iBatis \277\254\265\277 - Confluence)

1

뇌를 자극하는 JSP & Servlet 슬라이드

Chap12

Research & Technique Apache Tomcat RCE 취약점 (CVE ) 취약점개요 지난 4월 15일전세계적으로가장많이사용되는웹애플리케이션서버인 Apache Tomcat에서 RCE 취약점이공개되었다. CVE 취약점은 W

Week13

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

슬라이드 1

자바-11장N'1-502

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

PowerPoint 프레젠테이션

SK Telecom Platform NATE

초보자를 위한 자바 2 21일 완성 - 최신개정판

PowerPoint 프레젠테이션

중간고사

PowerPoint 프레젠테이션

3장

05-class.key

Microsoft PowerPoint - Smart CRM v4.0_TM 소개_ pptx

歯Writing_Enterprise_Applications_2_JunoYoon.PDF

Data Provisioning Services for mobile clients

untitled

Microsoft PowerPoint - web-part03-ch19-node.js기본.pptx

02 C h a p t e r Java

09-interface.key

<param-value> 파라미터의값 </param-value> </init-param> </servlet> <servlet-mapping> <url-pattern>/ 매핑문자열 </url-pattern> </servlet-mapping> - 위의예에서 ServletC

JAVA Bean & Session - Cookie

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Chap7.PDF

PCServerMgmt7

FileMaker ODBC and JDBC Guide

산업입지내지6차

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에

슬라이드 1

PowerPoint 프레젠테이션

Microsoft PowerPoint - aj-lecture7.ppt [호환 모드]

var answer = confirm(" 확인이나취소를누르세요."); // 확인창은사용자의의사를묻는데사용합니다. if(answer == true){ document.write(" 확인을눌렀습니다."); else { document.write(" 취소를눌렀습니다.");

PHP & ASP

FileMaker ODBC and JDBC Guide

歯JavaExceptionHandling.PDF

LXR 설치 및 사용법.doc

03장

12-file.key

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

Dialog Box 실행파일을 Web에 포함시키는 방법

Mstage.PDF

PowerPoint 프레젠테이션

<property name="configlocation" value="classpath:/egovframework/sqlmap/example/sql-map-config.xml"/> <property name="datasource" ref="datasource2"/> *

DW 개요.PDF

No Slide Title

학습영역의 Taxonomy에 기초한 CD-ROM Title의 효과분석

NATE CP 컨텐츠 개발규격서_V4.4_1.doc

웹 개발자를 위한 서블릿/JSP

쉽게 풀어쓴 C 프로그래밍

JMF3_심빈구.PDF

nTOP CP 컨텐츠 개발규격서_V4.1_.doc

Spring

Voice Portal using Oracle 9i AS Wireless

CMS-내지(서진이)

FileMaker 15 ODBC 및 JDBC 설명서

Transcription:

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

Jakarta is a Project of the Apache Software Foundation, charged with the creation and maintenance of commercial-quality, open-source, server-side solutions for the Java Platform, based on software licensed to the Foundation, for distribution at no charge to the public. from Jakarta.apache.org

Struts encourages application architectures based on the Model 2 approach, a variation of the classic Model-View-Controller(MVC) design paradigm. Struts provides its own Controller component and integrates with other technologies to provide the Model and the View. For the Model, Struts can interact with any standard data access technology, including Enterprise Java Beans, JDBC, and Object Relational Bridge. For the View, Struts works well with JavaServer Pages, Velocity Templates, XSLT, and other presentation Systems. from Struts Home

<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <!-- Action Servlet Configuration --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.actionservlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/web-inf/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet>

<!-- Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!-- Application Tag Library Descriptor --> <taglib> <taglib-uri>/web-inf/app.tld</taglib-uri> <taglib-location>/web-inf/app.tld</taglib-location> </taglib> <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/web-inf/struts-bean.tld</taglib-uri> <taglib-location>/web-inf/struts-bean.tld</tagliblocation> </taglib> <taglib> <taglib-uri>/web-inf/struts-html.tld</taglib-uri> <taglib-location>/web-inf/struts-html.tld</tagliblocation> </taglib> <taglib> <taglib-uri>/web-inf/struts-logic.tld</taglib-uri> <taglib-location>/web-inf/struts-logic.tld</tagliblocation> </taglib> </web-app>

<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> <struts-config> <form-beans> <form-bean name="inputform" type="com.hanbit.struts.inputform"/> </form-beans> <action-mappings> <action path="/input" type="com.hanbit.struts.inputaction" name="inputform" scope="request" input="/input.jsp"> <forward name="output" path="/output.jsp" /> </action> </action-mappings> </struts-config>

<%@ page contenttype="text/html; charset=euc-kr" %> <html> <body> <form method="post" action="input.do"> : <input type="text" name="name"> <br><br> : <select name="address"> <option value=" "> </option> <option value=" "> </option> <option value=" "> </option> <option value=" "> </option> </select> <br><br> [ web.xml ] <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action. ActionServlet</servlet-class> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> [ struts-config.xml ] <action path="/input" type="com.hanbit.struts.inputaction" name="inputform" scope="request" input="/input.jsp"> <forward name="output" path="/output.jsp" /> </action>

: <input type="checkbox" name="hobby" value=" "> <input type="checkbox" name="hobby" value=" "> <input type="checkbox" name="hobby" value=" "> <input type="checkbox" name="hobby" value=" "> <br><br> : <input type="radio" name="gender" value=" "> <input type="radio" name="gender" value=" "> <br><br> <input type=submit value=" "> </form> </body> </html>

package com.hanbit.struts; import org.apache.struts.action.actionform; public class InputForm extends ActionForm { private String name ; private String address ; private String[] hobby ; private String gender ; //name public void setname(string name) {this.name = engtokor(name);} public String getname() {return name;} //address public void setaddress(string address) {this.address = engtokor(address);} public String getaddress() {return address;} //hobby public void sethobby(string[] hobby) {this.hobby = engtokor(hobby);} public String[] gethobby() {return hobby;} //gender public void setgender(string gender) {this.gender = engtokor(gender);} public String getgender() {return gender;}

//Encoding String Type English To Korean public String engtokor(string str) { if(str == null str.trim().equals("")) return str; try { return new String(str.getBytes("ISO-8859-1"), "EUC-KR"); }catch(java.io.unsupportedencodingexception uee) { return null; } } } //Encoding Array Type English To Korean public String[] engtokor(string[] str) { if(str.length == 0) return str; for(int i=0; i<str.length; i++) { try{ str[i] = new String(str[i].getBytes("ISO-8859-1"), "EUC-KR"); }catch(java.io.unsupportedencodingexception uee) { return null; } } return str; }

package com.hanbit.struts; import org.apache.struts.action.*; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; import javax.servlet.servletexception; import java.io.ioexception; public class InputAction extends Action { } public ActionForward perform(actionmapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException,ServletException { } return mapping.findforward("output"); <action path="/input" type="com.hanbit.struts.inputaction" name="inputform" scope="request" input="/input.jsp"> <forward name="output" path="/output.jsp" /> </action>