aspose file tools*
The moose likes Tomcat and the fly likes context JNDI issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "context JNDI issue" Watch "context JNDI issue" New topic
Author

context JNDI issue

Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
Hi
i have a webapplication packaged as MMI.war and in the context.xml i defined the context as MMI and have all the necessay parameters for JNDI lookup for mysql connection. i have one website by name www.somename.com which is mapped to public_html directory which is default in my server.xml and when i deploy MMI it goes under public_html/MMI
so when i tryp www.somename.com/MMI tomcat can find my JNDI configuration since it matches the context name and everything works.
Now the issue rises here. i registered onemore website www.somename2.com and mapped it to public_html/MMI. now when i type www.somewebsite2.com since the context is not MMI the JNDI look up doesnt work. Hope i made my point clear any help its a bit urgent. Should i change my context in context.xml file from MMS to www.somewesite2.com any help...
[ February 08, 2007: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Please read this with regards to using the term "urgent" in your posts.

I have removed it from the topic title for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
i think may be my question was not clesr.
let me put it this way.
i you have some datasource defintion in your context file like forexample

you are binding your databsource to a specific context so if a user types down something like http://somedomain1.com/MMI then i am able to find the context and hibernate is able to retrieve my datasource. till now i was using this pattern. but now the issue is i have mapped www.somedoman2.com to my MMI folder under my tomcat root. now there is no context like MMI.
i only type www.mydonmain2.com and hibernate is not able to find the context rightly since there is no MMI. i just need to know what should i give the context name in my context.xml file under META-INF.
Any help
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
Any body has any idea please...
Rashid
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
I am still waiting for some reply.
Still stuck up with this.
Rashid
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: context JNDI issue