aspose file tools*
The moose likes Servlets and the fly likes how to read context from outside file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

how to read context from outside file.

nitin namdev
Greenhorn

Joined: Mar 25, 2011
Posts: 5

g
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
This sounds like bad design. Why should web app 2 depend on web app 1's init parameters instead of using its own?

If web app 1 has something that web app 2 needs, then it could provide an HTTP interface (think REST), properly authenticated of course.


Ping & DNS - my free Android networking tools app
nitin namdev
Greenhorn

Joined: Mar 25, 2011
Posts: 5

l';
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
That can't be a requirement, because it is an implementation detail. It would help if you told us what the functional need is that prompted this question.

There are any number of ways to share data between applications; reading each other's init files, and changing those (as you now suggest) is one of the worst.
nitin namdev
Greenhorn

Joined: Mar 25, 2011
Posts: 5

g

Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
First off, web.xml is application-specific, not user-specific. So it really has no role in any of this.

It sounds as if the SSO component -whichever that is- should be able to propagate the login and user information across all web apps. After all, if it can't do that, what is its use?
nitin namdev
Greenhorn

Joined: Mar 25, 2011
Posts: 5

Thanks Ulf Dittmer
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
but another way instead of set email address comes from SSO login page at webapp3 in CATALINA_HOME/conf/web.xml. it may be good idea as all application has access of it,

With all due respect, it is a terrible idea, for multiple reasons; let's just forget about it.

If you can suggest different approach please suggest..

I already suggested a REST service for communicating between web apps. Another approach might be a shared database. But it still sounds as if the SSO subsystem should be able to handle any number of web apps. Or are you saying that the web app that needs this data is NOT governed by the SSO solution? Or that the user will not actually log into the web app that needs this data?
nitin namdev
Greenhorn

Joined: Mar 25, 2011
Posts: 5

" reading each other's init files"

is a way you just suggested to me .


how is possible ? can you suggest me a proper link which is describing this ?


Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61417
    
  67

As you have gone an edited your previous posts to be nonsense, it's impossible to offer any further aid. I'm closing this topic. Please open a new topic with the information needed to answer your question, and please do not remove that information at a later time.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read context from outside file.