노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


Maven Project  Add Dependency

( maven-archetype-webapp )



1)  Search : 일부 결과를 찾지 못할때, not found

증상 :  (!) Index downloads are disabled, search result may be incomplete



해결책 :

Windows->Preferences->Maven

[v] Download repository index updates on startup


참고 정보 :

http://stackoverflow.com/questions/14059685/eclipse-maven-search-dependencies-doesnt-work



2) Search : 결과가 없을때, no result

증상 :  검색 결과가 나오지 않는 경우에는 리셋이 필요 ( 이클립스 종료후에 )


해결책 :

프로젝트 폴더의 아래 폴더 하위 디렉토리를 삭제

( .metadata\.plugins\org.eclipse.m2e.core\nexus )





* Browsing and Manipulating Maven Repositories...

https://books.sonatype.com/m2eclipse-book/reference/repository-sect-repo-view.html



3) 'Full Index Enabled' , 'Rebuild Index' -> 'Global Repositories'

- Window->Show View->Other->Maven->Maven Respositories





블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


Admin LTE


https://almsaeedstudio.com/


- 오픈 소스

- 관리자 대시보드, 제어판 테마 ( 반응형, 재사용, 공통 컴포넌트 )

- Bootstrap 3 , jQuey 1.11 +,  Plugins

- Browser Support : IE9+, Firefox/Safari/Chrome/Opera(Latest)


- 미리보기 , https://almsaeedstudio.com/preview


- 디렉토리 구조


- Plugins


- 기본 구성 샘플 : index.html



index.html


블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


이클립스(Eclipse)에 Gradle 프로젝트 생성


- Eclipse Version : Neon


1. Gradle Plugin 설치(Install) 하기


- Buildship Gradle Integration 1.0 , by the Eclipse Foundation



직접 다운로드 Gradle (for local installation) 

: https://gradle.org/gradle-download/ --> 인터넷 환경이 열악한 경우에..



2. Gradle 프로젝트 생성하기


http://qiita.com/grachro/items/d1ebad3857a794895426방법4


Eclipse 프로젝트가 배포하고있는 플러그인 때문에 Eclipse에서 사용하려면 가장 편리합니다.  생성 된 프로젝트의 구성은 gradle 명령으로 생성 한 경우와 거의 동일합니다





블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


Java Spring (MVC) 프로젝트 만들기


기본 준비

- Eclipse (이클립스) Neon ( or Mars, Luna )

- STS(Spring Tool Suite) IDE 3.8  ( from  Eclipse Market )

- Maven Integration for Eclipse

- JDK 1.8 ( or 1.7 ) , Apache Tomcat 8.0 ( or 7.0 )




[2016] Spring MVC Project

예제1) http://learnfromexamples.com/how-to-create-spring-mvc-application-using-spring-tool-suite-within-a-minute/


프로젝트 생성을 위한 메뉴 선택 경로

: New -> Other -> Spring ->

Spring (Legacy) Project ->Spring MVC Project

: 생성후에 Maven -> Update Project 실행 ( 프로젝트 우측 메뉴.. )


결과물 특징

:기본 설정이 MVC를 위한 Controller와 View(jsp)가 생성이 되며, 참고해서 변경을 하면 된다. ( Maven은 기본으로 설정되어 있다. )


pom.xml설정 변경 관련 참고 :http://o7planning.org/en/10129/spring-mvc-tutorial-for-beginners


[2014] Simple Spring Web Maven

예제2)  http://iclass.tistory.com/entry/Simple-Spring-Web-Maven-Example


프로젝트 생성을 위한 메뉴 선택 경로

: New -> Other -> Spring ->

Spring (Legacy) Project ->Simple Projects ( Simple Spring Web Maven )

: 생성후에 Maven -> Update Project 실행 ( 프로젝트 우측 메뉴.. )


결과물 특징

:기본 설정이 MVC를 위한 Controller는 없고 View(jsp)가 생성이 되며, 추가하는 부분이 위의 선택보다 많아서 번거로울수 있다.


[2006] Maven Project , maven-archetype-webapp

