Re: servlet mapping and url

2005-07-06 Thread David Smith
This trick isn't necessary in Tomcat 5.x and servlet spec 2.4.  Welcome 
files as listed in the web.xml are each appended to the remote user's 
request and the result is processed until it resolves to a servlet or file.


--David

Geiglein, Gary wrote:


If you create a file in the root of the context (any file, could be an
empty file, it just needs to show up in a directory listing) then map
your servlet to the same URL you would use to reference the file, then
add the file to the welcome-file-list and it will work.

Tomcat will not forward to a welcome file unless it shows up in the
directory. But once you map the servlet to the same URL, the servlet
will intercept the request.

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 02, 2005 9:25 AM

To: Tomcat Users List
Subject: Re: servlet mapping and url

Hi,

I don't think there is any restriction to mapping a servlet to a welcome

page:


MyServlet 
com.company.app.MyServlet



MyServlet
/myServlet


/myServlet


Also, I'm not as sure, put I think just mapping the servlet to / will do

the trick as well.  Both are easy enough to test though, give it a shot 
and post back your results for the archives.


Frank

s s wrote:
 


i want to invoke a servlet using url like http://localhost:8080 only

i have done it using http://localhost:8080/index.html where index.html
   


is a servlet. Is it possible to load this servlet as a default just like
a default web page. The point is i want a servlet to recieve a request
when url http://localhost:8080 is referenced i.e without the servlet
name.
 



is it possible?





-
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
   



 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: servlet mapping and url

2005-07-06 Thread Geiglein, Gary
If you create a file in the root of the context (any file, could be an
empty file, it just needs to show up in a directory listing) then map
your servlet to the same URL you would use to reference the file, then
add the file to the welcome-file-list and it will work.

Tomcat will not forward to a welcome file unless it shows up in the
directory. But once you map the servlet to the same URL, the servlet
will intercept the request.

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 02, 2005 9:25 AM
To: Tomcat Users List
Subject: Re: servlet mapping and url

Hi,

I don't think there is any restriction to mapping a servlet to a welcome

page:


MyServlet 
com.company.app.MyServlet


MyServlet
/myServlet


/myServlet


Also, I'm not as sure, put I think just mapping the servlet to / will do

the trick as well.  Both are easy enough to test though, give it a shot 
and post back your results for the archives.

Frank

s s wrote:
> i want to invoke a servlet using url like http://localhost:8080 only
>  
> i have done it using http://localhost:8080/index.html where index.html
is a servlet. Is it possible to load this servlet as a default just like
a default web page. The point is i want a servlet to recieve a request
when url http://localhost:8080 is referenced i.e without the servlet
name.
>  
> is it possible?
>  
>  
> 
> 
>   
> -
> Yahoo! Mail Mobile
>  Take Yahoo! Mail with you! Check email on your mobile phone.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet mapping and url

2005-07-02 Thread Frank W. Zammetti

Hi,

I don't think there is any restriction to mapping a servlet to a welcome 
page:



MyServlet 
com.company.app.MyServlet



MyServlet
/myServlet


/myServlet


Also, I'm not as sure, put I think just mapping the servlet to / will do 
the trick as well.  Both are easy enough to test though, give it a shot 
and post back your results for the archives.


Frank

s s wrote:

i want to invoke a servlet using url like http://localhost:8080 only
 
i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name.
 
is it possible?
 
 




-
Yahoo! Mail Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: servlet mapping and url

2005-07-02 Thread Hardik Tank
you can configure your web.xml file and make index.jsp
file as an welcome file using,


index.jsp


now, create index.jsp file which will simply forward
the request to your servlet!

Rgds,
Hardik

--- s s <[EMAIL PROTECTED]> wrote:

> i want to invoke a servlet using url like
> http://localhost:8080 only
>  
> i have done it using
> http://localhost:8080/index.html where index.html is
> a servlet. Is it possible to load this servlet as a
> default just like a default web page. The point is i
> want a servlet to recieve a request when url
> http://localhost:8080 is referenced i.e without the
> servlet name.
>  
> is it possible?
>  
>  
> 
> 
>   
> -
> Yahoo! Mail Mobile
>  Take Yahoo! Mail with you! Check email on your
> mobile phone.




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



servlet mapping and url

2005-07-02 Thread s s
i want to invoke a servlet using url like http://localhost:8080 only
 
i have done it using http://localhost:8080/index.html where index.html is a 
servlet. Is it possible to load this servlet as a default just like a default 
web page. The point is i want a servlet to recieve a request when url 
http://localhost:8080 is referenced i.e without the servlet name.
 
is it possible?
 
 



-
Yahoo! Mail Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.