Re: [Mav-user] Default page like index.m

2003-09-13 Thread Travis Reeder
Ya,

That's exactly what i have done.  I put a blank index.m file in my dir 
so tomcat picks it up too.  Thanks to the other person who responded a 
while back.

Travis

Doug Kirk wrote:
Hmmm.  I have the following in my web.xml and it works just fine:


  index.vm

*.vm is mapped to the VelocityLayoutServlet in my webapp's web.xml.

I would expect a specification of 'index.m' to work as well, since it's 
just running the servlet that's mapped to '*.m'. And after all, '*.jsp' 
is just a mapping to the JspServlet in the master web.xml in the Tomcat 
configuration.

So, in Tomcat (at least 4.1.24), I think setting the welcome file list 
in web.xml appropriately should work.

How can you set up the default page to work like index.jsp would 
without a browser redirect?

Travis




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]
.



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


Re: [Mav-user] Default page like index.m

2003-09-13 Thread Ted Husted
The welcome-file-list is just that, a list. The http server is suppose 
to run down the list, looking for each file, and the first one it find 
wins. If none of these are found in the file system, then it's 404. The 
servlet container portion of the code is not involved in any of this.

A index.vm is a physical file that the http server can see and select 
it, same as an index.jsp or an index.html. A index.m is not a physical 
file, as far as the http server is concerned it doesn't exist.

The underlying problem is that the serlvet container is an extension to 
http. The usual http rules are applied first, and then the servlet hands 
off to the container. In the case of the welcome page, if the 
welcome-file isn't there, the http rules say it should return 404.

I suppose the big solution would be for http servers to support a 
welcome-uri alternative that could be used instead of welcome-file-list, 
but it's not so hard to use a index.html to redirect to your usual 
welcome uri =:0)

-Ted.

Doug Kirk wrote:
Hmmm.  I have the following in my web.xml and it works just fine:


  index.vm

*.vm is mapped to the VelocityLayoutServlet in my webapp's web.xml.

I would expect a specification of 'index.m' to work as well, since it's 
just running the servlet that's mapped to '*.m'. And after all, '*.jsp' 
is just a mapping to the JspServlet in the master web.xml in the Tomcat 
configuration.

So, in Tomcat (at least 4.1.24), I think setting the welcome file list 
in web.xml appropriately should work.

How can you set up the default page to work like index.jsp would 
without a browser redirect?

Travis




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]
--
Ted Husted,
  Junit in Action  - ,
  Struts in Action - ,
  JSP Site Design  - .


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


Re: [Mav-user] Default page like index.m

2003-09-13 Thread Doug Kirk
Hmmm.  I have the following in my web.xml and it works just fine:


  index.vm

*.vm is mapped to the VelocityLayoutServlet in my webapp's web.xml.

I would expect a specification of 'index.m' to work as well, since it's 
just running the servlet that's mapped to '*.m'. And after all, '*.jsp' 
is just a mapping to the JspServlet in the master web.xml in the Tomcat 
configuration.

So, in Tomcat (at least 4.1.24), I think setting the welcome file list 
in web.xml appropriately should work.

How can you set up the default page to work like index.jsp would 
without a browser redirect?

Travis


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]


Re: [Mav-user] RE: Default page like index.m

2003-09-13 Thread Ted Husted
Ahh, well, it's not actually up to the container. The HTTP server 
resolves the welcome page before it ever gets to the servlet container, 
and there lies rub. =:(

Incidentally, if some of you received my original post on this thread 
twice, I apologize. I sent it yesterday, and when it never appeared, I 
sent it again, and now the first one has apparently surfaced. Ain't 
email grand =:)

-Ted.

Charles N. Harvey III wrote:
The ideal solution is the the servlet container would look through
the config file of the MVC controller you are using.  So, in web.xml
you would define index.m as the default page.  Then your container
would look at your maverick.xml file and find the mapping for index.m
that points to com.mycompany.project.HomeController.  Then you wouldn't
have to have an index.jsp/.vm/.html.
I'm not crazy, I realize how difficult that would be for the servlet
container.  So I would recommend to keep using index files in the top
level directory that point to the default servlet mapping.
Charlie

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ted Husted
Sent: Friday, September 12, 2003 10:23 AM
To: [EMAIL PROTECTED]
Subject: [Mav-user] RE: Default page like index.m
Here's a patch for the CVS FAQ regarding YAS:




A third solution is to use a HTML page to redirect to a servlet URI.





[Not sure if you can actually have a programlisting in a listitem or note.]

-Ted.



--
Ted Husted,
  Junit in Action  - ,
  Struts in Action - ,
  JSP Site Design  - .


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]