Grails GSP는 Geronimo에서 의도 된 HTML을 생성하지 않습니다
문제
Geronimo 2.1.4 (Jetty6, Javaee5)의 전쟁으로 Grails 1.1-M2 앱을 실행할 때 GSPS에서 생성 된 HTML에는 내 동적 컨텐츠가 포함되어 있지 않습니다.
구체적 으로이 GSP 스 니펫 :
<tr class="prop">
<td valign="top" class="name">
<label for="type">
<g:message code="album.type.label" default="Type" />
</label>
</td>
<td valign="top" class="value ${hasErrors(bean:albumInstance,field:'type','errors')}">
<g:select from="${AlbumType?.values()}" value="${albumInstance?.type}" name="type" ></g:select>
</td>
</tr>
... Geronimo에서 실행할 때이 HTML을 생성합니다.
<tr class="prop">
<td valign="top" class="name">
<label for="type">
Type
</label>
</td>
<td valign="top" class="value ">
<select name="type" id="type" ></select>
</td>
</tr>
... 그러나 'Grails Run-App'또는 'Grails Run-war'로 실행할 때 올바른 HTML이 생성됩니다.
<tr class="prop">
<td valign="top" class="name">
<label for="type">
Type
</label>
</td>
<td valign="top" class="value ">
<select name="type" id="type" >
<option value="EP" >EP</option>
<option value="LP" >LP</option>
<option value="SINGLE" >SINGLE</option>
</select>
</td>
</tr>
alludtype.groovy는 src/groovy에서 다음과 같이 정의됩니다.
public enum AlbumType {
EP,
LP,
SINGLE
}
성배 내의 모든 벌목을 켜고 오류 나 예외가 표시되지 않습니다. 이 문제는 Geronimo에서 Grails War를 운영하는 동안 만 볼 때 혼란 스럽습니다. 물론, 나는 다른 앱 서버를 시도하지 않았지만 'Grails Run-App'과 'Grails Run-war'와 함께 모든 것이 잘 작동한다는 것이 궁금합니다.
문제에 대한 아이디어가 있습니까?
해결책
기본 패키지에서 코드를 유지하고 좋은 패키지 구조에 넣는 것이 좋습니다. 나는 이것이 당신의 문제라고 생각합니다.
제휴하지 않습니다 StackOverflow