블로그 이미지

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday
2022. 8. 23. 14:18 JAVA언어

Pattern p = Pattern.compile("^(https?):\\/\\/([^:\\/\\s]+)(:([^\\/]*))?((\\/[^\\s/\\/]+)*)?\\/([^#\\s\\?]*)(\\?([^#\\s]*))?(#(\\w*))?$"); 
Matcher m =p.matcher(url);
if(m.find()) {
    m.group(1);
    m.group(2);
}

 

참조 : https://goodidea.tistory.com/86

posted by 천상의날개
2022. 8. 5. 09:33 JAVA언어

아래처럼 import문에 import static으로 import 한다

import static test.aaa.Constant.*

 

자세한 설명 참고

https://offbyone.tistory.com/283

posted by 천상의날개
2017. 6. 29. 11:12 JAVA언어
java mail 전송 (javamail.jar ver 1.5.6)
javax.mail.jar
posted by 천상의날개
2016. 10. 10. 17:32 JAVA언어
Scanner 와 StringTokenizer 의 차이 (공백포함, 공백 비포함)code

결과
posted by 천상의날개
2016. 2. 3. 09:26 JAVA언어
예외 String 객체로 변환
posted by 천상의날개
2015. 2. 9. 10:27 JAVA언어

----- web.xml -----

<context-param>

<param-name>upload.dir</param-name>

<param-value>c:/aa/</param-value>

</context-param>

 

----- java source -----

HashMap contextMap = new HashMap();

getServletContext().getInitParameter("upload.dir"));

Enumeration contextParams = getServletContext().getInitParameterNames();
     while (contextParams.hasMoreElements()) {
         String paramName = "" + contextParams.nextElement();
         contextMap.put(paramName, getServletContext().getInitParameter(paramName));
     }
 config.setContextParam(contextMap);

 

posted by 천상의날개
2014. 1. 18. 17:20 JAVA언어/applet
자바스크립트에서 자바 메소드 콜
posted by 천상의날개
2014. 1. 18. 17:17 JAVA언어/applet
Code
posted by 천상의날개
2014. 1. 18. 17:15 JAVA언어/applet
java Code[testValue 변수는 맴버 변수로 선언해야함.]
posted by 천상의날개