On Thu, 22 Nov 2001, rubisd wrote:

> Hey!
>
> I checked the spec. and did not find any words that indicate
> that servlet mappings are required.
[ ... ]

This is correct, servlet mappings are not required.


> Since sevlet mapping is optional, and you can call the servlet
> by-name, like
>
> .../webappname/servlet/servletname

To be clear, servletname is as specified in the servlet defintion.


> it seems logical to me that by default, one should be able to access
> servlet parameter someParam, i.e., getInitParameter().  But this is
> not the case.

It should be (at least, it's worked for me :-).


> This may be implementation specific?  I have not tried it with
> TomCat though.
[ ... ]

What did you try it with?  I've done it before, with Tomcat.  It looks
like the servlet defintion you gave is OK, at least, it's the same
format as what I've used.


> I can guess what is happening in the code, but I haven't looked yet.
> Web.xlm gets parsed and if it does not see a servlet mapping element
> then it skips the process for changing the properties file.
>
> I suggest, don't skip this process.
>
> Anyone agree?

Well, I agree with your analysis of what should happen, but I disagree
with your conjecture as to what is happening.  This is basic stuff (in
terms of the servlet container needing to get it right), so if it
weren't working, I'm sure there'd be a lot of noise about it.  I'm
guessing that there is something that you don't have right in your
web.xml, in how you're calling the servlet (i.e. the URL), or in the
code you're using to get the parameter.  Maybe if you showed all of
that (to the list), someone might be able to see what the problem is.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to