Powered by Syntax Highlighter scripts!

Head to Head with < c : import >

Well today its tough time with the <c:import> tag of jstl.
I need to assign a dynamic value to the url attribute of tag and i constantly kept on getting the error "This attribute does not support request time values" from the JSP. Compilation of the jsp file is failing as it expects the url attribute to be assigned a value at compile time itself, which is ridiculus and against our requirement.

Well our friend Google is always there to point out to the solution and I got this url from the springframework forums which solved the issue

The reason behind the error is that the servlet 2.4 deployment descriptor which uses JSP 2.0 built-in EL has problems interacting with JSTL 1.0 tag library and mixes well with JSTL 1.1 tag library.

Thanks to mks99, though the form shows he is a Junior member, he is really time-saver for me today!!!


1 comment:

Naga D Nookala said...

Some more to add to this post.
Though the original problem is solved, the File not found problem kept on bugging. we saw that the file is in the right path. The tricky thing is that "*.html" requests are routed to the Spring Dispatcher servlet. Spring dispatcher servlets does not have entry for the test.html that we are loding dynamically. So For testing we renamed the file as 'test.htm' and then the file got imported successfully.
When a file is to be included dynamically using c:url check that you do not have any url mapping entries in web.xml or other configuration files like spring and urlrewrite configuration if you are using.