• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Customize Login Page Based on Url in J2ee Application

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, so far what you are tried?
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Arulanand Dayalan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic