How to pass Object using jsp:include param tag into another jsp

后端 未结 3 807
醉梦人生
醉梦人生 2021-02-07 03:59

I am trying to send DTO Object from one jsp to another jsp using jsp:include tag. But it is always treating it as String. I can\'t able to use DTO in my included jsp file.

3条回答
  •  鱼传尺愫
    2021-02-07 04:38

    So I have solved the issue by using tag file. I am no longer using jsp:include tag now because it will always send String Type.

    Here is a solution ..

    <%@ taglib prefix="cms2" tagdir="/WEB-INF/tags/spine/surgery"%>
      
          
    
    

    attributeSubFeatureRemove.tag file

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <%@ attribute name="attribute" required="true" type="com.medtronic.b2b.core.dto.HCCB2BClassificationAttributeDTO" %>
    <%@ taglib prefix="surgery" tagdir="/WEB-INF/tags/spine/surgery"%>               
    
        
            
               
                 
                 
              
             
            
         
    

    Here I am giving Type Attribute to access Object in tag file. And it works fine.

提交回复
热议问题