This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to customize pages in an J2ee web application(Struts) so that it can support different products. Example of customization - Different look and feel(Images/Css) , Hide columns and different Login pages based on the products. When the user types in http://localhost:9080/TestApp/ProductA then customized login page for ProductA should appear. Once the user logins then all the pages need to be customized for ProductA. This customization can be done if we identify the product. The problem i am facing is how to identify the product based on the URL.
When the user types in http://localhost:9080/TestApp/ProductA i need find out its for ProductA then forward to login JSP. In that jsp i can have hidden variable with product as ProdctA.After this its not problem. Is there any way to do it?
So what you are actually looking to do is to load a different CSS depending on what url was accessed then?
I love this place!
Joined: Aug 10, 2005
Sean Clark wrote:So what you are actually looking to do is to load a different CSS depending on what url was accessed then?
Loading different CSS is possible and i am able to do that. In my welcome pagelist i have login.jsp. The problem i am facing is, identifying ProductA from the url and setting it in the request before passing to login.jsp. I thought of using filter, but don't know how to get the ProductA in the filter.
For applying CSS i can do like this, src="css/"+<%= product >+"/style.css"