| Author |
how to set html page as a welcome page in netbeans
|
Arvind Kurmi
Greenhorn
Joined: Aug 30, 2010
Posts: 13
|
|
|
whn i tried to set it it shows 404 error but with the index.jsp page it works properly
|
Regards,
Arvind kurmi
http://www.technotut.com http://www.tutspoint.com
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
Welcome to JavaRanch!
In web application DD (web.xml), it's defined. Defaulty, in Netbeans, index.jsp is the welcome file. If you need to put your own file, change it.
|
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
|
 |
Arvind Kurmi
Greenhorn
Joined: Aug 30, 2010
Posts: 13
|
|
thanks for your reply
\web\WEB-INF\form.html when my file is in this directory it shows 404 error
why is it showing this error sir i wanna know that???
\web\form.html here it works properly.
whats the major difference??? sir do tell me.
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
You want to access form.html as the welcome page? Whatever, if you put your resource(here, form.html) in the WEB-INF directory, then it can't be accessed directly.
|
 |
Arvind Kurmi
Greenhorn
Joined: Aug 30, 2010
Posts: 13
|
|
yes i want form.html as my welcome page.
i cant access form.html in WEB-INF file directly.
so how can i able to access it if i want to use the form.html in WEB-INF and that form should be the welcome page.
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
Take that file out of WEB-INF folder. And in you web.xml, defined it as,
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
a jsp/html under WEB-INF, cannot access directly by a client. so you need to forward to this page in serverside.
1. place a file(index.jsp) under root directory. configure this page as welcome-file.
2. then forward to a file(home.jsp) , from index.jsp
Note: welcome file list can be configure in web.xml using <welcome-file-list> tag
hope this helps
|
 |
Arvind Kurmi
Greenhorn
Joined: Aug 30, 2010
Posts: 13
|
|
Thanks Abimaran Kugathasan
now its not showing 404 error it displays the page in browser
Thanks Seetharaman Venkatasamy
Offcourse sir this is helpful to me
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
You are Welcome, no need of Sir here please!
|
 |
 |
|
|
subject: how to set html page as a welcome page in netbeans
|
|
|