in Education by
This question already has answers here: Set default home page via in JSF project (3 answers) Closed 5 years ago. I'm trying to let a welcome page displaying after running a dynamic web project. When googling I found a lot of tutorials but I can't found the solution. I share: The structure of my project (I want that the page welcome.xhtml will displayed by default). The file web.xml is: <?xml version="1.0" encoding="UTF-8"?> HiSpring welcome.xhtml State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2 javax.faces.STATE_SAVING_METHOD client javax.servlet.jsp.jstl.fmt.localizationContext resources.application com.sun.faces.config.ConfigureListener Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet /faces/* Run code snippetExpand snippet Once clicking on HiSpring > Run As > Run on Server, I should have This url: http://localhost:8080/HiSpring/faces/welcome.xhtml. However, I got http://localhost:8080/HiSpring/. Could you please tell me what I missed; Thanks in advance. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
According to your web.xml tomcat would look for /welcome.xhtml and has no clue that this might be in /faces/welcome.xhtml. The URL is fine (if welcome.xhtml is in /) There might be a more elegant JSF version (I'm not much of a JSF guy) - some possible solutions that come to my mind would be map the faces servlet to *.xhtml do remove the /faces/ part from path (you judge if this is proper JSF - comment if it's not and I'll remove this part) create a separate explicit redirection, e.g. through a (stupidly simple) index.html (of course, declare index.html as another welcome file) like the following sample: Redirection <!-- 2 means 2 seconds delay. Change as you like -->

redirecting to application. Click here if it doesn't work

Related questions

0 votes
    I need to work with an ajax powered web page so I can pass an id or ids in the URL and it ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Sun also has the Hadoop Live CD ________ project, which allows running a fully functional Hadoop cluster using a live CD. 1. OpenOffice.org 2. OpenSolaris 3. GNU 4. Linux...
asked Dec 6, 2022 in Education by JackTerrance
0 votes
    I have a web page that accepts an excel file, reads data from it and stores it in a buffer table ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 30, 2022 in Education by JackTerrance
0 votes
    numbers. 4. (a) When running a particular program with N memory accesses, a computer with a cache and paged ... the system ? cribe Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    After I added some .png files into my Project Workspace drawable folder I refreshed my drawable folders in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    If you are running a web application or a user is going to fill it out and query data, the best option is to ... . Health monitoring probes C. A load balancer D. A traffic manager...
asked Nov 21, 2022 in Education by JackTerrance
0 votes
    A __________ is a program running on the server machine, which accepts requests from a Web ... Fundamentals in division Database Programming Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    A _________ role is a virtual machine instance running the Microsoft IIS Web server that can accept and respond to HTTP or HTTPS requests. 1) Web 2) Server 3) Worker 4) Client...
asked Dec 23, 2020 by JackTerrance
0 votes
    What are the characteristics of web project in web development? Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    Which of the following project is used for calling R products from web? (a) OpenCPU (b) OpenDisk (c) ... questions and answers pdf, Data Science interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    This question already has an answer here: Object.assign getters and setters in constructor (1 answer) Closed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    This question already has an answer here: Object.assign getters and setters in constructor (1 answer) Closed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    $('#some-table').DataTable({ "language": { "url": "{{ asset('/js/plugins/lang.json') }} ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    $('#some-table').DataTable({ "language": { "url": "{{ asset('/js/plugins/lang.json') }} ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
...