전체 글 (165) 썸네일형 리스트형 공부기록, 2021-07-26(react) react - 구조 - index.js - src 폴더에 포함되어 있다. 메인 프로그램이라고 할 수 있다. 여기에서 HTML 템플릿 및 JavaScript의 컴포넌트를 조합하여 렌더링하고 실제 표시한다. - App.js - src 폴더에 있다. 이것은 컴포넌트를 정의하는 프로그램이다. 실제로 화면에 표시되는 내용 등은 여기에서 정의된다. - index.html - public 폴더에 있다. 메인 프로그램인 index.js에 대응되는 것으로, HTML 템플릿 파일이다. 이 파일이 직접 표시되는 것은 아니고, index.js에 의해 일어 와서 렌더링된 결과가 표시된다. 공부기록, 2021-07-23(react) StyleSheet 사용 import React from "react"; import { ActivityIndicator, View, StyleSheet } from "react-native"; import { TINT_COLOR, BG_COLOR } from "../constants/Colors"; const styled = StyleSheet.create.create({ container: { backgroundColor: "black", flex: 1, justifyContent:"space-around" } }); export default () => ( ); styled-components 사용 import React from "react"; import { ActivityIndica.. 공부기록, 2021-07-22(expo) - expo - 설치 순서 - nvm install 16.5.0 - npm install -g npm - npm install --global yarn - https://github.com/coreybutler/nvm-windows/releases/tag/1.1.7 setup설치 - npm install --global expo-cli - expo init my-app - cd my-app - expo start - 테일 윈드 적용 - npx create-react-app react- tailwindcss && cd react-tailwindcss - npm install tailwindcss postcss-cli autoprefixer -D - npx tailwind init tailwind.js --.. 공부기록, 2021-07-21(jsp) - jsp api파싱 ``` 공부기록, 2021-07-14(jsp) jsp인터셉터 - 1. public boolean preHandle(HttpServletRequest, HttpServletResponse response, Object handler) - Controller로 요청이 들어가기 전에 수행됩니다. - request, response, handler 등의 매개변수를 이용가능한데 우리가 아는 HttpServletRequest, HttpServletResponse와 나머지 하나는 preHandle() 메서드를 수행하게 될 컨트롤러 메서드에 대한 정보를 담고있는 handle 입니다. - 2. postHandle(HttpServletRequest request, HttpServletResponse, Object handler, ModelAndView modelAnd.. 공부기록, 2021-07-19(jsp) jsp페이지 이동 - 1. response 객체 - response.sendRedirect("이동할_페이지명"); - ex) response.sendRedirect("http://www.daum.net"); //외부 사이트로 이동 - ex) response.sendRedirect("./req.jsp"); //내부 파일의 상대경로를 지정하여 이동 - URL창이 이동할 페이지로 전환되면서 이동 데이터를 서로 공유할 수 없음 - 2. forward 액션태그 - 외부 사이트로 이동 안됨 - 자기 프로젝트의 다른 페이지로만 이동 가능 - URL창이 이동할 페이지로 전환되지 않음 - 데이터를 공유하면서 페이지 이동 가능 - 3. 자바스크립트 - location.href="이동할_페이지명" - location.rep.. 공부기록, 2021-07-14(jsp 쿠키) jsp 쿠키설정 - 쿠키에 값 저장시(로그인 처리) - 1)쿠키 객체 생성 javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(String name, String value) - 2)생성한 쿠키를 response객체를 통해 응답헤더에 추가 response.addCookie(쿠키객체) 예] Cookie cookie = new Cookie("memID","choi"); response.addCookie(cookie); 기존에 동일한 이름이 있다면 대체가 된다. - 쿠키에 저장된 값 읽어 오기(로그인 여부 판단) - 1)request객체의 getCookies()메서드를 이용해서 읽어온다. Cookie[] cookies = request.getCo.. 공부기록, 2021-07-15(jsp) jsp - 1. URL 유효성 검사 ``` function goEventPage(url){ //url 유효성 검사 let regex = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/; //올바른 url이 맞다면 해당 url로 이동 if(regex.test(url)){ location.href = url; } } ``` - 2. Image 유효성 검사 // 태그에서 data-width / data-height의 value 가져오기 tempMaxWidth = parseInt($(this).next().attr('data-width')); tempMaxHeight = parseInt($(this).next().at.. 이전 1 ··· 5 6 7 8 9 10 11 ··· 21 다음