I am afraid I do not understand. Why are the two correlated?
Unless I am mistaken, servlet mapping is for
arriving at compact URLs for user convenience.
Why is this mandatory in order to specify
<init-parm>'s?
Thanks,
Rk
x77309
On Mon, 26 Feb 2001 10:58:44
Craig R. McClanahan wrote:
>
>
>S Ramakrishnan wrote:
>
>> Environment:
>> Tomcat 4.0 on NT4.0
>> Browser: IE5.5
>>
>> Problem:
>> I am unable to get <init-param> to work.
>> In my web.xml I have
>> <servlet>
>> <servlet-name>Quote</servlet-name>
>> <servlet-class>Quote</servlet-class>
>> <init-param>
>> <param-name>quotesFile</param-name>
>> <param-value>quotes.txt</param-value>
>> </init-param>
>> </servlet>
>>
>> The ServletContext in init() fetches null for
>> init-param "quotesFile". (I've tried restrating catalina).
>>
>
>For this to be recognized, you need to do two more things:
>
>* Establish a servlet mapping for your servlet:
>
> <servlet-mapping>
> <servlet-name>Quote</servlet-name>
> <url-pattern>/quote</url-pattern>
> </servlet-mapping>
>
>* Use this mapping in the URL that requests the servlet:
>
> http://localhost:8080/myapp/quote
>
>where "/myapp" is the context path of your web application.
>
>>
>> Could someone please give me an example of
>> storing and using resources (say, Files) in my
>> web application? I am not sure if I should put the file
>> in thge root of the web app or in the classes directory.
>>
>> Thanks,
>>
>> Rk
>> x77309
>>
>
>Craig McClanahan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>
>
Get your small business started at Lycos Small Business at
http://www.lycos.com/business/mail.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]