[Tomcat] Is this strucuture correct ?

L

Leny

Hi,

I'm trying to create an applicacion with several modules. I want
each to be able to be updated and deployed in a independent way. Right
now, I have the

following directories that show the approach I used:

-Application
- WEB-INF
- classes
- Module1
- Module2
- Module3
- etc.
- lib
- Module1
- Module2
- Module3
- etc.
- jsp
- Module1
- Module2
- Module3
- etc.
- includes
- Module1
- Module2
- Module3
- etc.


Since I'm new to jsp's and tomcat and I don't if this is correct.
Can a WAR file be created & deployed including *only* the dirs and
content named

"Module1" ? Is this organization correct for a single app with several
parts ?

Any help here would be really welcome. I've found a lot of info
about patterns and software design, but nothing to answer a question
like this.


Thanks in advance,

- Leny
 
C

Chris Smith

Leny said:
Hi,

I'm trying to create an applicacion with several modules. I want
each to be able to be updated and deployed in a independent way. Right
now, I have the following directories that show the approach I used:
[...]

Since I'm new to jsp's and tomcat and I don't if this is correct.
Can a WAR file be created & deployed including *only* the dirs and
content named "Module1" ? Is this organization correct for a single
app with several parts ?

There are a few problems.

1. The servlet framework is not designed to work in this way. For
example, if more than one of your modules contain servlets, then you'll
need to find a way to combine their respective servlet mappings into the
one web.xml file that needs to exist for the web application. You can't
provide multiple web.xml files.

2. The WEB-INF/lib directory is not searched recursively. All of your
libraries need to be directly in this directory, which means that you
can't separate them by module.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
J

Juha Laiho

(e-mail address removed) (Leny) said:
I'm trying to create an applicacion with several modules. I want
each to be able to be updated and deployed in a independent way. ....
Can a WAR file be created & deployed including *only* the dirs and
content named

To achieve what you're looking for you should divide each module
into a separate application. The fact that you're now keeping
them in a single app hints that they have something in common.
What do these modules share? Why are they packaged into a single
application?
 
?

=?iso-8859-1?q?Juan_Med=EDn_Pi=F1eiro?=

To achieve what you're looking for you should divide each module
into a separate application. The fact that you're now keeping
them in a single app hints that they have something in common.
What do these modules share? Why are they packaged into a single
application?

Basically there is a login system, and based on the user-s role one or
more modules are activated. Over time, more modules will be added to the
application.

I thought that since it-s a single application, it would not be a good
idea to create different application entry in tomcat for each of them.

- Leny
 
A

Andrea Polci

Juha Laiho said:
(e-mail address removed) (Leny) said:

To achieve what you're looking for you should divide each module
into a separate application. The fact that you're now keeping
them in a single app hints that they have something in common.
What do these modules share? Why are they packaged into a single
application?

I'm working on a similar scenario.

We have a single application composed of multiple modules sharing
functionality (classes) and data on the session context. We need to
have only one login for the entire application.

There are some dependencies between modules, but you can install only
a subset of them with different versions of each one.

We encounter the same problems posted by Leny and I think a bit
strange that there isn't a "standard", well documented approach to
them. May be there is one but I don't know about it ;-)

Andrea Polci
 
L

Leny

I'm working on a similar scenario.

We have a single application composed of multiple modules sharing
functionality (classes) and data on the session context. We need to
have only one login for the entire application.

There are some dependencies between modules, but you can install only
a subset of them with different versions of each one.

We encounter the same problems posted by Leny and I think a bit
strange that there isn't a "standard", well documented approach to
them. May be there is one but I don't know about it ;-)

Andrea Polci

That's exactly my situation. If you happen to find a solution, please, let me know.

Regards,

- Leny
 
S

Sudsy

Leny wrote:
That's exactly my situation. If you happen to find a solution, please, let me know.

Regards,

- Leny

Juha Laiho suggested a workable solution, namely breaking the modules
out into separate applications. The other half of the solution is
already a "standard", namely single-sign-on (SSO). The idea is that
each application uses a common login/validation class. Do the searches
and you should find both open-source and commercial products.
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top