Re: Welcome file problem

2005-01-28 Thread Sebastian Hennebrueder
Normally I forward to an default action from the page 
xy.de/myProjekt/index.jsp

The index.jsp is in the Home directory and all other JSPs are located in 
a JSP directory which is protected. The home directory is not protected.

Regards
Sebastian Hennebrueder

http://www.laliluna.de
Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB
Erik Weber wrote:
I am restricting *.jsp in web.xml. ActionServlet is mapped to /foo/*.
I would like to use a welcome file so that a URL of http://host:port/app
will resolve to the index page. However, the index page is a JSP, so
it's not accessible directly. So basically what I need is a "welcome
file" that actually resolves to an unprotected Action mapping. Something
like this:
 
   /foo/index.html
 
. . .
 
   
 
How can I accomplish this (assuming no Apache Web Server in front)?
Thanks,
Erik

-
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: Welcome file problem

2005-01-27 Thread Erik Weber
Kishore, thanks a lot for your help.
Interestingly, the problem was only that I had "/foo/index.html" instead 
of "foo/index.html" as my welcome file entry. After I removed the 
beginning forward slash as you suggested, it worked (without the need 
for the dummy file -- I did not encounter the 404). This is with Tomcat 
5.0.27.

Thanks again,
Erik

Kishore Senji wrote:
On Thu, 27 Jan 2005 18:54:26 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
 

I am restricting *.jsp in web.xml. ActionServlet is mapped to /foo/*.
I would like to use a welcome file so that a URL of http://host:port/app
will resolve to the index page. However, the index page is a JSP, so
it's not accessible directly. So basically what I need is a "welcome
file" that actually resolves to an unprotected Action mapping. Something
like this:

  /foo/index.html

. . .

  

How can I accomplish this (assuming no Apache Web Server in front)?
   

What you have setup should work except that if the welcome-file is not
an actual file, then the server will issue a 404. The work around is
to have a dummy index.html file inside "foo" folder (for your setup,
it's foo/index.html) so that the server is happy and it tries to serve
foo/index.html but the request is instead served by the ActionServlet
(/foo/*) and your /index.jsp will be shown.
Note that the welcome-file should not start or end with a "/". Making
your welcome-file to foo/index.html and have a dummy index.html inside
foo folder should work
 

Thanks,
Erik
-
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]
 

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


Re: Welcome file problem

2005-01-27 Thread Kishore Senji
On Thu, 27 Jan 2005 18:54:26 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> I am restricting *.jsp in web.xml. ActionServlet is mapped to /foo/*.
> 
> I would like to use a welcome file so that a URL of http://host:port/app
> will resolve to the index page. However, the index page is a JSP, so
> it's not accessible directly. So basically what I need is a "welcome
> file" that actually resolves to an unprotected Action mapping. Something
> like this:
> 
>  
>/foo/index.html
>  
> 
> . . .
> 
>  
>
>  
> 
> How can I accomplish this (assuming no Apache Web Server in front)?
> 

What you have setup should work except that if the welcome-file is not
an actual file, then the server will issue a 404. The work around is
to have a dummy index.html file inside "foo" folder (for your setup,
it's foo/index.html) so that the server is happy and it tries to serve
foo/index.html but the request is instead served by the ActionServlet
(/foo/*) and your /index.jsp will be shown.

Note that the welcome-file should not start or end with a "/". Making
your welcome-file to foo/index.html and have a dummy index.html inside
foo folder should work

> Thanks,
> Erik
> 
> -
> 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]



Welcome file problem

2005-01-27 Thread Erik Weber
I am restricting *.jsp in web.xml. ActionServlet is mapped to /foo/*.
I would like to use a welcome file so that a URL of http://host:port/app
will resolve to the index page. However, the index page is a JSP, so
it's not accessible directly. So basically what I need is a "welcome
file" that actually resolves to an unprotected Action mapping. Something
like this:
 
   /foo/index.html
 
. . .
 
   
 
How can I accomplish this (assuming no Apache Web Server in front)?
Thanks,
Erik

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