문제

It's possible to include javascript via outputScript tag from jsp which generate is? (contentType=application/javascript)

Or maybe there is another way to achieve localized javascript in facelets (best practice)?

도움이 되었습니까?

해결책

The <h:outputScript> doesn't support JSP/Facelets files, but only real plain .js files.

Your best bet is using "plain vanilla" <script> element.

<script src="#{request.contextPath}/resources/script.jsp"></script>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top