'ITWeb/개발일반'에 해당되는 글 489건

  1. 2009.03.11 browser cookie restriction
  2. 2009.01.15 [펌]Perl OOP
  3. 2009.01.14 [bookmark] perl function reference...
  4. 2009.01.14 perl multi comment 사용하기.
  5. 2008.12.30 [펌]bash script
  6. 2008.12.24 [펌]JSTL
  7. 2008.12.02 window.open ...
  8. 2008.11.21 IE+Flash+Anchor 사용 시 중복으로 title 에 anchor name 붙는 버그
  9. 2008.07.30 [펌]Color Hex Code List
  10. 2008.07.24 [펌]html meta tags

browser cookie restriction

ITWeb/개발일반 2009. 3. 11. 10:23
ref. http://www.nczonline.net/blog/2008/05/17/browser-cookie-restrictions/
ref. http://blogs.msdn.com/ie/archive/2007/08/29/update-to-internet-explorer-s-cookie-jar.aspx

I’ve been doing some research into cookies for my upcoming book and came across some interesting facts about the way browsers handle cookies. I started out by looking at the number of cookies that browsers allowed per domain. The results were interesting:

  • Microsoft indicated that Internet Explorer 8 increased the cookie limit per domain to 50 cookies but I’ve found that IE7 also allows 50 cookies per domain. Granted, this may have been increased with a system patch rather than having the browser’s first version ship like this, but it’s still more than the 20 that was commonly understood to be the limit.
  • Firefox has a per-domain cookie limit of 50 cookies.
  • Opera has a per-domain cookie limit of 30 cookies.
  • Safari/WebKit is the most interesting of all as it appears to have no perceivable limit through Safari 3.1. I tested setting up to 10,000 cookies and all of them were set and sent along in the Cookie header. The problem is that the header size exceeded the limit that the server could process, so an error occurred.

So the prevailing knowledge that browsers limit per-domain cookies to 20 is no longer valid. Another interesting inconsistency is how browsers react when too many cookies are set. With the exception of Safari, which sets all cookies regardless of the number, there are two approaches:

  1. The least recently used (LRU) approach automatically kicks out the oldest cookie when the cookie limit has been reached in order to allow the newest cookie some space. Internet Explorer and Opera use this approach.
  2. Firefox does something strange: it seems to randomly decide which cookies to keep although the last cookie set is always kept. There doesn’t seem to be any scheme it’s following at all. The takeaway? Don’t go above the cookie limit in Firefox.

The total size of cookies also varies from browser to browser. This is another one that is a little hard to comprehend, but here’s what my tests show:

  • Firefox and Safari allow cookies with up to 4097 characters, that’s 4096 for the name and value and one for the equals sign.
  • Opera allows cookies with up to 4096 characters, which is for the name, value, and equals sign.
  • Internet Explorer allows cookies with up to 4095 characters, which is for the name, value and, equals sign.
:

[펌]Perl OOP

ITWeb/개발일반 2009. 1. 15. 19:27

급해서.. 스크랩 부터.. ^^;

원본문서 : http://www.bjnet.edu.cn/tech/book/perl/ch19.htm

Chapter 19

Object-Oriented Programming in Perl

by Kamran Husain


CONTENTS
Listing 19.1. The initial Cocoa.pm package. package Cocoa;
sub new {

    my $this = {};  # Create an anonymous hash, and #self points to it.

    bless $this;       # Connect the hash to the package Cocoa.

    return $this;     # Return the reference to the hash.

    }



1;
Listing 19.2. Creating the constructor.
1  #!/usr/bin/perl

2  push (@INC,'pwd');

3  use Cocoa;

4  $cup = new Cocoa;
sub new {

        my $class = shift;        # Get the request class name

        my $this = {};

        bless $this, $class        # Use class name to bless() reference

        $this->doInitialization();

        return $this;

    }

 

더 자세한 건 사이트 들어가서 보삼.. ㅎㅎ

perl 로 class 만드는 것 중 기본은.. package 를 만드는 것이고 pacakge 의 끝은 1; 로 끝나야 한다는거.. ㅎㅎ

:

[bookmark] perl function reference...

ITWeb/개발일반 2009. 1. 14. 16:44

http://perldoc.perl.org/index-functions.html
근데 뭐.. 기냥..
http://perldoc.perl.org 들어 가서 찾아 보면.. 다 있으니.. 알아서 하세요.. :)
:

perl multi comment 사용하기.

ITWeb/개발일반 2009. 1. 14. 10:48

참조문서 : http://perldoc.perl.org/perlpod.html

일반적으로 line comment 는 # 으로 사용한다.
그럼 multi-line comment 는 어케 할까?

문서를 찾아 보니.. 이와 같이 하는군요..

=pod
commenting....
commenting....
commenting....
.....
=cut

관련 상세 내용은 위에 문서 링크 보시면 됩니다.. ^^*

:

[펌]bash script

ITWeb/개발일반 2008. 12. 30. 14:45

원본 URL : http://www.linuxconfig.org/Bash_scripting_Tutorial
참고 사이트 : http://www.unix.com/


This bash script tutorial assumes no previous knowledge of bash scripting.As you will soon discover in this quick comprehensive bash scripting guide, learning the bash shell scripting is very easy task. Lets begin this bash scripting tutorial with a simple "Hello World" script.

Recommended Books / Reading on this topic :

Learning the bash Shell: Unix Shell Programming]

Hello World Bash Shell Script

First you need to find out where is your bash interpreter located. Enter the following into your command line:

$ which bash
bash interpreter location: /bin/bash

Open up you favorite text editor ( Here is a tutorial where you can learn how to use vi / vim text editor. ) and a create file called hello_world.sh. Insert the following lines to a file:

<b>NOTE:Every bash shell script in this tutorial starts with shebang:"#!" which is not read as a comment. First line is also a place where you put your interpreter which is in this case: /bin/bash.

Here is our first bash shell script example:

#!/bin/bash
# declare STRING variable
STRING="Hello World"
#print variable on a screen
echo $STRING

Example of simple bash shell script

Navigate to a directory where your hello_world.sh is located and make the file executable:

$ chmod +x hello_world.sh
Make bash shell script executable

Now you are ready to execute your first bash script:

./hello_world.sh
execute bash shell script


Simple Backup bash shell script

#!/bin/bash
tar -czf myhome_directory.tar.gz /home/linuxconfig
Simple Backup bash script

Variables

In this example we declare simple bash variable and print it on the screen ( stdout ) with echo command.

#!/bin/bash
STRING="HELLO WORLD!!!"
echo $STRING
String Variables in bash script

Your backup script and variables:

#!/bin/bash
OF=myhome_directory_$(date +%Y%m%d).tar.gz
tar -czf $OF /home/linuxconfig
Bash backup Script with Variables

Global vs. Local variables

#!/bin/bash
#Define bash global variable
#This variable is global and can be used anywhere in this bash script
VAR="global variable"
function bash {
#Define bash local variable
#This variable is local to bash function only
local VAR="local variable"
echo $VAR
}
echo $VAR
bash
# Note the bash global variable did not change
# "local" is bash reserved word
echo $VAR
Global vs. Local variables in bash script

Passing arguments to the bash script

#!/bin/bash
# use predefined variables to access passed arguments
#echo arguments to the shell
echo $1 $2 $3 ' -> echo $1 $2 $3'

# We can also store arguments from bash command line in special array
args=("$@")
#echo arguments to the shell
echo ${args[0]} ${args[1]} ${args[2]} ' -> args=("$@"); echo ${args[0]} ${args[1]} ${args[2]}'

#use $@ to print out all arguments at once
echo $@ ' -> echo $@'

# use $# variable to print out
# number of arguments passed to the bash script
echo Number of arguments passed: $# ' -> echo Number of arguments passed: $#'
./arguments.sh Bash Scripting Tutorial
Passing arguments to the bash script

Executing shell commands with bash

#!/bin/bash

# use backticks " ` ` " to execute shell command
echo `uname -o`
# executing bash command without backticks
echo uname -o

Executing shell commands with bash

Reading User Input

#!/bin/bash

echo -e "Hi, please type the word: \c "
read  word
echo "The word you entered is: $word"
echo -e "Can you please enter two words? "
read word1 word2
echo "Here is your input: \"$word1\" \"$word2\""
echo -e "How do you feel about bash scripting? "
# read command now stores a reply into the default build-in variable $REPLY
read
echo "You said $REPLY, I'm glad to hear that! "
echo -e "What are your favorite colours ? "
# -a makes read command to read into an array
read -a colours
echo "My favorite colours are also ${colours[0]}, ${colours[1]} and ${colours[2]}:-)"
Reading User Input with bash

Bash Trap Command

