반응형

IT 571

이클립스 war 배포 톰캣 war 자동인식

자바 스프링을 이용하여 웹개발을 작업을 한 후 웹서버에 작업물을 업로드 할 때는 작업된 소스를 war 파일로 만들어서 올려야 합니다. war파일은 이클립스에서 프로젝트 우클릭 -> Export -> WAR file 을 클릭하면 만들 수 있습니다. 아래와 같은 화면에서Destination에서 war 파일이 만들어질 위치를 선택합니다.옵션에 보면Export source files : 개발 소스 배포( .java )Overwrite existing file : 기존 파일에 덮기 웹서버에 배포할 때는 개발 소스는 필요 없으니 체크를 안해도 됩니다. 만들어진 war 파일을 웹서버 업로드를 합니다. 톰캣에서 war를 자동으로 인식하여 압축을 풀게 하려면server.xml 파일에서 unpackWars="true"가 ..

IT 2020.08.20

ajax header 전송 php에서 받기

function test() { $.ajax({ url: "/test_goora.php", type: "post", data: JSON.stringify(obj), dataType: "json", headers:{ "Content-type":"application/json", "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbzI1NiJ9.eyJpc3M" }, success: function(data) { console.log( data ); }, error: function(errorThrown) { console.log(errorThrown); } }); 위와 같이 ajax를 이용하여 header로 데이터를 전송 시 php에서 Authorization에 값을 받으려면 ..

IT/php 2020.08.14

ajax post json 을 jsp request 로 받기

클라이언트측에서 ajax를 이용하여 post 방식으로 json 데이터를 서버로 전송을 할경우 jsp에서 request.getParameter()로 받으려고 할 경우 받을 수 없는 경우가 있습니다. 이럴경우는 request.getInputStream()을 이용해야 하는데요. 아래 소스를 사용하시면 post에 있는 내용을 String으로 반환하게 됩니다. 클라이언트측에서 ajax를 이용하여 post 방식으로 json 데이터를 서버로 전송을 할경우 import java.io.InputStream; import java.io.InputStreamReader; import javax.servlet.http.HttpServletRequest; public static String getrequestBody(Http..

IT/java 2020.08.11

java.lang.ClassNotFoundException: io.jsonwebtoken.Jwts

JWT 연동 작업을 하고 있는데 아래와 같은 오류가 발생했을 경우[Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts]을(를) 발생시켰습니다.java.lang.ClassNotFoundException: io.jsonwebtoken.Jwts 작업하다보면 당최 왜 이리 오류가 많이 발생하는지 모르겠네요. ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating ..

IT/java 2020.08.05

java xml 파일 읽기

아래와 같은 xml 파일을 자바에서 읽기 환경에 관련된 파일은 소스 안에 넣는 것보다 외부파일로 만들어서 관리를 하게 되면 소스 파일 수정없이 프로그램에 영향을 줄 수 있습니다. 파일명 : sample.xml 127.0.0.1 1521 oracle dbID dbPassword 파일명 MyClassName.java public void MyClassName(){ String address = ""; String port = ""; String serviceid = ""; String userid = ""; String password = ""; try{ String currDir = MyClassName.class.getResource(".").getPath(); File file = new File(cu..

IT/java 2020.06.24

! [rejected] master -> master (non-fast-forward)

! [rejected] master -> master (non-fast-forward)error: failed to push some refs to '~~~~~~~~~~~~~~~~~project.git'hint: Updates were rejected because the tip of your current branch is behindhint: its remote counterpart. Integrate the remote changes (e.g.hint: 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details. 자! 깃을 사용하다가 위와 같은 에러가 발생한다...

IT/GIT 2017.11.22

팀뷰어 다운로드 팀뷰어 사용법

원격지원 프로그램으로 팀뷰어를 많이들 사용할 것입니다. 팀뷰어는 유료, 무료 버전으로 서비스를 하다보니 팀뷰어는 컴퓨터에 설치 후 사용하는 방법과 설치하지 않은 상태에서 사용하는 방법이 있습니다. 설치를 하지 않으니 빠르게 원격서비스를 할 수 있습니다. 1. https://www.teamviewer.com/ko/위 사이트에 접속하여 팀뷰어를 설치합니다. 메인에 접속하면 TeamViewer 다운로드가 있습니다.팀뷰어는 설치하지 않고 원격을 할 수 있습니다. 꼭 기억하세요 다운로드를 받습니다.2. 탐색기에서 TeamViewer_Setup.exe 클릭 3. [실행만]에 체크를 하고 [개인용/비상업용]에 체크를 한 후 [동의-실행] 버튼을 클릭하면 팀뷰어 프로그램이 실행 됩니다. 4. 원격 접속 프로그램이니 접..

IT 2017.09.29

맥에서 id_rsa를 이용하여 서버에 접근

맥에서 id_rsa를 이용하여 서버에 접근 1. cd ~/.ssh 엔터2. cat id_rsa >> authorized_keys 엔터3. chmod 600 id_rsa4. 위 와 같이 했다면 이제 서버에 접근을 시도 합니다. ssh id@아이피주소 엔터 그럼 패스워드 입력 없이 서버에 접근이 가능합니다. 이런것이 있는지 모르고 살다가 어떤 작업을 하면서 필요 하게 되어 열심히 찾았는데 원하는 결과값이 있는 블로그를 찾기 힘들더라고요. 윈도우에서는 putty를 많이 사용하니 putty를 실행하면 하단 puttygen 이라고 있는데 지금 맥이여서 길게 설명 못하는데요. putty로 하는 것이 자료 많아요

IT 2017.09.19

Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding..

Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory. 위와 같은 에러가 발생했습니다. 이것이 무엇이냐면 앱폴더가 있는 경로 중 영문이 아닌 값이..

IT/안드로이드 2017.08.24

Gradle 'talkkormoney' project refresh failed. Unable to start the daemon process.

Gradle 'talkkormoney' project refresh failed. Unable to start the daemon process. Error:Unable to start the daemon process.This problem might be caused by incorrect configuration of the daemon.For example, an unrecognized jvm option is used.Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.3/userguide/gradle_daemon.htmlPlease read the following process output to f..

IT/안드로이드 2017.08.24
반응형