예제3) http://websystique.com/springmvc/spring-4-mvc-helloworld-tutorial-full-example/ 

http://diaryofgreen.tistory.com/21

http://jaesu.tistory.com/entry/Maven-web-project-%EB%A7%8C%EB%93%A4%EA%B8%B0


- Maven Integration for Eclipse 플러그인을 미리 설치


프로젝트 생성을 위한 메뉴 선택 경로

: New -> Maven Project -> New Maven Project(Next)

Select an Archetype(원형) : maven-archetype-webapp / 1.0 



Add  Group Id (like a Package name) , Artifact Id (like a Class name )


[https://maven.apache.org/archetypes/maven-archetype-webapp/]


결과물 특징

:기본 생성된 파일에서 제일 먼저 pom.xml를 수정한다. springframework-version, servlet-version, jsp-version등을 수정한다.


복합 예제 , Spring 4 MVC + AngularJS CRUD Example using $http service
http://websystique.com/springmvc/spring-mvc-4-angularjs-example/



* Dependency  : pom.xml



* Spring 4 MVC HelloWorld Tutorial – Annotation/JavaConfig Example

http://websystique.com/springmvc/spring-4-mvc-helloworld-tutorial-annotation-javaconfig-full-example/



[2006] Spring Web MVC Project , XML Free

예제4) http://www.codejava.net/frameworks/spring/bootstrapping-a-spring-web-mvc-application-programmatically

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.



Java 웹크롤링(Web Crawling) 자료 소스 예제



자바를 이용한 웹 크롤러 만들기

해당 예제는 프로젝트 생성에 관한 부분의 내용을 참고하기 좋음


사용하는 라이브러리는

 - commons-logging-1.2.jar

 - httpclient-4.5.2.jar

 - httpcore-4.4.4.jar


http://derveljunit.tistory.com/253



jsoup - 자바를 위한 Beautiful Soup (HTML parser)

해당 예제는 원하는 Element를 추출하는데 참고하기 좋음


자바의 jsoup HTML 파서를 사용


HTML문서를 읽고, DOM객체로 변환후에

selector api를 이용해서 특정 Element에 접근


http://edoli.tistory.com/95



jsoup : Parse a document from a String




HTML 문서을 String으로 읽고, Tag를 select하여 text를 얻어내는 예제


https://jsoup.org/cookbook/input/parse-document-from-string



: jsoup 다운로드



웹 크롤링 적용 사례


 [NDC2014]쉽게 따라 할 수있는 "꽤" 훌륭한 유저 동향 분석 시스템

http://www.slideshare.net/mrfoundation21/ss-35511996

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


마젠토 설치 순서 요약 


1. 서버 구성 환경 설정

2. 마젠토 소프트웨어 다운로드

3. 웹 설정 마법사를 통해서 마젠토 소프트웨어 인스톨

4. 상점 웹화면의 정상 노출과 관리자 접속을 통해서 설치 검증하기



원문 사이트 

'Web Tech. > Magento' 카테고리의 다른 글

Magento란?  (0) 2016.09.06
블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,

Magento란?

Web Tech./Magento 2016. 9. 6. 13:58
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


Magento란?



Magento is the eCommerce software and platform trusted by the world's leading brands.

마젠토는 전자상거래 소프트웨어이며 세계에서 앞서가는 업체들이 신뢰하는 플랫폼(보통 기반 시스템을 제공하는 소프트웨어 집합체, Framework과도 유사한 표현)이다.


제품 구성

1. Enterprise Cloud Edition

   PaaS(platform-as-a-service)형태이며, 완벽하게 맞춤형 제작이 되면서 빠른 배포가 가능하고, 보안을 갖추었으며, (사용자 증가에 따라 처리용량을 늘릴수 있는 ) 확장형 웹 상점 페이지들, 진보적인 호스팅과 결합되며, 관리형 서비스 인프라다. 


2. Enterprise Edition

서비스 Tier별로 분산 구성이 가능하며, 년간 ?만불정도의 유료 지원 체계 


3. Commerce Order Management Suite

주문의 옴니채널(온라인,무선, 오프라인)을 충분히 만족시키는 핵심 시스템