#!/bin/bash
# bash trap command
trap bashtrap INT
# bash clear screen command
clear;
# bash trap function is executed when CTRL-C is pressed:
# bash prints message => Executing bash trap subrutine !
bashtrap()
{
    echo "CTRL+C Detected !...executing bash trap !"
}
# for loop from 1/10 to 10/10
for a in `seq 1 10`; do
    echo "$a/10 to Exit." 
    sleep 1;
done
echo "Exit Bash Trap Example!!!"

Arrays

Declare simple bash array

#!/bin/bash
#Declare array with 4 elements
ARRAY=( 'Debian Linux' 'Redhat Linux' Ubuntu Linux )
# get number of elements in the array
ELEMENTS=${#ARRAY[@]}

# echo each element in array 
# for loop
for (( i=0;i<$ELEMENTS;i++)); do
    echo ${ARRAY[${i}]}
done
Declare simple bash array

Read file into bash array

#!/bin/bash
#Declare array 
declare -a ARRAY
#Open file for reading to array
exec 10<bash.txt
let count=0

while read LINE <&10; do

    ARRAY[$count]=$LINE
    ((count++))
done

echo Number of elements: ${#ARRAY[@]}
# echo array's content
echo ${ARRAY[@]}
# close file 
exec 10>&-
Read file into bash array

Bash if/else statements

Simple Bash if/else statement

Please note the spacing inside the [ and ] brackets! Without the spaces, it won't work!

#!/bin/bash
directory="./BashScripting"

# bash check if directory exists
if [ -d $directory ]; then
	echo "Directory exists"
else 
	echo "Directory does not exists"
fi

Bash if else statement

Nested if/else

#!/bin/bash

# Declare variable choice and assign value 4
choice=4
# Print to stdout
 echo "1. Bash"
 echo "2. Scripting"
 echo "3. Tutorial"
 echo -n "Please choose a word [1,2 or 3]? "
# Loop while the variable choice is equal 4
# bash while loop
while [ $choice -eq 4 ]; do

# read user input
read choice
# bash nested if/else
if [ $choice -eq 1 ] ; then

        echo "You have chosen word: Bash"

else                   

        if [ $choice -eq 2 ] ; then
                 echo "You have chosen word: Scripting"
        else
         
                if [ $choice -eq 3 ] ; then
                        echo "You have chosen word: Tutorial"
                else
                        echo "Please make a choice between 1-3 !"
                        echo "1. Bash"
                        echo "2. Scripting"
                        echo "3. Tutorial"
                        echo -n "Please choose a word [1,2 or 3]? "
                        choice=4
                fi   
        fi
fi
done
Nested Bash if else statement

Bash Comparisons

Arithmetic Comparisons

-lt
<
-gt
>
-le
<=
-ge
>=
-eq
==
-ne
!=
#!/bin/bash
# declare integers
NUM1=2
NUM2=2
if [ $NUM1 -eq $NUM2 ]; then
	echo "Both Values are equal"
else 
	echo "Values are NOT equal"
fi
Bash Arithmetic Comparisons - values are equal
#!/bin/bash
# declare integers
NUM1=2
NUM2=1
if [ $NUM1 -eq $NUM2 ]; then
	echo "Both Values are equal"
else 
	echo "Values are NOT equal"
fi
Bash Arithmetic Comparisons - values are NOT equal
#!/bin/bash
# declare integers
NUM1=2
NUM2=1
if   [ $NUM1 -eq $NUM2 ]; then
	echo "Both Values are equal"
elif [ $NUM1 -gt $NUM2 ]; then
	echo "NUM1 is greater then NUM2"
else 
	echo "NUM2 is greater then NUM1"
fi
Bash Arithmetic Comparisons - greater then

String Comparisons

=
equal
 !=
not equal
<
less then
>
greater then
-n s1
string s1 is not empty
-z s1
string s1 is empty
#!/bin/bash
#Declare string S1
S1="Bash"
#Declare string S2
S2="Scripting"
if [ $S1 = $S2 ]; then
	echo "Both Strings are equal"
else 
	echo "Strings are NOT equal"
fi
Bash String Comparisons - values are NOT equal
#!/bin/bash
#Declare string S1
S1="Bash"
#Declare string S2
S2="Bash"
if [ $S1 = $S2 ]; then
	echo "Both Strings are equal"
else 
	echo "Strings are NOT equal"
fi
Bash String Comparisons - values are equal

Bash File Testing

-b filename Block special file
-c filename Special character file
-d directoryname Check for directory existence
-e filename Check for file existence
-f filename Check for regular file existence not a directory
-G filename Check if file exists and is owned by effective group ID.
-g filename true if file exists and is set-group-id.
-k filename Sticky bit
-L filename Symbolic link
-O filename True if file exists and is owned by the effective user id.
-r filename Check if file is a readable
-S filename Check if file is socket
-s filename Check if file is nonzero size
-u filename Check if file set-ser-id bit is set
-w filename Check if file is writable
-x filename Check if file is executable
#!/bin/bash
file="./file"
if [ -e $file ]; then
	echo "File exists"
else 
	echo "File does not exists"
fi
Bash File Testing - File does not exist
Bash File Testing - File exists

Similarly for example we can use while loop to check if file does not exists. This script will sleep until file does exists. Note bash negator "!" which negates the -e option.

#!/bin/bash

while [ ! -e myfile ]; do
# Sleep until file does exists/is created
sleep 1
done

Loops

Bash for loop

#!/bin/bash

# bash for loop
for f in $( ls /var/ ); do
	echo $f
done

Running for loop from bash shell command line:

$ for f in $( ls /var/ ); do echo $f; done
Bash for loop

Bash while loop

#!/bin/bash
COUNT=6
# bash while loop
while [ $COUNT -gt 0 ]; do
	echo Value of count is: $COUNT
	let COUNT=COUNT-1
done
Bash while loop

Bash until loop

#!/bin/bash
COUNT=0
# bash until loop
until [ $COUNT -gt 5 ]; do
        echo Value of count is: $COUNT
        let COUNT=COUNT+1
done
Bash until loop

Control bash loop with <STDIN>

Here is a example of while loop controlled by standard input. Until the redirection chain from STDOUT to STDIN to the read command exists the while loop continues.

#!/bin/bash
# This bash script will locate and replace spaces
# in the filenames
DIR="."
# Controlling a loop with bash read command by redirecting STDOUT as
# a STDIN to while loop
# find will not truncate filenames containing spaces
find $DIR -type f | while read file; do
# using POSIX class [:space:] to find space in the filename
if [[ "$file" = *[[:space:]]* ]]; then
# substitute space with "_" character and consequently rename the file
mv "$file" `echo $file | tr ' ' '_'`
fi;
# end of while loop
done

Bash script to replace spaces in the filenames with _

Bash Functions

!/bin/bash
# BASH FUNCTIONS CAN BE DECLARED IN ANY ORDER
function function_B {
        echo Function B.
}
function function_A {
        echo $1
}
function function_D {
        echo Function D.
}
function function_C {
        echo $1
}
# FUNCTION CALLS
# Pass parameter to function A
function_A "Function A."
function_B
# Pass parameter to function C
function_C "Function C."
function_D
Bash Functions

Bash Select

#!/bin/bash

PS3='Choose one word: ' 

# bash select
select word in "linux" "bash" "scripting" "tutorial" 
do
  echo "The word you have selected is: $word"
# Break, otherwise endless loop
  break  
done

exit 0
Bash Select

Case statement conditional

#!/bin/bash
echo "What is your preferred programming / scripting language"
echo "1) bash"
echo "2) perl"
echo "3) phyton"
echo "4) c++"
echo "5) I do not know !"
read case;
#simple case bash structure
# note in this case $case is variable and does not have to
# be named case this is just an example
case $case in
    1) echo "You selected bash";;
    2) echo "You selected perl";;
    3) echo "You selected phyton";;
    4) echo "You selected c++";;
    5) exit
esac

bash case statement conditional

Bash quotes and quotations

Quotations and quotes are important part of bash and bash scripting. Here are some bash quotes and quotations basics.

Escaping Meta characters

Before we start with quotes and quotations we should know something about escaping meta characters. Escaping will suppress a special meaning of meta characters and therefore meta characters will be read by bash literally. To do this we need to use backslash "\" character. Example:

#!/bin/bash

#Declare bash string variable
BASH_VAR="Bash Script"

# echo variable BASH_VAR
echo $BASH_VAR

#when meta character such us "$" is escaped with "\" it will be read literally
echo \$BASH_VAR 

# backslash has also special meaning and it can be suppressed with yet another "\"
echo "\\"

escaping meta characters in bash

Single quotes

Single quotes in bash will suppress special meaning of every meta characters. Therefore meta characters will be read literally. It is not possible to use another single quote within two single quotes not even if the single quote is escaped by backslash.

#!/bin/bash

#Declare bash string variable
BASH_VAR="Bash Script"

# echo variable BASH_VAR
echo $BASH_VAR

# meta characters special meaning in bash is suppressed when  using single quotes 
echo '$BASH_VAR  "$BASH_VAR"'

