Chhotisiaasha's Blog

Archive for the ‘Struts2’ Category

There should be a PropertyHolder class

public class PropertyHolder {

String udiBaseURL;

public String getUdiBaseURL() {
return udiBaseURL;
}

public void setUdiBaseURL(String udiBaseURL) {
this.udiBaseURL = udiBaseURL;
}

}

And in applicaiton.properties file,

//entries for all properties

udi.viewer.url.base=http://udiviewer.qa.pwj.com

Then, In applicationContext.xml make an entry for the class and property file like below:

<bean id=”propertyConfigurer”>
<property name=”location” value=”/WEB-INF/application.properties” />
</bean>

<!– Local Data Holder –>
<bean id=”propertyHolder”>
<property name=”udiBaseURL” value=”${udi.viewer.url.base}” />
</bean>

thats it!!!

One possible solution is

“Application servers >=server1 > Web container > Custom Properties”

create the following custome property with its value set to true

[com.ibm.ws.webcontainer.invokefilterscompatibility].

<action name=”GenDirLetterAction” method=”genDirLetter” class=”generateLettersAction”>
<result type=”stream”>
<param name=”contentType”>application/pdf</param>
<param name=”inputName”>inputStream</param>
<param name=”contentDisposition”>attachment;filename=”document.pdf”</param>
<param name=”bufferSize”>1024</param>
</result>
</action>