This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set html page as a welcome page in netbeans

 
Arvind Kurmi
Greenhorn
Posts: 13
Firefox Browser Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whn i tried to set it it shows 404 error but with the index.jsp page it works properly
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arvind Kurmi
Greenhorn
Posts: 13
Firefox Browser Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
Firefox Browser Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take that file out of WEB-INF folder. And in you web.xml, defined it as,


 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
Firefox Browser Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are Welcome, no need of Sir here please!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic