How to specify a servlet as a main page
Hi all, Until now I have been using a boot.jsp page as the main entry point to my application. But now I have changed it to a servlet. On the web.xml I have made a servlet mapping, servlet servlet-nameboot/servlet-name servlet-classcom.testing.es.start.Boot/servlet-class /servlet servlet-mapping servlet-nameboot/servlet-name url-pattern/start/url-pattern /servlet-mapping the if I write http://localhost/context/start it goes to this servlet. I would like that whenever the user writes http://localhost/context it is redirected to the boot servlet. I have tried it by putting a servlet mapping only with / but it does not work. I have tried also with the welcome-file-list welcome-file-list welcome-fileboot/welcome-file /welcome-file-list and it does not work. How should I do it? Thanks
RE: How to specify a servlet as a main page
You might try putting a jsp page called default.jsp in the root of you web application. Just put the following lines in the default.jsp. jsp:forward page="start"/ -Original Message- From: Ismael [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 9:26 AM To: Orion-Interest Subject: How to specify a servlet as a main page Hi all, Until now I have been using a boot.jsp page as the main entry point to my application. But now I have changed it to a servlet. On the web.xml I have made a servlet mapping, servlet servlet-nameboot/servlet-name servlet-classcom.testing.es.start.Boot/servlet-class /servlet servlet-mapping servlet-nameboot/servlet-name url-pattern/start/url-pattern /servlet-mapping the if I write http://localhost/context/start it goes to this servlet. I would like that whenever the user writes http://localhost/context it is redirected to the boot servlet. I have tried it by putting a servlet mapping only with / but it does not work. I have tried also with the welcome-file-list welcome-file-list welcome-fileboot/welcome-file /welcome-file-list and it does not work. How should I do it? Thanks
SV: How to specify a servlet as a main page
Title: SV: How to specify a servlet as a main page As far as I know, it is simply not possible to have welcome-file-list welcome-file{file-spec}/welcome-file /welcome-file-list {file-spec} be something other than a HTML or JSP page. The reason for this I've heard is that some people just do not want this functionality. Don't ask me why. regards, Patrik Andersson
RE: How to specify a servlet as a main page
I think to do this you would need to have an index.jsp and configured web.xml's "Welcome.." entry to recognise it. Then simply forward or redirect within index.jsp. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Johnson, Robert Sent: Tuesday, April 03, 2001 9:11 AM To: Orion-Interest Subject: RE: How to specify a servlet as a main page You might try putting a jsp page called default.jsp in the root of you web application. Just put the following lines in the default.jsp. jsp:forward page="start"/ -Original Message- From: Ismael [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 9:26 AM To: Orion-Interest Subject: How to specify a servlet as a main page Hi all, Until now I have been using a boot.jsp page as the main entry point to my application. But now I have changed it to a servlet. On the web.xml I have made a servlet mapping, servlet servlet-nameboot/servlet-name servlet-classcom.testing.es.start.Boot/servlet-class /servlet servlet-mapping servlet-nameboot/servlet-name url-pattern/start/url-pattern /servlet-mapping the if I write http://localhost/context/start it goes to this servlet. I would like that whenever the user writes http://localhost/context it is redirected to the boot servlet. I have tried it by putting a servlet mapping only with / but it does not work. I have tried also with the welcome-file-list welcome-file-list welcome-fileboot/welcome-file /welcome-file-list and it does not work. How should I do it? Thanks
Re: How to specify a servlet as a main page
I think you need to map your servlet to the url "/", and handle from there. tim. Hi all, Until now I have been using a boot.jsp page as the main entry point to my application. But now I have changed it to a servlet. On the web.xml I have made a servlet mapping, servlet servlet-nameboot/servlet-name servlet-classcom.testing.es.start.Boot/servlet-class /servlet servlet-mapping servlet-nameboot/servlet-name url-pattern/start/url-pattern /servlet-mapping the if I write http://localhost/context/start it goes to this servlet. I would like that whenever the user writes http://localhost/context it is redirected to the boot servlet. I have tried it by putting a servlet mapping only with / but it does not work. I have tried also with the welcome-file-list welcome-file-list welcome-fileboot/welcome-file /welcome-file-list and it does not work. How should I do it? Thanks
RE: How to specify a servlet as a main page
Title: SV: How to specify a servlet as a main page The simple solution is to write a simple JSP page and have it forward to your servlet. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Patrik AnderssonSent: Tuesday, April 03, 2001 10:57 AMTo: Orion-InterestSubject: SV: How to specify a servlet as a main page As far as I know, it is simply not possible to have welcome-file-list welcome-file{file-spec}/welcome-file /welcome-file-list {file-spec} be something other than a HTML or JSP page. The reason for this I've heard is that some people just do not want this functionality. Don't ask me why. regards, Patrik Andersson
RE: How to specify a servlet as a main page
You have to put additional line as : load-on-startup10/load-on-startup into paragraph: servlet servlet-nameboot/servlet-name servlet-classcom.testing.es.start.Boot/servlet-class load-on-startup10/load-on-startup /servlet Hope this help -Original Message- From: Ismael [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 9:26 AM To: Orion-Interest Subject: How to specify a servlet as a main page Hi all, Until now I have been using a boot.jsp page as the main entry point to my application. But now I have changed it to a servlet. On the web.xml I have made a servlet mapping, servlet servlet-nameboot/servlet-name servlet-classcom.testing.es.start.Boot/servlet-class /servlet servlet-mapping servlet-nameboot/servlet-name url-pattern/start/url-pattern /servlet-mapping the if I write http://localhost/context/start it goes to this servlet. I would like that whenever the user writes http://localhost/context it is redirected to the boot servlet. I have tried it by putting a servlet mapping only with / but it does not work. I have tried also with the welcome-file-list welcome-file-list welcome-fileboot/welcome-file /welcome-file-list and it does not work. How should I do it? Thanks