jsp - Setting a default value to a param in s:include -


I am writing a small widget in struts, which I want to include. As long as I do not have an altitude of altitude, the height of the widget should be automatically For example:

  # Example 1: & lt; S: Include value = "myWidget.jsp" & gt; & Lt; S: Ultimate name = "height" & gt; 300px & lt; / S: Ultimate & gt; & Lt; / S: Included & gt; # Example 2: & lt; S: Include value = "myWidget.jsp" & gt; & Lt; / S: Included & gt;  

Inside myWidget.jsp, I can reach the height of the value by using $ {param.height}. But if I do not pass the altitude altogether, then it remains simple. I want to explicitly set the value to "auto", how can I do this?

You can use it in the original tag.

  & lt; C: Out value = "$ {param.height}" default = "auto" />  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -