iframe의 서블릿 (JSP 페이지)에서 가져온 자바 객체를 표시 할 수 있습니까?자바 객체를 표시 할 때 iframe 문제가 발생합니다.
다음은 내가 시도한 것입니다. blob 형식으로 mysql 데이터베이스에 pdf 파일을 저장하고 있습니다. Hibernate bean 클래스에서 나는 해당 변수를 Byte []로 선언했다.
이제 iframe을 통해 개체를 표시하려고합니다.
<% String oid = null;
oid = request.getAttribute("oid").toString();
request.setAttribute("oid",oid);
%>
<jsp:useBean id="cusBean" class="com.zoran.action.CustomBean" scope="page" >
<jsp:setProperty name="cusBean" property="parentId" value="1" />
<jsp:setProperty name="cusBean" property="parentType" value="FILE" />
</jsp:useBean>
<iframe id="displayFrame" src="<%= cusBean.getFile() %>" width="1000" height="500" FRAMEBORDER="0" value="1"></iframe>
And custom bean is the java class where I'm running the hql script to return the blob data through cusBean.getFile().
내가이 일을 제대로 수행하고 있습니까? 어떻게 그 밖에 Iframe에서 자바 객체 변수를 인쇄 할 수 있습니까?
제발 나를 도와주세요.
감사합니다, 아 디트
고맙습니다. 그렇습니다. 그렇지만 동의합니다.
답변이 너무 길어서 의견에 맞지 않으므로 메시지를 수정했습니다. – BalusC
감사합니다. BalusC! 나는 그것을 시도 할 것이다. –