4. Community Edition

만약 개발자 이거나 최신 기술에 능통한 경우라면 마젠토 전자상거래 플랫폼의 유연성을 경험하기에는 최적의 솔루션이다.  

오픈소스이며, 수정이 가능하며  핵심 소스들에 기여 할 수 있다.  가능한 다운로드들 


1) ALL-IN-ONE COMMERCE

2) EASY-TO-EXTEND PLATFORM

3) VIBRANT COMMUNITY

4) EXTENSIVE TRAINING AND RESOURCES


설치 환경 


OS(Linux), Memory, Web Server(Apache, nginx ) , Database (MySQL 5.6),

PHP extensions, SSL, Mail Server 


* 참조 

1. 마젠토사이트 구축 - Magento 란?

2. magento.com


* 스크린샷 - v2.1.0



'Web Tech. > Magento' 카테고리의 다른 글

마젠토 설치 순서  (0) 2016.09.06
블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.



Java 위치 확인 ( CentOS )



> which java

> readlink -f /usr/bin/java







참조 : 리눅스 $JAVA HOME 환경변수 설정


http://zetawiki.com/wiki/리눅스 $JAVA HOME 환경변수 설정


블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.



Web Service Client 만들기 ( 이클립스 )

부제 : SOAP Client over HTTPS




SOAP : Simple Object Access Protocol
HTTPS : secure Hyper Text Transport Protocol 

WSDL : Web Service Definition Language

 


 

임으로 Dynamic Web Project ( 또는 Java Project )프로젝트를 생성 후에 추가하는 방법

 

 


방법 1. 프로젝트에 Web Service Client를 WSDL URL을 통해서 추가


 :  New -> Web Service Client -> Service definition


 

 

위와 같은 방식은 https://blog.outsider.ne.kr/187 에서도 살펴 볼 수 있지만,

WSDL을 URL 형태로 접근해서 받아 오는 경우지만, 에러가 발생하는 경우가 있다. 

이때 발생하는 에러메시지:  (X) The service definition selected is invalid.



에러가 해결 되지를 않을때는 아래 2번 방법을 시도

 


 

방법 2. 프로젝트에 WSDL File 생성하고 내용을 추가


일단 WSDL파일과 필요한 XSD파일도 같이 생성하고 수정한다. 

 


WSDL 파일을 생성후에 브라우저(해당URL)에서 보이는 내용을 복사해서 해당 파일의 내용을 교체 한다.

  

그 다음으로는 WSDL파일을 통해서, Web Services -> Generate Client를 수행한다.

 

 

 

URL 주소 형식 예제 : 

https://api.google.com/GoogleSearch.wsdl ,

http://www.webservicex.com/globalweather.asmx?WSDL

 

 


방법 3. wsimport를 사용해서 wsdl url을 호출하여 생성하는 방법 (아래쪽 참조)






Web Service Client 실행 하기

 

 

1. 테스트 실행


생성시에 테스트단계까지 선택을 하면  TestClient.jsp가 생성이 된다.

아래와 같은 테스트 화면을 볼 수 있다.

 

 

 

Configure the SSLContext with a TrustManager that accepts any cert (see below)
Configure the SSLContext with an appropriate trust store that includes your cert
Add the cert for that site to the default java trust store.



2. 아래와 같은 에러 발생시

 

이때도 HTTPS 연결시에 아래와 같은 에러가 발생하는 경우가 있다.


- javax.net.ssl.SSLHandshakeException

- sun.security.validator.ValidatorException

- PKIX path building failed

-sun.security.provider.certpath.SunCertPathBuilderException

- unable to find valid certification path to requested target Message



원인.  Java client trying to access a server with a self-signed certificate.


http://stackoverflow.com/questions/9210514/unable-to-find-valid-certification-path-to-requested-target-error-even-after-c




해결.


1) Configure the SSLContext with a TrustManager that accepts any cert (see below)


 해당 답변내의 예제 처럼 접근을 모두 허용하는 방법



2) Configure the SSLContext with an appropriate trust store that includes your cert


실행시에 적절한 trust store를 포함하는 방법이 있고,



