Re: storing jsps in jars
Susan Conger wrote:
I am trying to come up with a solution for the following problem. I
am simplying the problem to make it presentable. Let say I have 5
customers and 20 jsp screens that have to be displayed. Customer 1
needs to be displayed the even screens (2, 4, 6, 8,...), customter 2
has to be displayed the odd screens (1, 3, 5, 7,...), customer 3 has
Define "customer?" Do you meant that each customer has a different web
app? So each of these is running in a separate context ("context" as in
web application, a root level context for the container).
Or do you mean one user of one web application? If this is the case,
I'd treat it similar to a search. User A does search A, he needs to see
pages A-D. User B does search B, he needs to see pages F-L. Store the
search results in a session for each user. When user A asks for his
"next" page, get the info from his session object. Ditto for user B.
Different sessions will allow you to display different pages for
different users.
For the first case (different web applications entirely), use an ANT
build script to compose ("compile") the web application from separate
JSP/Servlets. Compile to a single .jar. It kinda depends on the nature
of the pages if it makes sense to start with .jar and just include them
as libraries, or if you always compile everything from raw sources.