| Author |
Web Application Architecture
|
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
|
|
This is what I have designed. experts' input/feedback??
Where the stuff like Jsps,Images and JavaScript would go? Under WEB-INF?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
Why do all the packages not start with com.companyname.projectname?
Vishal Pandya wrote:Where the stuff like Jsps,Images and JavaScript would go? Under WEB-INF?
If your app is properly structured such that all requests go through servlet controllers, the under WEB-INF is a great place for the JSPs. That ensures that they cannot be directly addressed.
Images and JavaScript on the other hand, must be addressable by URL and cannot go under WEB-INF.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
|
|
Bear Bibeault wrote:Why do all the packages not start with com.companyname.projectname?
Do you mean resources should also be start with com.companyname.projectname?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
Are they on the classpath?
|
 |
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
|
|
Bear Bibeault wrote:Are they on the classpath?
Doesn't the whole source directory go to classpath? I didn't get you?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
Vishal Pandya wrote:
Bear Bibeault wrote:Are they on the classpath?
Doesn't the whole source directory go to classpath?
No, sources shouldn't even be part of the web app. The class files (along with the properties files) go on the classpath.
But with regards to the resources... The purpose of the package structure is to prevent naming collisions. By prefixing the packages with com.whatever.thisnthat you prevent collisions. What is preventing collisions for your resources?
|
 |
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
|
|
No, sources shouldn't even be part of the web app. The class files (along with the properties files) go on the classpath.
Yeah, I mean to convey that only. The whole resources package would be on classpath.
What is preventing collisions for your resources?
Ok, I got your point. So resources too start with com.whatever.thisandthat.
The purpose of the package structure is to prevent naming collisions.
Indeed.
Everything else is ok?
|
 |
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
|
|
Thanks Bear!
|
 |
 |
|
|
subject: Web Application Architecture
|
|
|