Using single quotes in bash

Double Quotes

Double quotes in bash will suppress special meaning of every meta characters except "$", "\" and "`". Any other meta characters will be read literally. It is also possible to use single quote within double quotes. If we need to use double quotes within double quotes bash can read them literally when escaping them with "\". Example:

#!/bin/bash

#Declare bash string variable
BASH_VAR="Bash Script"

# echo variable BASH_VAR
echo $BASH_VAR

# meta characters and its special meaning in bash is 
# suppressed when using double quotes except "$", "\" and "`"

echo "It's $BASH_VAR  and \"$BASH_VAR\" using backticks: `date`"

Using double quotes in bash

Bash quoting with ANSI-C style

There is also another type of quoting and that is ANSI-C. In this type of quoting characters escaped with "\" will gain special meaning according to the ANSI-C standard.

/a
alert (bell)
/b
backspace
/e
an escape character
/f
form feed
/n
newline
/r
carriage return
/t
horizontal tab
/v
vertical tab
\\
backslash
\`
single quote
\nnn
octal value of characters ( see ASCII table )
\xnn
hexadecimal value of characters ( see ASCII table )

The syntax fo ansi-c bash quoting is: $'<your string>' . Here is an example:

#!/bin/bash

# as a example we have used \n as a new line, \x40 is hex value for @
# and \56 is octal value for .
echo $'web: www.linuxconfig.org\nemail: web\x40linuxconfig\56org'

quoting in bash with ansi-c stype

Arithmetic Operations

Simple Bash Addition Calculator Example

#!/bin/bash

let RESULT1=$1+$2
echo $1+$2=$RESULT1 ' -> # let RESULT1=$1+$2'
declare -i RESULT2
RESULT2=$1+$2
echo $1+$2=$RESULT2 ' -> # declare -i RESULT2; RESULT2=$1+$2'
echo $1+$2=$(($1 + $2)) ' -> # $(($1 + $2))'

Bash Addition Calculator

Bash Arithmetics

#!/bin/bash

echo '### let ###'
# bash addition
let ADDITION=3+5
echo "3 + 5 =" $ADDITION

# bash subtraction
let SUBTRACTION=7-8
echo "7 - 8 =" $SUBTRACTION 

# bash multiplication
let MULTIPLICATION=5*8
echo "5 * 8 =" $MULTIPLICATION

# bash division
let DIVISION=4/2
echo "4 / 2 =" $DIVISION

# bash modulus
let MODULUS=9%4
echo "9 % 4 =" $MODULUS

# bash power of two
let POWEROFTWO=2**2
echo "2 ^ 2 =" $POWEROFTWO


echo '### Bash Arithmetic Expansion ###'
# There are two formats for arithmetic expansion: $[ expression ] 
# and $(( expression #)) its your choice which you use

echo 4 + 5 = $((4 + 5))
echo 7 - 7 = $[ 7 - 7 ]
echo 4 x 6 = $((3 * 2))
echo 6 / 3 = $((6 / 3))
echo 8 % 7 = $((8 % 7))
echo 2 ^ 8 = $[ 2 ** 8 ]


echo '### Declare ###'

echo -e "Please enter two numbers \c"
# read user input
read num1 num2
declare -i result
result=$num1+$num2
echo "Result is:$result "

# bash convert binary number 10001
result=2#10001
echo $result

# bash convert octal number 16
result=8#16
echo $result

# bash convert hex number 0xE6A
result=16#E6A
echo $result
Arithmetic Operations


Round floating point number

#!/bin/bash
# get floating point number
floating_point_number=3.3446
echo $floating_point_number
# round floating point number with bash
for bash_rounded_number in $(printf %.0f $floating_point_number); do
echo "Rounded number with bash:" $bash_rounded_number
done

Round floating point number with bash

Bash floating point calculations

#!/bin/bash
# Simple linux bash calculator 
echo "Enter input:" 
read userinput
echo "Result with 2 digits after decimal point:"
echo "scale=2; ${userinput}" | bc 
echo "Result with 10 digits after decimal point:"
echo "scale=10; ${userinput}" | bc 
echo "Result as rounded integer:"
echo $userinput | bc

Bash floating point calculations

Redirections

STDOUT from bash script to STDERR

#!/bin/bash

echo "Redirect this STDOUT to STDERR" 1>&2

To proof that STDOUT is redirected to STDERR we can redirect script's output to file:

STDOUT from bash script to STDERR

STDERR from bash script to STDOUT

#!/bin/bash

cat $1 2>&1

To proof that STDERR is redirected to STDOUT we can redirect script's output to file:

STDERR from bash script to STDOUT

stdout to screen

The simple way to redirect a standard output ( stdout ) is to simply use any command, because by default stdout is automatically redirected to screen.

cat /proc/partitions
bash stdout to screen

stdout to file

Here we use ">" to redirect stdout to a file "partitions.txt".

cat /proc/partitions > partitions.txt
bash stdout to file

stderr to file

In this example you will redirect the standard error ( stderr ) to a file and stdout to a default screen.

grep -r hda6 * . 2> stderr.txt
bash stderr to file

stdout to stderr

In this case the output of a command will be written to the same descriptor as a stderr.

grep -r hda6 * . 1>&2 stderr.txt
bash stdout to stderr

stderr to stdout

In this case the stderr of a command will be written to the same descriptor as a stdout.

grep -r hda6 * . 2>&1 stderr.txt
stderr to stdout

stderr and stdout to file

grep -r hda6 * . &> stderr_and_stdout.txt
stderr and stdout to file
:

[펌]JSTL

ITWeb/개발일반 2008. 12. 24. 15:16
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html

시간이 없다는 핑계로 또 다시 펌질을.. 하고 있다는.. ㅡ.ㅡ;;

[출처 : 자바지기]
jstl - API : http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html
JSTL

소개

  • J2EE 소형 클라이언트 기술인 JSP(JavaServer Pages)가 지난 몇 년 동안 널리 일반화되면서 독립적인 개발자들은 많은 사용자 정
    의 JSP 태그 라이브러리를 만들었습니다. 이러한 태그 라이브러리는 대부분 서로 다른 목표를 달성하도록 작성되었지만 반복, 조건 등의 일
    반적인 작업을 위한 유사한 솔루션을 제공하는 경향이 있습니다.
    유사하고 일반적이 문제점을 해결하는 독립적인 태그 라이브러리에 대한 필요성을 줄이기 위해 Java Community Process(JSR 52)의 지
    원하에 JSTL(JavaServer Pages Standard Tag Library)이 개발되었습니다. JSTL은 이러한 일반 기능을 처리하는 하나의 표준 솔루션
    을 제공합니다. (말그대로 표준태그라이브러리)
  • JSTL의 주요 강점 중 하나는 서블릿 컨텍스트에 저장된 데이타 같은 애플리케이션 데이타를 액세스 및 조작하는 쉬운 방법을 제공하는 간
    단한 EL을 사용할 수 있다는 것입니다.

EL 에 대하여

설치 방법

  • http://cvs.apache.org/builds/jakarta-taglibs/nightly/ 에서 다운
    \jakarta-taglibs-20051024\jakarta-taglibs\standard\lib
    에서 jstl 과 standard 파일 을 이 두개의 jar 파일을 우리의 웹애플리케이션의 /WEB-INF/lib 폴더에 넣습니다
    그 다음 tld 폴더의 tld 파일을 /WEB-INF/lib/tld 폴더 아래 넣습니다.
  • web.xml 에
     
        <!-- jstl 1.2 taglig -->
         <taglib>
           <taglib-uri>jstl-c</taglib-uri>
           <taglib-location>/WEB-INF/tlds/jstl/c.tld</taglib-location>
        </taglib>
        <taglib>
           <taglib-uri>jstl-fmt</taglib-uri>
           <taglib-location>/WEB-INF/tlds/jstl/fmt.tld</taglib-location>
        </taglib>
        <taglib>
          <taglib-uri>jstl-fn</taglib-uri>
          <taglib-location>/WEB-INF/tlds/jstl/fn.tld</taglib-location>
        </taglib>
        

    를 추가한다.

  • jsp 에 추가
     
         <%@ taglib uri="jstl-c" prefix="c" %>
        <%@ taglib uri="jstl-fmt" prefix="fmt" %>
        <%@ taglib uri="jstl-fn" prefix="fn" %>
         

사용 예(기본 문법)

Area Subfunction Prefix Description
Core Variable support c 변수지원
Core Flow control c 흐름제어
Core URL management c URL 처리
Core Miscellaneous c  
XML Core x XML 코어
XML Flow control x 흐름 제어
XML Transformation x XML 변환
I18n Locale fmt 지역
I18n Message formatting fmt 메시지 형식
I18n Number and date formatting fmt 숫자 및 날짜 형식
Database SQL sql SQL
Functions Collection length fn 콜렉션 처리
Functions String manipulation fn String 처리

http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html 참고

  • 변수지원태그
    set: <c:set var="varName" scope="session" value="someValue">
    var속성은 값을 지정할 변수의 이름
    <c:set t a r g e t ="" property="userName" value="someValue">
    target : 빈 프로퍼티나 맵 값을 설정한다.(Object)
    var와 target을 동시에 사용할 수 없다.
    scope속성은 변수가 위치하는 영역(page,request,session,application)
    value :저장하는 값
    remove :<c:remove var="varName" scope="session">
    var :삭제할 변수의 이름
    scope 속성은 삭제할 변수의 영역
    out : <c:out value="">
    value속성은 출력하려는 값
    catch : <c:catch var="">
    </c:catch>
    예외사항이 한번이라도 발생시 </c:catch>로 점프
    var에 정의 된 객체를 페이지 생존범위에 자동으로 묶어 나중에 var에 정의된 변수이름을 사용할 수 있다.
    예외 발생시
    : var 속성 사용시 exception 객체를 설정.
    <c:catch> 문 밖으로 제어가 떨어진다
 
    <c:set var="num1" value="${20}" />
	<c:set var="num2">
		10.5
	</c:set>
	
	<c:set var="today" value="<%= new java.util.Date()%>" /><br>

	변수 num1 = ${num1} <br>
	변수 num2 = ${num2} <br>
	num1 + num2 = ${num1+num2}<br>
	오늘은 ${today}입니다.
	
	<c:remove var="num1" scope="page" />
	
	<p>
	삭제한 후의  num1=${num1} <br>
	삭제한 후의 num1 + num2 = ${num1 + num2}
   
 
       <c:catch var="myException">
     	It's catch
         <% int x = 10/0; %>
         실행안됨.
       </c:catch>
       <c:if test="${myException != null}">
           발생된 예외는 : ${myException.message} <br>
       </c:if>
     
  • URL 관련
    import : <c:import url=""/>
    url속성에 명기한 파일을 현재 컨텐츠에 포함
    param : <c:param name="" value=""/>
    <jsp:param />과 같은 역할
    url : <c:url value="" var=""/>
    value에 들어있는 상대 경로 뒤에 jsessionid를 추가한다.(쿠키를 사용 못하는 경우)
    var : 옵션 속성으로 url을 참조하기 위해쓴다.
    redirect :<c:redirect url="' context=""/>
    context : url경로의 이름
 
    <c:import url="Header.jsp" >
	<c:param name="subTitle" value="This is subTitle"/>
    </c:import>
   
  • 흐름제어 태그
    if : <c:if test="조건"> </c:if>
    test속성의 값에는 "조건"이 오는데 이 조건문의 결과값이 true 면 처리
     
       <c:if test="true">
         무조건 수행<br>
        </c:if>
    
        <c:if test="${param.name == 'bk'}">
          name 파라미터의 값이 ${param.name}입니다 <br>
        </c:if>
    
        <c:if test="${param.name eq 'bk'}">
          name 파라미터의 값이 ${param.name}입니다 <br>
        </c:if>
    
        <c:if test="${18 < param.age}">
    	 당신의 나이는 18세 이상입니다.
        </c:if>   
       

    choose,when,otherwise : <c:choose>
    <c:when test="조건">
    </c:when>
    <c:otherwise>
    </c:otherwise>
    </c:choose>
    choose 태그는 자바의 switch 문과 if-else 의 혼합한 형태, 다수의 조건문을 하나의 블록에서 수행하고자 할때 사용
    -> switch문과의 차이점은 중간에 빠져 나가지 못한다는 것이다.
    -> when 의 어느 하나에도 실행되지 않을때 otherwise 실행
    -> otherswise 태그가 반드시 있어야 하는것은 아니다.

 
     <c:choose>
       <c:when test="${param.name == 'bk' }">
	<li>당신의 이름은 ${param.name}입니다.
     </c:when>
     <c:when test="${param.age > 18 }">
	<li>당신은 18세 이상입니다.
     </c:when>

     <c:otherwise>
	<li> 당신은 'bk'가 아니고 18세 이상이 아닙니다.
     </c:otherwise>
     </c:choose> 
    

forEach : <c:forEach var="변수" items="아이템" begin="시작값" end="끝값" step="증가값">
</c:forEach>
item 속성에 올수 있는 것들로는 Map,배열,Collection 이 있다.
varStatus는 javax.servlet.jsp.jstl.core.LoopTagStatus 객체 인스턴스변수를 만들며 count라는 프로퍼티가 있어 몇번의 회전인지 알 수있다.

 
       <c:forEach var="i" begin="1" end="9">
	<li>4 *${i} = ${4 *i}
       </c:forEach>

       <h4>int 형 배열</h4>

       <c:forEach var="i" items="${intArray}" begin="2" end="4">
	[${i}]
       </c:forEach>

       <h4>Map</h4>
       <c:forEach var="i" items="${map}">
	  ${i.key} = ${i.value}<br>
       </c:forEach>

       <c:forEach var="member" items="${memberList}" varStatus="memberLoopCount">
	  회원 $(memberLoopCount.count} : ${member} <br>
       </c:forEach>
     

forTokens : <c:forTockens var="token" items="문자열" delins="구분자">
</c:forTockens>
forTokens 태그는 StringTokenizer 와 같은 기능을 제공한다.

 
       <c:forTokens var="token" items="빨강색, 주황색, 노란색, 초록색, 파랑색, 남색, 보라색" delims=",">
     	${token}<br>
       </c:forTokens>
     
  • 숫자 및 날짜 지원 형식
    The JSTL formatting actions allow various data elements in a JSP page, such as numbers,dates and times
    to be formatted and parsed in a locale-sensitive or customized manner.

formatNumber : 숫자 형식을 표현

 
 
      number  : <fmt:formatNumber value="9876543.61" type="number"/>
      currency: <fmt:formatNumber value="9876543.61" type="currency"/>
      percent : <fmt:formatNumber type="percent">9876543.61</fmt:formatNumber>

      pattern=".000"    :<fmt:formatNumber value="9876543.61" pattern=".000" />
      pattern="#,#00.0#":<fmt:formatNumber value="9876543.612345" pattern="#,#00.0#"/>
    

parseNumber : 정해진 패턴을 문자열에서 수치를 파싱해내는 태그
formatDate :날짜 형식을 표현

 
      <jsp:useBean id="now" class="java.util.Date"/>
	
         <c:out value="${now}"/>
           date: <fmt:formatDate value="${now}" type="date"/>
           time: <fmt:formatDate value="${now}" type="time"/>
           both: <fmt:formatDate value="${now}" type="both"/>

           default:<fmt:formatDate value="${now}"
                        type="both" dateStyle="default" timeStyle="default"/>
           short  :<fmt:formatDate value="${now}"
                        type="both" dateStyle="short"   timeStyle="short"  />
           medium :<fmt:formatDate value="${now}"
                        type="both" dateStyle="medium"  timeStyle="medium" />
           long   :<fmt:formatDate value="${now}"
                        type="both" dateStyle="long"    timeStyle="long"   />
           full   :<fmt:formatDate value="${now}"
                        type="both" dateStyle="full"    timeStyle="full"   />

          pattern="yyyy년MM월dd일 HH시mm분ss초"
             <fmt:formatDate value="${now}" type="both"
                             pattern="yyyy년MM월dd일 HH시mm분ss초"/>
            
         <fmt:formatDate value="${now}" pattern="yyyy/MM/dd" />

parseDate :정해진 패턴의 문자열에서 날짜를 파싱해내는 태그
timeZone : <fmt:timeZone value=""/>

setTimeZone : <fmt:timeZone value="" var="" scope=""/>

  • 국제화
    message <fmt:message
    setLocale <fmt:setLocale
    bundle <fmt:bundle
    setBundle <fmt:setBundle
    param <fmt:param
    requestEncoding <fmt:requestEncoding
  • SQL
    <sql:query sql="sqlQuery" var="varName" [scope="{page|request|session|application}"]
    [dataSource="dataSource"] [maxRows="maxRows"] [startRow="startRow"]>
    <sql:param>
    </sql:query>
         <sql:query var="customers" dataSource="${dataSource}">
          SELECT * FROM customers
          WHERE country ='China'
          ORDER BY lastname
         </sql:query>
         
         <table>
          <c:forEach var="row" items="">
             <tr>
               <td><c:out value="${row.lastName}"/></td>
               <td><c:out value="${row.firstName}"/></td>
               <td><c:out value="${row.address}"/></td>
             </tr>
          </c:forEach>
         </table>
       

<sql:update>
<sql:setDataSource>
<sql:param>
<sql:dateParam>

  • XML 코어
    <x:parse>
    <x:out>
    <x:set>
  • 흐름제어
    <x:if>
    <x:choose>
    <x:when>
    <x:otherwise>
    <x:forEach>
  • XML 변환
    <x:transform>
    <x:param>
  • function
    contains
    containsIgnoreCase
    endsWith
    escapeXml
    indexOf
    join
    length
    replace
    split
    startsWith
    substring
    substringAfter
    substringBefore
    toLowerCase
    toUpperCase
    trim
         <c:if test="${fn:contains(name, searchString)}">
         <c:if test="${fn:containsIgnoreCase(name, searchString)}">
         <c:if test="${fn:endsWith(filename, ".txt")}">
         ${fn:escapeXml(param:info)}
         ${fn:indexOf(name, "-")}
         ${fn:join(array, ";")} 
         You have ${fn:length(shoppingCart.products)} in your shopping cart.
         ${fn:replace(text, "-", "•")}
         ${fn:split(customerNames, ";")}
         <c:if test="${fn:startsWith(product.id, "100-")}">
         P.O. Box: ${fn:substring(zip, 6, -1)}
         P.O. Box: ${fn:substringAfter(zip, "-")}
         Zip (without P.O. Box): ${fn:substringBefore(zip, "-")}
         Product name: ${fn.toLowerCase(product.name)}
         Product name: ${fn.UpperCase(product.name)}
         Name: ${fn.trim(name)}
:

window.open ...

ITWeb/개발일반 2008. 12. 2. 17:42

요즘 웹표준화 관련해서.. widow.open 으로 띄운 팝업창에 대해서 하도 의견들이 많아.. 기냥 MDC 에 있는 이미지 하나 퍼 나릅니다..

참고 URL : https://developer.mozilla.org/En/DOM/Window.open
OS+Browser 별 테스트 하다 이건 이렇고 저건 저렇고 고민 고민 하지마.. ㅋ
이 노무 crossbrowsing.. ㅋㅋ
:

IE+Flash+Anchor 사용 시 중복으로 title 에 anchor name 붙는 버그

ITWeb/개발일반 2008. 11. 21. 16:40



http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2547247&SiteID=1



This is bug FP-240 at Adobe:

http://bugs.adobe.com/jira/browse/FP-240

Vote for the bug there if you want to see it fixed.



This bug has been identified as bug 312 for IE7 here:

http://webbugtrack.blogspot.com/2007/12/bug-312-anchor-links-klobber-page-title.html

Hopefully IE8 will fix this.



<script type="text/javascript">
// <![CDATA[
 window.onload = function()
 {
  document.title = "Your site name here";
 }

// ]]>
</script>

:

[펌]Color Hex Code List

ITWeb/개발일반 2008. 7. 30. 21:31
가끔.. 급하게 color hex code 가 필요 할때가 있더라구요.. ^^*
뭐.. 걍 검색해서 찾을 수도 있지만..
저도 걍.. 하나 정도는 스크랩 해서 가지고 있음 좋을것 같아서.. ㅎㅎ


ref. http://www.colourlovers.com/blog/2007/06/30/ultimate-html-color-hex-code-list/

Standard 16 Named Color Codes

 Black or 000000  Gray or 808080  Silver or C0C0C0  White or FFFFFF
 Navy or 000080  Blue or 0000FF  Teal or 008080  Aqua or 00FFFF
 Purple or 800080  Maroon or 800000  Red or FF0000  Fuschia or FF00FF
 Green or 008000  Lime or 00FF00  Olive or 808000  Yellow or FFFF00


216 Web Safe Color Codes

 
 000000  000033  000066  000099  0000CC  0000FF
 003300  003333  003366  003399  0033CC  0033FF
 006600  006633  006666  006699  0066CC  0066FF
 009900  009933  009966  009999  0099CC  0099FF
 00CC00  00CC33  00CC66  00CC99  00CCCC  00CCFF
 00FF00  00FF33  00FF66  00FF99  00FFCC  00FFFF
 330000  330033  330066  330099  3300CC  3300FF
 333300  333333  333366  333399  3333CC  3333FF
 336600  336633  336666  336699  3366CC  3366FF
 339900  339933  339966  339999  3399CC  3399FF
 33CC00  33CC33  33CC66  33CC99  33CCCC  33CCFF
 33FF00  33FF33  33FF66  33FF99  33FFCC  33FFFF
 660000  660033  660066  660099  6600CC  6600FF
 663300  663333  663366  663399  6633CC  6633FF
 666600  666633  666666  666699  6666CC  6666FF
 669900  669933  669966  669999  6699CC  6699FF
 66CC00  66CC33  66CC66  66CC99  66CCCC  66CCFF
 66FF00  66FF33  66FF66  66FF99  66FFCC  66FFFF
 990000  990033  990066  990099  9900CC  9900FF
 993300  993333  993366  993399  9933CC  9933FF
 996600  996633  996666  996699  9966CC  9966FF
 999900  999933  999966  999999  9999CC  9999FF
 99CC00  99CC33  99CC66  99CC99  99CCCC  99CCFF
 99FF00  99FF33  99FF66  99FF99  99FFCC  99FFFF
 CC0000  CC0033  CC0066  CC0099  CC00CC  CC00FF
 CC3300  CC3333  CC3366  CC3399  CC33CC  CC33FF
 CC6600  CC6633  CC6666  CC6699  CC66CC  CC66FF
 CC9900  CC9933  CC9966  CC9999  CC99CC  CC99FF
 CCCC00  CCCC33  CCCC66  CCCC99  CCCCCC  CCCCFF
 CCFF00  CCFF33  CCFF66  CCFF99  CCFFCC  CCFFFF
 FF0000  FF0033  FF0066  FF0099  FF00CC  FF00FF
 FF3300  FF3333  FF3366  FF3399  FF33CC  FF33FF
 FF6600  FF6633  FF6666  FF6699  FF66CC  FF66FF
 FF9900  FF9933  FF9966  FF9999  FF99CC  FF99FF
 FFCC00  FFCC33  FFCC66  FFCC99  FFCCCC  FFCCFF
 FFFF00  FFFF33  FFFF66  FFFF99  FFFFCC  FFFFFF

Red Based Tints and Shades

 FFFFFF  FFFFF9  FFFFEC  FFFFE8  FFFFDF  FFFFD2  FFFFC8  FFFFBF
 FFFFFF  FFFFF3  FFFFDA  FFFFD2  FFFFBF  FFFFA6  FFFF91  FFFF7F
 FFFFFF  FFFFED  FFFFC8  FFFFBB  FFFF9F  FFFF7A  FFFF5A  FFFF3F
 FFFFFF  FFFFEA  FFFFBD  FFFFAE  FFFF8C  FFFF60  FFFF39  FFFF19
 FFFFFF  FFFFE7  FFFFB6  FFFFA5  FFFF7F  FFFF4E  FFFF23  FFFF00
 EEEEEE  EEEED8  EEEEAA  EEEE9A  EEEE77  EEEE49  EEEE21  EEEE00
 CDCDCD  CDCDBA  CDCD92  CDCD85  CDCD66  CDCD3F  CDCD1C  CDCD00
 8B8B8B  8B8B7E  8B8B63  8B8B5A  8B8B45  8B8B2A  8B8B13  8B8B00
 FFF9FF  FFF9F9  FFF9EC  FFF9E8  FFF9DF  FFF9D2  FFF9C8  FFF9BF
 FFF3FF  FFF3F3  FFF3DA  FFF3D2  FFF3BF  FFF3A6  FFF391  FFF37F
 FFEDFF  FFEDED  FFEDC8  FFEDBB  FFED9F  FFED7A  FFED5A  FFED3F
 FFEAFF  FFEAEA  FFEABD  FFEAAE  FFEA8C  FFEA60  FFEA39  FFEA19
 FFE7FF  FFE7E7  FFE7B6  FFE7A5  FFE77F  FFE74E  FFE723  FFE700
 EED8EE  EED8D8  EED8AA  EED89A  EED877  EED849  EED821  EED800
 CDBACD  CDBABA  CDBA92  CDBA85  CDBA66  CDBA3F  CDBA1C  CDBA00
 8B7E8B  8B7E7E  8B7E63  8B7E5A  8B7E45  8B7E2A  8B7E13  8B7E00
 FFECFF  FFECF9  FFECEC  FFECE8  FFECDF  FFECD2  FFECC8  FFECBF
 FFDAFF  FFDAF3  FFDADA  FFDAD2  FFDABF  FFDAA6  FFDA91  FFDA7F
 FFC8FF  FFC8ED  FFC8C8  FFC8BB  FFC89F  FFC87A  FFC85A  FFC83F
 FFBDFF  FFBDEA  FFBDBD  FFBDAE  FFBD8C  FFBD60  FFBD39  FFBD19
 FFB6FF  FFB6E7  FFB6B6  FFB6A5  FFB67F  FFB64E  FFB623  FFB600
 EEAAEE  EEAAD8  EEAAAA  EEAA9A  EEAA77  EEAA49  EEAA21  EEAA00
 CD92CD  CD92BA  CD9292  CD9285  CD9266  CD923F  CD921C  CD9200
 8B638B  8B637E  8B6363  8B635A  8B6345  8B632A  8B6313  8B6300
 FFE8FF  FFE8F9  FFE8EC  FFE8E8  FFE8DF  FFE8D2  FFE8C8  FFE8BF
 FFD2FF  FFD2F3  FFD2DA  FFD2D2  FFD2BF  FFD2A6  FFD291  FFD27F
 FFBBFF  FFBBED  FFBBC8  FFBBBB  FFBB9F  FFBB7A  FFBB5A  FFBB3F
 FFAEFF  FFAEEA  FFAEBD  FFAEAE  FFAE8C  FFAE60  FFAE39  FFAE19
 FFA5FF  FFA5E7  FFA5B6  FFA5A5  FFA57F  FFA54E  FFA523  FFA500
 EE9AEE  EE9AD8  EE9AAA  EE9A9A  EE9A77  EE9A49  EE9A21  EE9A00
 CD85CD  CD85BA  CD8592  CD8585  CD8566  CD853F  CD851C  CD8500
 8B5A8B  8B5A7E  8B5A63  8B5A5A  8B5A45  8B5A2A  8B5A13  8B5A00
 FFDFFF  FFDFF9  FFDFEC  FFDFE8  FFDFDF  FFDFD2  FFDFC8  FFDFBF
 FFBFFF  FFBFF3  FFBFDA  FFBFD2  FFBFBF  FFBFA6  FFBF91  FFBF7F
 FF9FFF  FF9FED  FF9FC8  FF9FBB  FF9F9F  FF9F7A  FF9F5A  FF9F3F
 FF8CFF  FF8CEA  FF8CBD  FF8CAE  FF8C8C  FF8C60  FF8C39  FF8C19
 FF7FFF  FF7FE7  FF7FB6  FF7FA5  FF7F7F  FF7F4E  FF7F23  FF7F00
 EE77EE  EE77D8  EE77AA  EE779A  EE7777  EE7749  EE7721  EE7700
 CD66CD  CD66BA  CD6692  CD6685  CD6666  CD663F  CD661C  CD6600
 8B458B  8B457E  8B4563  8B455A  8B4545  8B452A  8B4513  8B4500
 FFD2FF  FFD2F9  FFD2EC  FFD2E8  FFD2DF  FFD2D2  FFD2C8  FFD2BF
 FFA6FF  FFA6F3  FFA6DA  FFA6D2  FFA6BF  FFA6A6  FFA691  FFA67F
 FF7AFF  FF7AED  FF7AC8  FF7ABB  FF7A9F  FF7A7A  FF7A5A  FF7A3F
 FF60FF  FF60EA  FF60BD  FF60AE  FF608C  FF6060  FF6039  FF6019
 FF4EFF  FF4EE7  FF4EB6  FF4EA5  FF4E7F  FF4E4E  FF4E23  FF4E00
 EE49EE  EE49D8  EE49AA  EE499A  EE4977  EE4949  EE4921  EE4900
 CD3FCD  CD3FBA  CD3F92  CD3F85  CD3F66  CD3F3F  CD3F1C  CD3F00
 8B2A8B  8B2A7E  8B2A63  8B2A5A  8B2A45  8B2A2A  8B2A13  8B2A00
 FFC8FF  FFC8F9  FFC8EC  FFC8E8  FFC8DF  FFC8D2  FFC8C8  FFC8BF
 FF91FF  FF91F3  FF91DA  FF91D2  FF91BF  FF91A6  FF9191  FF917F
 FF5AFF  FF5AED  FF5AC8  FF5ABB  FF5A9F  FF5A7A  FF5A5A  FF5A3F
 FF39FF  FF39EA  FF39BD  FF39AE  FF398C  FF3960  FF3939  FF3919
 FF23FF  FF23E7  FF23B6  FF23A5  FF237F  FF234E  FF2323  FF2300
 EE21EE  EE21D8  EE21AA  EE219A  EE2177  EE2149  EE2121  EE2100
 CD1CCD  CD1CBA  CD1C92  CD1C85  CD1C66  CD1C3F  CD1C1C  CD1C00
 8B138B  8B137E  8B1363  8B135A  8B1345  8B132A  8B1313  8B1300
 FFBFFF  FFBFF9  FFBFEC  FFBFE8  FFBFDF  FFBFD2  FFBFC8  FFBFBF
 FF7FFF  FF7FF3  FF7FDA  FF7FD2  FF7FBF  FF7FA6  FF7F91  FF7F7F
 FF3FFF  FF3FED  FF3FC8  FF3FBB  FF3F9F  FF3F7A  FF3F5A  FF3F3F
 FF19FF  FF19EA  FF19BD  FF19AE  FF198C  FF1960  FF1939  FF1919
 FF00FF  FF00E7  FF00B6  FF00A5  FF007F  FF004E  FF0023  FF0000
 EE00EE  EE00D8  EE00AA  EE009A  EE0077  EE0049  EE0021  EE0000
 CD00CD  CD00BA  CD0092  CD0085  CD0066  CD003F  CD001C  CD0000
 8B008B  8B007E  8B0063  8B005A  8B0045  8B002A  8B0013  8B0000


Green Based Tints and Shades

 FFFFFF  FFFFF9  FFFFEC  FFFFE8  FFFFDF  FFFFD2  FFFFC8  FFFFBF
 FFFFFF  FFFFF3  FFFFDA  FFFFD2  FFFFBF  FFFFA6  FFFF91  FFFF7F
 FFFFFF  FFFFED  FFFFC8  FFFFBB  FFFF9F  FFFF7A  FFFF5A  FFFF3F
 FFFFFF  FFFFEA  FFFFBD  FFFFAE  FFFF8C  FFFF60  FFFF39  FFFF19
 FFFFFF  FFFFE7  FFFFB6  FFFFA5  FFFF7F  FFFF4E  FFFF23  FFFF00
 EEEEEE  EEEED8  EEEEAA  EEEE9A  EEEE77  EEEE49  EEEE21  EEEE00
 CDCDCD  CDCDBA  CDCD92  CDCD85  CDCD66  CDCD3F  CDCD1C  CDCD00
 8B8B8B  8B8B7E  8B8B63  8B8B5A  8B8B45  8B8B2A  8B8B13  8B8B00
 F9FFFF  F9FFF9  F9FFEC  F9FFE8  F9FFDF  F9FFD2  F9FFC8  F9FFBF
 F3FFFF  F3FFF3  F3FFDA  F3FFD2  F3FFBF  F3FFA6  F3FF91  F3FF7F
 EDFFFF  EDFFED  EDFFC8  EDFFBB  EDFF9F  EDFF7A  EDFF5A  EDFF3F
 EAFFFF  EAFFEA  EAFFBD  EAFFAE  EAFF8C  EAFF60  EAFF39  EAFF19
 E7FFFF  E7FFE7  E7FFB6  E7FFA5  E7FF7F  E7FF4E  E7FF23  E7FF00
 D8EEEE  D8EED8  D8EEAA  D8EE9A  D8EE77  D8EE49  D8EE21  D8EE00
 BACDCD  BACDBA  BACD92  BACD85  BACD66  BACD3F  BACD1C  BACD00
 7E8B8B  7E8B7E  7E8B63  7E8B5A  7E8B45  7E8B2A  7E8B13  7E8B00
 ECFFFF  ECFFF9  ECFFEC  ECFFE8  ECFFDF  ECFFD2  ECFFC8  ECFFBF
 DAFFFF  DAFFF3  DAFFDA  DAFFD2  DAFFBF  DAFFA6  DAFF91  DAFF7F
 C8FFFF  C8FFED  C8FFC8  C8FFBB  C8FF9F  C8FF7A  C8FF5A  C8FF3F
 BDFFFF  BDFFEA  BDFFBD  BDFFAE  BDFF8C  BDFF60  BDFF39  BDFF19
 B6FFFF  B6FFE7  B6FFB6  B6FFA5  B6FF7F  B6FF4E  B6FF23  B6FF00
 AAEEEE  AAEED8  AAEEAA  AAEE9A  AAEE77  AAEE49  AAEE21  AAEE00
 92CDCD  92CDBA  92CD92  92CD85  92CD66  92CD3F  92CD1C  92CD00
 638B8B  638B7E  638B63  638B5A  638B45  638B2A  638B13  638B00
 E8FFFF  E8FFF9  E8FFEC  E8FFE8  E8FFDF  E8FFD2  E8FFC8  E8FFBF
 D2FFFF  D2FFF3  D2FFDA  D2FFD2  D2FFBF  D2FFA6  D2FF91  D2FF7F
 BBFFFF  BBFFED  BBFFC8  BBFFBB  BBFF9F  BBFF7A  BBFF5A  BBFF3F
 AEFFFF  AEFFEA  AEFFBD  AEFFAE  AEFF8C  AEFF60  AEFF39  AEFF19
 A5FFFF  A5FFE7  A5FFB6  A5FFA5  A5FF7F  A5FF4E  A5FF23  A5FF00
 9AEEEE  9AEED8  9AEEAA  9AEE9A  9AEE77  9AEE49  9AEE21  9AEE00
 85CDCD  85CDBA  85CD92  85CD85  85CD66  85CD3F  85CD1C  85CD00
 5A8B8B  5A8B7E  5A8B63  5A8B5A  5A8B45  5A8B2A  5A8B13  5A8B00
 DFFFFF  DFFFF9  DFFFEC  DFFFE8  DFFFDF  DFFFD2  DFFFC8  DFFFBF
 BFFFFF  BFFFF3  BFFFDA  BFFFD2  BFFFBF  BFFFA6  BFFF91  BFFF7F
 9FFFFF  9FFFED  9FFFC8  9FFFBB  9FFF9F  9FFF7A  9FFF5A  9FFF3F
 8CFFFF  8CFFEA  8CFFBD  8CFFAE  8CFF8C  8CFF60  8CFF39  8CFF19
 7FFFFF  7FFFE7  7FFFB6  7FFFA5  7FFF7F  7FFF4E  7FFF23  7FFF00
 77EEEE  77EED8  77EEAA  77EE9A  77EE77  77EE49  77EE21  77EE00
 66CDCD  66CDBA  66CD92  66CD85  66CD66  66CD3F  66CD1C  66CD00
 458B8B  458B7E  458B63  458B5A  458B45  458B2A  458B13  458B00
 D2FFFF  D2FFF9  D2FFEC  D2FFE8  D2FFDF  D2FFD2  D2FFC8  D2FFBF
 A6FFFF  A6FFF3  A6FFDA  A6FFD2  A6FFBF  A6FFA6  A6FF91  A6FF7F
 7AFFFF  7AFFED  7AFFC8  7AFFBB  7AFF9F  7AFF7A  7AFF5A  7AFF3F
 60FFFF  60FFEA  60FFBD  60FFAE  60FF8C  60FF60  60FF39  60FF19
 4EFFFF  4EFFE7  4EFFB6  4EFFA5  4EFF7F  4EFF4E  4EFF23  4EFF00
 49EEEE  49EED8  49EEAA  49EE9A  49EE77  49EE49  49EE21  49EE00
 3FCDCD  3FCDBA  3FCD92  3FCD85  3FCD66  3FCD3F  3FCD1C  3FCD00
 2A8B8B  2A8B7E  2A8B63  2A8B5A  2A8B45  2A8B2A  2A8B13  2A8B00
 C8FFFF  C8FFF9  C8FFEC  C8FFE8  C8FFDF  C8FFD2  C8FFC8  C8FFBF
 91FFFF  91FFF3  91FFDA  91FFD2  91FFBF  91FFA6  91FF91  91FF7F
 5AFFFF  5AFFED  5AFFC8  5AFFBB  5AFF9F  5AFF7A  5AFF5A  5AFF3F
 39FFFF  39FFEA  39FFBD  39FFAE  39FF8C  39FF60  39FF39  39FF19
 23FFFF  23FFE7  23FFB6  23FFA5  23FF7F  23FF4E  23FF23  23FF00
 21EEEE  21EED8  21EEAA  21EE9A  21EE77  21EE49  21EE21  21EE00
 1CCDCD  1CCDBA  1CCD92  1CCD85  1CCD66  1CCD3F  1CCD1C  1CCD00
 138B8B  138B7E  138B63  138B5A  138B45  138B2A  138B13  138B00
 BFFFFF  BFFFF9  BFFFEC  BFFFE8  BFFFDF  BFFFD2  BFFFC8  BFFFBF
 7FFFFF  7FFFF3  7FFFDA  7FFFD2  7FFFBF  7FFFA6  7FFF91  7FFF7F
 3FFFFF  3FFFED  3FFFC8  3FFFBB  3FFF9F  3FFF7A  3FFF5A  3FFF3F
 19FFFF  19FFEA  19FFBD  19FFAE  19FF8C  19FF60  19FF39  19FF19
 00FFFF  00FFE7  00FFB6  00FFA5  00FF7F  00FF4E  00FF23  00FF00
 00EEEE  00EED8  00EEAA  00EE9A  00EE77  00EE49  00EE21  00EE00
 00CDCD  00CDBA  00CD92  00CD85  00CD66  00CD3F  00CD1C  00CD00
 008B8B  008B7E  008B63  008B5A  008B45  008B2A  008B13  008B00


Blue Based Tints and Shades

 FFFFFF  F9FFFF  ECFFFF  E8FFFF  DFFFFF  D2FFFF  C8FFFF  BFFFFF
 FFFFFF  F3FFFF  DAFFFF  D2FFFF  BFFFFF  A6FFFF  91FFFF  7FFFFF
 FFFFFF  EDFFFF  C8FFFF  BBFFFF  9FFFFF  7AFFFF  5AFFFF  3FFFFF
 FFFFFF  EAFFFF  BDFFFF  AEFFFF  8CFFFF  60FFFF  39FFFF  19FFFF
 FFFFFF  E7FFFF  B6FFFF  A5FFFF  7FFFFF  4EFFFF  23FFFF  00FFFF
 EEEEEE  D8EEEE  AAEEEE  9AEEEE  77EEEE  49EEEE  21EEEE  00EEEE
 CDCDCD  BACDCD  92CDCD  85CDCD  66CDCD  3FCDCD  1CCDCD  00CDCD
 8B8B8B  7E8B8B  638B8B  5A8B8B  458B8B  2A8B8B  138B8B  008B8B
 FFF9FF  F9F9FF  ECF9FF  E8F9FF  DFF9FF  D2F9FF  C8F9FF  BFF9FF
 FFF3FF  F3F3FF  DAF3FF  D2F3FF  BFF3FF  A6F3FF  91F3FF  7FF3FF
 FFEDFF  EDEDFF  C8EDFF  BBEDFF  9FEDFF  7AEDFF  5AEDFF  3FEDFF
 FFEAFF  EAEAFF  BDEAFF  AEEAFF  8CEAFF  60EAFF  39EAFF  19EAFF
 FFE7FF  E7E7FF  B6E7FF  A5E7FF  7FE7FF  4EE7FF  23E7FF  00E7FF
 EED8EE  D8D8EE  AAD8EE  9AD8EE  77D8EE  49D8EE  21D8EE  00D8EE
 CDBACD  BABACD  92BACD  85BACD  66BACD  3FBACD  1CBACD  00BACD
 8B7E8B  7E7E8B  637E8B  5A7E8B  457E8B  2A7E8B  137E8B  007E8B
 FFECFF  F9ECFF  ECECFF  E8ECFF  DFECFF  D2ECFF  C8ECFF  BFECFF
 FFDAFF  F3DAFF  DADAFF  D2DAFF  BFDAFF  A6DAFF  91DAFF  7FDAFF
 FFC8FF  EDC8FF  C8C8FF  BBC8FF  9FC8FF  7AC8FF  5AC8FF  3FC8FF
 FFBDFF  EABDFF  BDBDFF  AEBDFF  8CBDFF  60BDFF  39BDFF  19BDFF
 FFB6FF  E7B6FF  B6B6FF  A5B6FF  7FB6FF  4EB6FF  23B6FF  00B6FF
 EEAAEE  D8AAEE  AAAAEE  9AAAEE  77AAEE  49AAEE  21AAEE  00AAEE
 CD92CD  BA92CD  9292CD  8592CD  6692CD  3F92CD  1C92CD  0092CD
 8B638B  7E638B  63638B  5A638B  45638B  2A638B  13638B  00638B
 FFE8FF  F9E8FF  ECE8FF  E8E8FF  DFE8FF  D2E8FF  C8E8FF  BFE8FF
 FFD2FF  F3D2FF  DAD2FF  D2D2FF  BFD2FF  A6D2FF  91D2FF  7FD2FF
 FFBBFF  EDBBFF  C8BBFF  BBBBFF  9FBBFF  7ABBFF  5ABBFF  3FBBFF
 FFAEFF  EAAEFF  BDAEFF  AEAEFF  8CAEFF  60AEFF  39AEFF  19AEFF
 FFA5FF  E7A5FF  B6A5FF  A5A5FF  7FA5FF  4EA5FF  23A5FF  00A5FF
 EE9AEE  D89AEE  AA9AEE  9A9AEE  779AEE  499AEE  219AEE  009AEE
 CD85CD  BA85CD  9285CD  8585CD  6685CD  3F85CD  1C85CD  0085CD
 8B5A8B  7E5A8B  635A8B  5A5A8B  455A8B  2A5A8B  135A8B  005A8B
 FFDFFF  F9DFFF  ECDFFF  E8DFFF  DFDFFF  D2DFFF  C8DFFF  BFDFFF
 FFBFFF  F3BFFF  DABFFF  D2BFFF  BFBFFF  A6BFFF  91BFFF  7FBFFF
 FF9FFF  ED9FFF  C89FFF  BB9FFF  9F9FFF  7A9FFF  5A9FFF  3F9FFF
 FF8CFF  EA8CFF  BD8CFF  AE8CFF  8C8CFF  608CFF  398CFF  198CFF
 FF7FFF  E77FFF  B67FFF  A57FFF  7F7FFF  4E7FFF  237FFF  007FFF
 EE77EE  D877EE  AA77EE  9A77EE  7777EE  4977EE  2177EE  0077EE
 CD66CD  BA66CD  9266CD  8566CD  6666CD  3F66CD  1C66CD  0066CD
 8B458B  7E458B  63458B  5A458B  45458B  2A458B  13458B  00458B
 FFD2FF  F9D2FF  ECD2FF  E8D2FF  DFD2FF  D2D2FF  C8D2FF  BFD2FF
 FFA6FF  F3A6FF  DAA6FF  D2A6FF  BFA6FF  A6A6FF  91A6FF  7FA6FF
 FF7AFF  ED7AFF  C87AFF  BB7AFF  9F7AFF  7A7AFF  5A7AFF  3F7AFF
 FF60FF  EA60FF  BD60FF  AE60FF  8C60FF  6060FF  3960FF  1960FF
 FF4EFF  E74EFF  B64EFF  A54EFF  7F4EFF  4E4EFF  234EFF  004EFF
 EE49EE  D849EE  AA49EE  9A49EE  7749EE  4949EE  2149EE  0049EE
 CD3FCD  BA3FCD  923FCD  853FCD  663FCD  3F3FCD  1C3FCD  003FCD
 8B2A8B  7E2A8B  632A8B  5A2A8B  452A8B  2A2A8B  132A8B  002A8B
 FFC8FF  F9C8FF  ECC8FF  E8C8FF  DFC8FF  D2C8FF  C8C8FF  BFC8FF
 FF91FF  F391FF  DA91FF  D291FF  BF91FF  A691FF  9191FF  7F91FF
 FF5AFF  ED5AFF  C85AFF  BB5AFF  9F5AFF  7A5AFF  5A5AFF  3F5AFF
 FF39FF  EA39FF  BD39FF  AE39FF  8C39FF  6039FF  3939FF  1939FF
 FF23FF  E723FF  B623FF  A523FF  7F23FF  4E23FF  2323FF  0023FF
 EE21EE  D821EE  AA21EE  9A21EE  7721EE  4921EE  2121EE  0021EE
 CD1CCD  BA1CCD  921CCD  851CCD  661CCD  3F1CCD  1C1CCD  001CCD
 8B138B  7E138B  63138B  5A138B  45138B  2A138B  13138B  00138B
 FFBFFF  F9BFFF  ECBFFF  E8BFFF  DFBFFF  D2BFFF  C8BFFF  BFBFFF
 FF7FFF  F37FFF  DA7FFF  D27FFF  BF7FFF  A67FFF  917FFF  7F7FFF
 FF3FFF  ED3FFF  C83FFF  BB3FFF  9F3FFF  7A3FFF  5A3FFF  3F3FFF
 FF19FF  EA19FF  BD19FF  AE19FF  8C19FF  6019FF  3919FF  1919FF
 FF00FF  E700FF  B600FF  A500FF  7F00FF  4E00FF  2300FF  0000FF
 EE00EE  D800EE  AA00EE  9A00EE  7700EE  4900EE  2100EE  0000EE
 CD00CD  BA00CD  9200CD  8500CD  6600CD  3F00CD  1C00CD  0000CD
 8B008B  7E008B  63008B  5A008B  45008B  2A008B  13008B  00008B





:

[펌]html meta tags

ITWeb/개발일반 2008. 7. 24. 12:03
아직도 html 코드에 기본이 되는 태그들을 안쓰시는 분들이 많더군요.
기본적으루 좀 넣어 주자구요.. ^^*
사용자를 위한 배려 아닐런지요..
특히 커뮤니티 서비스를 만드시는 분들은.. 기본 기본..

no cache 넣어 주고 keyword 넣어 주고 description 넣어 주고... 이게 어렵나.. 흠..
이도 저도 싫으면.. no cache 라도..

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 1999 00:00:00 GMT">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">


ref. http://www.i18nguy.com/markup/metatags.html


Tag NameExample(s)Description
Author<META NAME="AUTHOR" CONTENT="Tex Texin"> The author's name.
cache-control<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.
Public - may be cached in public shared caches
Private - may only be cached in private cache
no-Cache - may not be cached
no-Store - may be cached but not archived

The directive CACHE-CONTROL:NO-CACHE indicates cached information should not be used and instead requests should be forwarded to the origin server. This directive has the same semantics as the PRAGMA:NO-CACHE.
Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cache request is sent to a server not known to be HTTP/1.1 compliant.
Also see EXPIRES.
Note: It may be better to specify cache commands in HTTP than in META statements, where they can influence more than the browser, but proxies and other intermediaries that may cache information.

Content-Language<META HTTP-EQUIV="CONTENT-LANGUAGE"
CONTENT="en-US,fr">
Declares the primary natural language(s) of the document. May be used by search engines to categorize by language.
CONTENT-TYPE<META HTTP-EQUIV="CONTENT-TYPE"
CONTENT="text/html; charset=UTF-8">
The HTTP content type may be extended to give the character set. It is recommended to always use this tag and to specify the charset.
Copyright<META NAME="COPYRIGHT" CONTENT="&copy; 2004 Tex Texin"> A copyright statement.
DESCRIPTION<META NAME="DESCRIPTION"
CONTENT="...summary of web page...">
The text can be used when printing a summary of the document. The text should not contain any formatting information. Used by some search engines to describe your document. Particularly important if your document has very little text, is a frameset, or has extensive scripts at the top.
EXPIRES<META HTTP-EQUIV="EXPIRES"
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">
The date and time after which the document should be considered expired. An illegal EXPIRES date, e.g. "0", is interpreted as "now". Setting EXPIRES to 0 may thus be used to force a modification check at each visit.
Web robots may delete expired documents from a search engine, or schedule a revisit.

HTTP 1.1 (RFC 2068) specifies that all HTTP date/time stamps MUST be generated in Greenwich Mean Time (GMT) and in RFC 1123 format.
RFC 1123 format = wkday "," SP date SP time SP "GMT"

wkday = (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
date = 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59
month = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)

Keywords<META NAME="KEYWORDS"
CONTENT="sex, drugs, rock & roll">
The keywords are used by some search engines to index your document in addition to words from the title and document body. Typically used for synonyms and alternates of title words. Consider adding frequent misspellings. e.g. heirarchy, hierarchy.
PRAGMA NO-CACHE<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> This directive indicates cached information should not be used and instead requests should be forwarded to the origin server. This directive has the same semantics as the CACHE-CONTROL:NO-CACHE directive and is provided for backwards compatibility with HTTP/1.0.
Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cache request is sent to a server not known to be HTTP/1.1 compliant.
HTTP/1.1 clients SHOULD NOT send the PRAGMA request-header. HTTP/1.1 caches SHOULD treat "PRAGMA:NO-CACHE" as if the client had sent "CACHE-CONTROL:NO-CACHE".
Also see EXPIRES.
Refresh<META HTTP-EQUIV="REFRESH"
CONTENT="15;URL=http://www.I18nGuy.com/index.html">
Specifies a delay in seconds before the browser automatically reloads the document. Optionally, specifies an alternative URL to load, making this command useful for redirecting browsers to other pages.
ROBOTS <META NAME="ROBOTS" CONTENT="ALL">

<META NAME="ROBOTS" CONTENT="INDEX,NOFOLLOW">

<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW">

<META NAME="ROBOTS" CONTENT="NONE">
CONTENT="ALL | NONE | NOINDEX | INDEX| NOFOLLOW | FOLLOW | NOARCHIVE"
default = empty = "ALL"
"NONE" = "NOINDEX, NOFOLLOW"

The CONTENT field is a comma separated list:
INDEX: search engine robots should include this page.
FOLLOW: robots should follow links from this page to other pages.
NOINDEX: links can be explored, although the page is not indexed.
NOFOLLOW: the page can be indexed, but no links are explored.
NONE: robots can ignore the page.
NOARCHIVE: Google uses this to prevent archiving of the page. See http://www.google.com/bot.html

GOOGLEBOT <META NAME="GOOGLEBOT" CONTENT="NOARCHIVE"> In addition to the ROBOTS META Command above, Google supports a GOOGLEBOT command. With it, you can tell Google that you do not want the page archived, but allow other search engines to do so. If you specify this command, Google will not save the page and the page will be unavailable via its cache.
See Google's FAQ.

: