storing jsps in jars

S

Susan Conger

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
to be displayed screens 1-10, customer 4 has to be displayed screens
11-20 and finally customer 5 needs all the screens.

What I would like to do is build a separate jar file for each
configuration and load it and run it when the program starts up. How
would I do this with jsp. So I would want a even.jar, odd.jar,
first_ten.jar, last_10.jar and all.jar. I would want all of the
resources in the jar and for them to be avialable. It would be even
better if say customer 1 needs even and first_ten.jar so that the last
jar loaded takes presedence and would pull from it before it went to
previously loaded jars.

If anyone knows the best way to solve this issue please let me know.
Also if you have a code snippets would be greatly appreciated. This
seems like a problem that should have been solved in a very straight
forward way. I have just not been able to find the solution.

Thanks,
Susan Conger
 
M

Mark Space

Susan said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top