3) Add the cert for that site to the default java trust store.


keytool을 통해서 자바의 기본 truststore에 추가 하는 방법 (아래쪽에 참조글)


(윈도우 위치 : C:\Program Files\Java\jre1.8.0_73\lib\security\cacerts)

(윈도우는 수정시에 관리자 권한으로 )



http://stackoverflow.com/questions/1828775/how-to-handle-invalid-ssl-certificates-with-apache-httpclient


 


참조 할만한 내용의 사이트들

 


웹서비스 클라이언트 만들기


 

웹서비스란게 있다. 쉽게 말하면 이기종간의 통신을 위한 것이다. SOAP, WSDL, UDDI등을 이용해서 자바사에서 C#으로 만들어진 서비스에 요청을 보내도 응답을 받을 수 있다. 그 이념과 목표는 대단했지만 너무 복잡한 스펙덕분에 빛을 발휘 못하고 요즘은 그나마 지원하는 툴들이 많아져서 괜찮아진것 같지만 REST의 등장으로 인하여 아주 큰 주목을 받지 못하고 있는 듯 하다. 검색해 보면 웹서비스에 대한 많은 글들을 볼수가 있고 크게 뜨진 못했지만 웹서비스는 끝났다라고 말할수는 없는듯 하다. REST가 뜨면서 같이 다시 주목받고 있는 듯한 느낌도....

 

 https://blog.outsider.ne.kr/187


 

How to Create Sample WSDL in Eclipse and Generate Client ( 그림 설명 )

 

 

Have you ever tried creating Simple Java Web Service Definition Language in Eclipse? Well, here are few simple steps to create WSDL in Eclipse environment and Generate/Test Client.

http://crunchify.com/create-sample-wsdl-in-eclipse-and-generate-client/



Create a Java web service client via wsimport tool.


Alternative, you can use “wsimport” tool to parse the published wsdl file,
and generate necessary client files (stub) to access the published web service.

Where is wsimport?
This wsimport tool is bundle with the JDK, you can find it at “JDK_PATH/bin” folder.

Issue “wsimport” command.
> wsimport -keep http://localhost:9999/ws/hello?wsdl





WSImport over SSL with take (dev) certificate



Finally I got a solution, using wrapper class.

I think it makes sense to share the solution. Hope it will save some someone's time for better purposes.


http://stackoverflow.com/questions/29922479/wsimport-over-ssl-with-fake-dev-certificate



자바 기본 trust store에 서버 사설 인증서(공인 CA로부터 발급받지 않은)를 등록


javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target


Are you getting this error? This simply means that the web server or the URL you are
connecting to does not have a valid certificate from an authorized CA. But however,
being a programmer you would want to find out the alternative
way to solve this issue.


Default trusts의 암호는 "changeit"


> 보기(등록된 리스트)


c:\...\jre1.8.0_73>keytool -list -keystore .\lib\security\cacerts



> 등록


c:\...\jre1.8.0_73>keytool -keystore .\lib\security\cacerts -import -alias [등록을 원하는 이름, 주로 서비스 도메인] -file d:\server.cer


* server.cer은 브라우저를 통해서 접속후에  다운로드 가능


http://www.java-samples.com/showtutorial.php?tutorialid=210





블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

 

AndroidStudio에서 Smack4.1 사용하기 ( for OpenFire )

 

 

해당 주제를 다루는 참고 사이트는 2개로 나누어져 있으며, Eclipse기준으로 되어 있어서,

업그레이드가 필요하다.

 

http://www.tutorialsface.com/2015/08/building-your-own-android-chat-messenger-app-similar-to-whatsapp-using-xmpp-smack-4-1-api-from-scratch-part-1/

 

http://www.tutorialsface.com/2015/08/building-your-own-android-chat-messenger-app-similar-to-whatsapp-using-xmpp-smack-4-1-api-from-scratch-part-2/

 


 

먼저 Part1에서 AndroidStudio로 해당 프로젝트에 알맞는 설정을 해보자

 



이후 설정은 Part1 의 내용처럼 수정 작업을 진행하면 된다.

 

