• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where ?

 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)Where would you put the servlet that is meant to be a part of the defult web-application of the container?
2) In a distributed environment, the default ServletContext is .(an adjective). and must only exist in .?. VM.

Here you go...
[ February 05, 2002: Message edited by: ersin eser ]
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First Q2 - In a distrubuted container, the default ServletContext is non-distributable and must only exist on one VM. (SRV3.1)
Second Q1 - (I think the question is worded somewhat ambiguously, but/so ...) - the answer is:
../WEB-INF
the actual path being container and/or installation dependent.

Ersin - what are you thinking with Q1?
Regards, Guy
[ February 05, 2002: Message edited by: Guy Allard ]
 
Srini Admala
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1: I think the default Servlet should be under ROOT/WEB-INF.
Q2: There's one ServletContext per JVM even in the case of distributed application. Can't think of any reason to point one as default. enlighten me
-Srini
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q 1 is ambiguous to me too.
Having said that, WEB-INF wouldn't be the answer.
If anything it should be WEB-INF/classes/ directory. Why would you put a Servlet in the WEB-INF dir...
- satya
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the default web-app?
I mean, I only know the welcome page you can specify in (was it web.xml or server.xml) in config directory.
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1
I read something like " a servlet that is not a part of a web application will become a part of default web-application"
Now I don't think that a servlet just floats around it is a file and has to reside somewhere.
And it is a part of that folder's parent web-app.
any ideas ?
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Re: Q2 - Well notice I did not say WEB-INF, but rather "dot-dot-slash-WEB-INF".
ersin, where is that quote from please?
Re: Q1 - my quote is directly from the specs.
Guy
[ February 06, 2002: Message edited by: Guy Allard ]
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
quote from....? I read so much material I can't even remember. I think it was from JWeb+ explanations ( but they usually quote from specs )
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guy:
Did you just mixup your Q1 and Q2 in the previous post or did I have too much coffee...
ersin:
The quote Guy made earlier (first reply) for Q2 is on page 27 (last sentence of the page) section SRV.3.2
Also, my confusion re the default webapp comes from the fact that this is different for different app servers. Maybe for Tomcat it is webapps/ROOT.
regds.
- satya
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can you not deploy a servlet as a part of web application ?
Put it directly in under /webapps/ folder ?
OK I think that I should stop this non sense.
Specification related readings:
I only read page 27 last sentence , page 70 the table and page 82 # 2 under Roles which convinced me to stop reading it: I believe that someone was writing these stuff while s/he was gargling.
I will take this exam without reading the spec. Enough reading, I like to play around with the code.
[ February 06, 2002: Message edited by: ersin eser ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic