1. java 버젼이 낮을 경우 에러가 발생할 수 있으니 java builder path 에서 높이고 오면 해결

설정

트랙백

댓글

 

출처 : http://blog.elzapp.com/2010/07/07/round-floor-and-ceiling-in-expression-language.html

Expression Language makes working with Java Server Pages a slightly less pain in the behind. But, its functionality is very limited, there is for instance no way to round off a number, neither as floor, ceiling or to the closest integer

Floor(foo) -> ${foo - ( foo % 1 ) }
Ceiling(foo) -> ${foo + ( 1 - (foo%1)) % 1}
Round(foo) -> ${foo +0.5 - ((foo+0.5) % 1) }

This still gives you a float, so to get an integer, you must either use the <fmt:formatNumber>-tag

<fmt:formatNumber value="${foo - ( foo % 1 ) }" var="fooAsInt" maxFractionDigits="0"/>

(really, this returns a string, representing the number without the decimals. But as EL automatically casts between strings, floats and integers, this is mostly OK.)

or you can hack it using fn:replace():

${fn:replace(foo - ( foo % 1 ),'.0','') }

(Yes, you may use singlequotes for strings in EL, even though this is supposed to be Java….)

 

 

 

설정

트랙백

댓글

isELIgnored=false - JSP

J/Jsp 2014. 3. 27. 15:23


출처 : http://www.okjsp.net/seq/157163

 

1. 모든 jsp 페이지에 isELIgnored를 붙인다.
<%@ page isELIgnored="false" contentType="text/html; charset=utf-8"%>

2. web.xml의 servlet 버젼을 올린다(2.4이상?).
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee " target="_blank">" target="_blank">http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

3. 이건 될지?.. 테스트 안해봤지만
web.xml에
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>

설정

트랙백

댓글


모델 JSP를 이용한 단순한 모델이다. 보통 처음 JSP를 배울때 사용하는 구조가 1구조이다.

웹브라우저의 요청이 곧바로 JSP에 전달된다. 즉 JSP페이지가 뷰(View)와 역할을 같이 하므로 모든 사용자의 요청의 진입점이 요청되는 JSP페이지가 된다.

- 장점

페이지 흐름으로 인해 개발 기간이 단축된다.

MVC 구조에 대한 교육이 필요없고 개발팀의 팀원의 수준이 높지 않아도 된다.

중소형 적합하다.

- 단점

웹 어플리 케이션이 복잡해질수록 유지 보수가 어렵다.

개발자 간의 원할한 의사소통이 필요하다.


출처 : http://rcn948.textcube.com/47

설정

트랙백

댓글

[출처] jotm을 이용한 transaction처리|작성자 바카디151



tomcat에서는 transaction이 지원이 안되기 때문에 별도의 라이브러리를 이용하여야 한다.

이때 사용되는 것이 jotm이다.

http://jotm.objectweb.org/

에서 다운받은다음에 jar 파일들을 add 시킨다.

이 때 설정해야 할 것이 있는데

톰캣의 트랜잭션을 jotm이 할 수 있도록 server.xml을 수정해야 한다.

그 이유는 server.xml에 각각 context (가상디렉토리)가 매핑되어 있기 때문이며

해당 프로젝트(context)에 아래의 내용을 추가하면 된다.

<Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>

 

설정

트랙백

댓글


  <filter>
    <description></description>
    <display-name> s-filter </display-name>
    <filter-name>s-filter</filter-name>
    <filter-class>myfilter.SimpleFilter</filter-class>
    <async-supported> true </async-supported>

  </filter>
  <filter-mapping>
    <filter-name>s-filter</filter-name>
    <url-pattern> /* </url-pattern>
  </filter-mapping>

설정

트랙백

댓글


출처 : http://gyrbsdl.springnote.com/pages/5308005?print=1


1. 플러그인 설치

Help > Install New Software 에서 Add버튼을 클릭하여 아래처럼 플러그인 주소를 넣는다.

Name : 프로퍼티 에디터

Location : http://propedit.sourceforge.jp/eclipse_plugins/ 또는 http://propedit.sourceforge.jp/eclipse/updates/

리스트 중 가장 하단의 PropertiesEditor > Properties Editor 5.3.3 (현재 최신 버전임) 선택 후 설치 진행

2. 설정

이클립스를 restart 하게 되면 Window > Preferences > General > Content Types 에서 오른쪽 리스트의 Text > Properties File 의

Default encoding이 (예전에 설정해뒀다면) 아무것도 없어서 기존의 properties 파일의 encoding이 전부 MS949로 바뀌어진다.

혹시 UTF-8로 설정해뒀었다면 한글이 깨져서 보이므로 원하는 encoding을 선택하고 update 한다.

Window > Preferences > General > Editors > File Associations 에서 *.properties의 Default Editor로 PropertiesEditor로 잡혀있다.

이것을 Text Editor로 바꾼다. (native2ascii를 원하는 properties 파일만 PropertiesEditor로 열면 됨)

3. 확인

native2ascii 를 실행할 파일에서 마우스 우클릭 메뉴중 Open With > PropertiesEditor를 선택한다.

입력할 때는 한글로 입력하고 저장하게 되면 유니코드로 자동 저장된다.

참고 -> http://blog.naver.com/tyboss?Redirect=Log&logNo=70070160574

설정

트랙백

댓글