다만, 댓글에 Fison이라는 아이디의 글 내용을 참조해야 한다.

 

 

for me to run it, i change this:
1) ActionBarActivity is deprecated. 
    So i use AppCompatActivity in Chats.java.
2) public class MainActivity extends AppCompatActivity 
    instead of ActionBarActivity
3) i made a modification in Activity_Main.xml

-----------------------------------------------------


xmlns:android="http://schemas.android.com/apk..." />















i add  ......  and comment some code inside

4) i made a modification in MainActivity
only comment This

/*
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
	@Override
	public void onClick(View view) {
		Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
		.setAction("Action", null).show();
	}
});
*/



Gradle 스크립트에 추가할 부분은 아래 링크를 참조하면 될 것 같다.


https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-Upgrade-Guide


-build.gradle ( Project )

-bulid.gradle ( Module )







StakOverflow.com에 올라온 글도 참조 하면 좋을 것 같다.


http://stackoverflow.com/questions/31274020/integrating-smack-with-android-studio-project-for-chat-application

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


 

XMPP Server용 XMPP Client 만들기


 

Openfire의 하위 프로젝트인 Smack ( Client Library) 를 사용하여, 간단한 프로그램을

빌드 할 수 있다.




 

예를들어 Openfire서버가 설치된 장비의 Stress Test용도의 클라이언트가 필요하다면

이럴때 사용하면 좋을 것도 같다.

 

 

Openfire Projects  ( ignite realtime ) : http://www.igniterealtime.org/projects/index.jsp

 

 

Smack 라이브러리를 다운로드 해서 프로젝트에 추가하는 방안도 있지만,

프로젝트 자체를 Maven Project를 생성을 하고 나서, pom.xml에 아래 내용을

채워 주면 자동으로 Library들이 포함되는 방법이 더 좋을 듯 하다.

 

 

	
		
		   org.igniterealtime.smack
		      smack-java7
		      4.1.6
		 
		
		        org.igniterealtime.smack
		        smack-tcp
		        4.1.6
		
		
		        org.igniterealtime.smack
		        smack-im
		        4.1.6
		
		
		        org.igniterealtime.smack
		        smack-extensions
		        4.1.6
		
	  

 

 

package smackMavenClient;

import java.io.IOException;
import java.util.Collection;

import org.jivesoftware.smack.AbstractXMPPConnection;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.chat.Chat;
import org.jivesoftware.smack.chat.ChatManager;
import org.jivesoftware.smack.chat.ChatMessageListener;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.roster.Roster;
import org.jivesoftware.smack.roster.RosterEntry;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;

public class smClient implements ChatMessageListener  {

	private AbstractXMPPConnection conn2 ;
	
	private static smClient c ;
	
	public void login(String userName, String password ) throws SmackException, IOException, XMPPException {
		
		XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
				  .setUsernameAndPassword(userName, password)
				  .setServiceName("localhost")
				  .setHost("localhost")
				  .setPort(5222)
				  .build();
		
		conn2 = new XMPPTCPConnection(config);
		conn2.connect();
	}
	
	public static void main(String[] args) throws SmackException, IOException, XMPPException {

		c = new smClient();

		c.login("아이디", "비번");
		c.sendMessage("보내고 싶은 메시지", "친구아이디");
		c.getFriends();
		
	}
	
	public void sendMessage(String message, String to) throws NotConnectedException {
	
		ChatManager cm = ChatManager.getInstanceFor(conn2);
		
		Chat newChat = cm.createChat(to);
		newChat.addMessageListener( this);
		newChat.sendMessage(message);
		
	}


	public void getFriends() {
		
		Roster r = Roster.getInstanceFor(conn2);
		
		Collection entries = r.getEntries();
		
		for ( RosterEntry entry : entries ) {
			System.out.println( entry.toString() );
		}
		
		c.disconnect();

	}
	
	
	
	public void disconnect()
	{
		conn2.disconnect();
	}
	


	public void processMessage(Chat chat, Message message) {
		
		if ( message.getType().equals("chat")) {
			System.out.println("Received message: " + message.getBody() );
		}

	}


}

 

 

샘플 예제가 있는 웹페이지

 

 

https://namalfernando.wordpress.com/2015/12/18/write-xmpp-client-using-smack-api/ 

 

 

 

* XMPP client로 공개된 소스들에 대한 비교표

 

https://en.wikipedia.org/wiki/Comparison_of_XMPP_clients

 

 

designation Operating system File transfer (XEP-0096) Jingle MUC GPG
ChatSecure Android / Apple iOS Yes per Plugin Yes No
Conversations Android Yes Yes Yes Yes
CoyIM Mac OS X, Linux,Windows
Coccinella Cross-platform Yes Yes Yes No
Gajim BSD/Linux/Windows Yes Yes Yes Yes[Note 1]
Jeti/2 Cross-platform(Java) Yes Voice Beta Yes Yes
Jitsi Cross-platform(Java) Yes Yes Yes No
MCabber Linux, Mac OS X,BSD No No Yes Yes
Pidgin Mac OS X, Linux,Windows Yes Yes Yes per Plugin
Psi eCS/Linux/Mac OS X/Solaris/Windows Yes Yes Yes Yes
Tkabber Cross-platform Yes No Yes Yes

  1. Jump up^ since Version 0.15 on Windows

 

 

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


 (2.2) Openfire, 외부 Database 연동 II

 

 

 

Authentication Integration

 

Openfire는 인증 data를 보유한 외부의 database에서 읽어 올 수 있다.

 

The simplest possible integration with a custom external database is authentication integration. Use the following settings to enable authentication integration.

 

provider.auth.className

-- set the value to org.jivesoftware.openfire.auth.JDBCAuthProvider.

jdbcAuthProvider.passwordSQL

-- the SQL String to select a user's password. The SQL statement should contain a single "?" character, which will be dynamically replaced with a username when being executed.

jdbcAuthProvider.passwordType

-- the type of the password. Valid values are


"plain" (the password is stored as plain text)
"md5" (the password is stored as a hex-encoded MD5 hash)
"sha1" (the password is stored as a hex-encoded SHA-1 hash)
"sha256" (the password is stored as a hex-encoded SHA-256 hash)
"sha512" (the password is stored as a hex-encoded SHA-512 hash)
If this value is not set, the password type is assumed to be plain.

 

 

User Integration

 

Openfire는 사용자 data를 보유한 database에서 읽어 올 수 있다.

 

Optionally, Openfire can load user data from your custom database. If you enable user integration you must also enable authentication integration (see above). Use the following settings to enable user integration.

 

provider.user.className

-- set the value to org.jivesoftware.openfire.user.JDBCUserProvider.

jdbcUserProvider.loadUserSQL

-- the SQL statement to load the name and email address of a user (in that order) given a username. The SQL statement should contain a single "?" character, which will be dynamically replaced with a username when being executed.

jdbcUserProvider.userCountSQL

-- the SQL statement to load the total number of users in the database.

jdbcUserProvider.allUsersSQL

-- the SQL statement to load all usernames in the database.

jdbcUserProvider.searchSQL

-- the SQL statement fragment used to search your database for users. the statement should end with "WHERE" -- the username, name, and email fields will then be dynamically appended to the statement depending on the search. If this value is not set, searching will not be enabled.

 

usernameField

-- the name of the username database field, which will be used for searches.

nameField

-- the name of the name database field, which will be used for searches.

emailField

-- the name of the email database field, which will be used for searches.

 

 

 

Group Integration

 

Openfire는 그룹 데이타를 보유한 database에서 읽어 올 수 있다.

 

Openfire can load group data from your custom database. If you enable group integration you must also enable authentication integration; you'll also likely want to enable user integration (see above). Use the following settings to enable group integration.

 

provider.group.className

-- set the value to org.jivesoftware.openfire.group.JDBCGroupProvider.

jdbcGroupProvider.groupCountSQL

-- the SQL statement to load the total number of groups in the database.

jdbcGroupProvider.allGroupsSQL

-- the SQL statement to load all groups in the database.

jdbcGroupProvider.userGroupsSQL

-- the SQL statement to load all groups for a particular user. The SQL statement should contain a single "?" character, which will be dynamically replaced with a username when being executed.

jdbcGroupProvider.descriptionSQL

-- the SQL statement to load the description of a group. The SQL statement should contain a single "?" character, which will be dynamically replaced with a group name when being executed.

jdbcGroupProvider.loadMembersSQL

-- the SQL statement to load all members in a group. The SQL statement should contain a single "?" character, which will be dynamically replaced with a group name when being executed.

jdbcGroupProvider.loadAdminsSQL

-- the SQL statement to load all administrators in a group. The SQL statement should contain a single "?" character, which will be dynamically replaced with a group name when being executed.

 


실제로 수정된 내용이 Openfire AdminConsole에 반영된 결과




원문 : https://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html


블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


Openfire, 외부 Database연동

 

보유한 회원 정보를 활용하는 방법의 핵심적인 내용을 다룹니다.

 

 

기본 참조 글 : Step4 : Integrating Openfire with MySQL

 

이 예제는 웹사이트는 각 사용자의 저장된 정보를 저장하기위해 MySQL를 사용한다고

생각한다. Openfire는 외부 database와 통합(연동)될 수 있으며, 이 경우는 MySQL이다.

 

http://code.tutsplus.com/articles/create-a-flexible-xmpp-chat-for-a-member-based-website-with-flash-and-php--active-9858

 

1) 수정전의 openfire.xml

 

이 파일은 ${OpenfirHome}/conf/ 에 위치하고, 편집기등으로 수정 할 수 있다.

설치후에 Admin 설정을 통해서 기본 Database등이 생성이 되면, 아래와 같을 것 같다.

<?xml version="1.0" encoding="UTF-8"?>
<jive> 

  <adminConsole> 
    <port>9090</port>  
    <securePort>9091</securePort> 
  </adminConsole>  
  <locale>en</locale>

  <stream> 
    <management> 
      <active>true</active>  
      <requestFrequency>5</requestFrequency> 
    </management> 
  </stream>   
   
    org.jivesoftware.database.DefaultConnectionProvider 
    
  <database> 
  <defaultProvider> 
      <driver>org.postgresql.Driver</driver>  
      <serverURL>jdbc:postgresql://localhost:5432/openfire</serverURL>  
      <username encrypted="true">
dcc8c19832c8f0b244bd961d65b78992d7</username>  
      <password encrypted="true">
196a575f8b562224af43454639fe41e6fff7c2</password>  
      <testSQL>select 1</testSQL>  
      <testBeforeUse>false</testBeforeUse>  
      <testAfterUse>false</testAfterUse>  
      <minConnections>5</minConnections>  
      <maxConnections>25</maxConnections>  
      <connectionTimeout>1.0</connectionTimeout> 
  </defaultProvider>  
  </database> 
</jive>

 

2) ofUser(Table)를 대체할 nuser(Table)을 준비

 

기본 제공되는 사용자 정보 Table(ofUser)를 사용하지 않고, 기존 database를 사용

CREATE TABLE nuser
(
  id character varying(20) NOT NULL,
  company_cd character varying(30),
  division_cd character varying(50),
  pwd character varying(32),
  name character varying(30),
  email character varying(50),
  company_nm character varying(40),
  division_nm character varying(40),
  reg_date timestamp,
  CONSTRAINT nuser_pk PRIMARY KEY (id)
)

 

3) Admin Console

 

관리자 페이지내의  System Properties 링크를 클릭 하면, Property Name / Value가 볼 수 있다.

 

 

Add new property value

 

순서대로 아래 Name과 Value를 등록 한다.

 

 

1) jdbcProvider.driver

 

 

 

2) jdbcProvider.connectionString

 

jdbc:mysql://localhost/mycontentsite?user=root&password=xxxxx

 

3) provider.auth.className

 

org.jivesoftware.openfire.auth.JDBCAuthProvider

 

4) jdbcAuthProvider.passwordSQL

 

SELECT pwd FROM nuser WHERE id=?

 

5) jdbcAuthProvider.passwordType

 

md5

 

* jdbcAuthProvider의 Property Value는 hidden으로 보여준다.

 

 

