Note that there are some explanatory texts on larger screens.

plurals
  1. PORun JSF project on Apache Tomcat
    text
    copied!<p>How can lunch JSP project on Tomcat? I copy <code>WebContent</code> folder to <code>webapp</code> folder of Apache but it can't find my jsp page, but if I change jsp to jsf (index.jsf) works fine. How can I solve this problem?</p> <p>web.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt; &lt;display-name&gt;Graph&lt;/display-name&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;servlet&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;context-param&gt; &lt;param-name&gt;javax.servlet.jsp.jstl.fmt.localizationContext&lt;/param-name&gt; &lt;param-value&gt;resources.application&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;description&gt;State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2&lt;/description&gt; &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt; &lt;param-value&gt;client&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;description&gt; This parameter tells MyFaces if javascript code should be allowed in the rendered HTML output. If javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters will be added as url parameters. Default is 'true'&lt;/description&gt; &lt;param-name&gt;org.apache.myfaces.ALLOW_JAVASCRIPT&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;description&gt; If true, rendered HTML code will be formatted, so that it is 'human-readable' i.e. additional line separators and whitespace will be written, that do not influence the HTML code. Default is 'true'&lt;/description&gt; &lt;param-name&gt;org.apache.myfaces.PRETTY_HTML&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;org.apache.myfaces.DETECT_JAVASCRIPT&lt;/param-name&gt; &lt;param-value&gt;false&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;description&gt; If true, a javascript function will be rendered that is able to restore the former vertical scroll on every request. Convenient feature if you have pages with long lists and you do not want the browser page to always jump to the top if you trigger a link or button action that stays on the same page. Default is 'false' &lt;/description&gt; &lt;param-name&gt;org.apache.myfaces.AUTO_SCROLL&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;servlet&gt; &lt;servlet-name&gt;faces&lt;/servlet-name&gt; &lt;servlet-class&gt;org.apache.myfaces.webapp.MyFacesServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet&gt; &lt;servlet-name&gt;UploadServlet&lt;/servlet-name&gt; &lt;servlet-class&gt;controler.UploadServlet&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;faces&lt;/servlet-name&gt; &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;faces&lt;/servlet-name&gt; &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;UploadServlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/Upload&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;listener&gt; &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;/web-app&gt; </code></pre> <p>Error: type Status report</p> <blockquote> <p>message /Graph/index.jsp</p> <p>description The requested resource (/Graph/index.jsp) is not available.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload