| Author |
Customize Login Page Based on Url in J2ee Application
|
Arulanand Dayalan
Ranch Hand
Joined: Aug 10, 2005
Posts: 124
|
|
Hi,
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?
Thanks in Advance.
Regards,
Arul.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
|
well, so far what you are tried?
|
 |
Sean Clark
Rancher
Joined: Jul 15, 2009
Posts: 377
|
|
So what you are actually looking to do is to load a different CSS depending on what url was accessed then?
It's possible.
Sean
|
I love this place!
|
 |
Arulanand Dayalan
Ranch Hand
Joined: Aug 10, 2005
Posts: 124
|
|
Sean Clark wrote:So what you are actually looking to do is to load a different CSS depending on what url was accessed then?
It's possible.
Sean
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"
Regards,
Arul.
|
 |
krishna bala
Ranch Hand
Joined: Jul 20, 2009
Posts: 48
|
|
ciao
create table in DB like product_info with the fields like product_id , product_name , product_xml
product.xml contains information about css, logo , menu etc.
get the product name from request then
in filter you will get the xml from DB by passing product name , send required information to jsp .
|
 |
 |
|
|
subject: Customize Login Page Based on Url in J2ee Application
|
|
|