6) admin.authorizedUsernames

 

janedoe@[the server's XMPP domain] ( ex) janedoe@abc.com )

 

7) provider.user.className

 

org.jivesoftware.openfire.user.JDBCUserProvider

 

8) jdbcUserProvicer.loadUserSQL

 

select name, email from nuser where id=?

 

9) jdbcUserProvider.userCountSQL

 

select count(*) from nuser

 

10) jdbcUserProvider.allUsersSQL

 

select id from nuser

 

11) usernameFiled

 

id

 

12) nameField

 

name

 

13) emailField

 

email

 



Admin Console를 로그아웃하고, Openfire를 재시작한다.

admin.authorizedUsernames에 등록된 사용자로 Admin Console에 접속이 된다면, 정상적으로 등록이 된것이다.

 

( openfire 4.0.2 버젼은 수정된 정보가 openfire.xml에 등록되지 않으며, ofProperty Table내에서 해당 정보들을 확인하고 수정이 가능하다.



 

일반 사용자들은 Spark등을 이용해서 새로운 user database정보로 접속 여부를 체크한다.

 

 

 

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

 


Openfire ( 메신저 서버 ) - eclipse에서 빌드하기

 

 

 


 

 

1. 기존 IDE - eclipse, EGit, JDK , Ant

 

2. 소스 download - https://github.com/igniterealtime/Openfire.git

 

3. build  - build/build.xml

 

 

4. run 

1) Run -> Run Configurations 선택

2) Java Application -> New  선택

(1) Main탭

: Name, Project, Main class를 등록Main class는 ServerStarter를 Search )

(2) Arguments탭

: VM arguments를 등록

 

(3) Calsspath 탭

: src/i18n , src/resource/jar , build/lib/dist를 등록

(4) Common 탭

(5) JRE탭 : 1.8를 선택

 

5. installer - build/installer/openfire.install4j

 


원문 : https://community.igniterealtime.org/docs/DOC-1020 

 

 

 


* Spark ( 메신저 클라이언트) - eclipse에서 빌드하기

 

 

 

 

 

1. 기존 IDE - eclipse , EGit, JDK, Ant

 

2. 소스 download - https://github.com/igniterealtime/Spark.git

 

3. build  - build/build.xml

 

4. run 

1) Run -> Run Configurations 선택

 

2) Java Application -> New  선택

 

(1) Main탭

: Name, Project, Main class를 등록Main class는 Startup를 Search )

 

(2) Calsspath 탭

: src/resources를 등록

 

(3) JRE탭 : 1.8를 선택

 

5. installer - build/installer/spark.install4j

 

설치본의 위치를 변경하는 부분

 

원문 : https://community.igniterealtime.org/docs/DOC-5180

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,
노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.


Spark (메신저 클라이언트) - 스킨 변경

 

 

 

1. 이미지

 

 

1) 대상 위치

 

Spark/src/resources/images 또는 target/classes/images

 

2) 변경 대상들

 

새로운 이미지를 아래 대상들과 같이 동일 W*H사이즈, 동일 file포맷으로 작성하여

overwrite(update)를 진행하면 된다.

 

 

2. 문자열

 

1) 대상 위치

 

Spark/src/java밑에 org.jivesoftware.resource

또는 target/classes밑에 org.jivesoftware.resource

 

2) 1차 변경 대상 파일들

 

(1) default.properties

(2) configuration.properties

(3) spark.properties

 

3) 2차 변경 대상 파일들

 

(1) build/build.xml

(2) src/resources/i18n/spark_i18n.properties

(3) src/java/org.jivesoftware.launcer.Installer.java

 

 

 

 

*참조글 : https://community.igniterealtime.org/docs/DOC-1360

 

Apache Ant와 install4j를 설치하여, 기존 이미지와 문자열을 수정하여, Spark를 재빌드하는 과정을 정리 해 놓았다.

 

 

3. 메뉴 hidden 처리

 

일부 메뉴는 hidden처리 하는 것이 좋을 수도 있다.

 

 

 

참고로 아래는 변경을 해 본 이미지 결과물 입니다.

 

 

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,