यह मेरा web.xml है:क्यों FacesServlet में/*। का यूआरएल-पैटर्न नहीं हो सकता है?
<servlet-mapping>
<servlet-name>Faces Servlet</servlet>
<url-pattern>/*</url-pattern>
</servlet-mapping>
जब मैं पर जाएँ:
http://localhost:8080/LearningRoot/
मैं:
http://localhost:8080/LearningRoot/index.xhtml
जब मैं करने के लिए नेविगेट मैं पृष्ठ देख सकते हैं ठीक है, तथापि त्रुटि प्राप्त करें:
An Error Occurred:
The FacesServlet cannot have a url-pattern of /*. Please define a different url-pattern.
लेकिन क्यों?
और ये मेरे स्वागत फ़ाइल है:
<welcome-file-list>
<welcome-file>/index.xhtml</welcome-file>
</welcome-file-list>
पर एक
.xhtml
मैपिंग का उपयोग आप /*.* –का प्रयास किया @ KeremBaydoğan आप यह एक वास्तविक जावा वेब अनुप्रयोग में कोशिश की थी? –
नहीं :) यह सिर्फ एक अनुमान था :) –