As far as I know both tags import variables from tiles context to JSP so variables are made visible in the JSP. Please elaborate the difference between importAttribute and useAttribute.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Apparently there’s no difference between the two except that in
useAttributelets you specify the class name of the expected variable.Here’s the code for
importAttributetag:and the code for
useAttributetag: