Fehler aufruf von Index.html

Status
Nicht offen für weitere Antworten.

mayer

Aktives Mitglied
Nach dem Login geh ich weiter auf die Index.html:

faces-config.xml:
...
<navigation-rule>
<from-view-id>/pages/Login.jsp</from-view-id>

<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/pages/Index.html</to-view-id>
</navigation-case>

</navigation-rule>
...

Index.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
<title>RDVi</title>
</head>
<frameset rows="130,*" border="0">
<frame src="Navigation.jsp" name="Menu" scrolling="no">
<frame src="Welcome.jsp" name="Pages">
</frameset>
</html>


Fehlermeldung:

-----------------------------------------------------------------------------------------
type Status report

message /pages/Index.jsp

description The requested resource (/pages/Index.jsp) is not available.
-----------------------------------------------------------------------------------------

Warum sucht er nach Index.jsp und nicht nach Index.html wie in der faces-config.xml angegeben?
Wenn ich anstatt einer .html Datei eine .jsp Datei nehme funktioniert das Programm.

Anmerkung:
Ich verwende Eclipse 3.0 und erstelle die Seiten mit dem FacesIDE-Plugin Version 0.1.8.


Kann mir jemand helfen?

Mfg manuel
 

Bleiglanz

Gesperrter Benutzer
einer der schrottigeren Fehler bei jsf

die urls werden "umgeschrieben"; aber das macht doch nix weil du ja genausogut index.jsp verwenden kannst?

(wenn du *.jsp auf das faces-servlet mappst, dann sollten besser ALLE in den navigation rules vorkommenden dateien jsp's sein)
 

mayer

Aktives Mitglied
Danke für deine Antwort.

Einfach statt .html - .jsp nehmen?

Geht in jsp-Seiten überhaupt das Frameset?


Stimmt es so ?

Index.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
<title>RDVi</title>
</head>
<frameset rows="130,*" border="0">
<frame src="Navigation.jsp" name="Menu" scrolling="no">
<frame src="Welcome.jsp" name="Pages">
</frameset>
</html>

Wenn ich es nämlich so mache meldet er mir folgenden Fehler:
---------------------------------------------------------------------------------
description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


root cause

java.lang.NullPointerException
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:646)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:254)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:90)
org.apache.jsp.pages.Welcome_jsp._jspx_meth_f_view_0(org.apache.jsp.pages.Welcome_jsp:99)
org.apache.jsp.pages.Welcome_jsp._jspService(org.apache.jsp.pages.Welcome_jsp:73)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java: 264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
---------------------------------------------------------------------------------

mfg manuel !!
 

Bleiglanz

Gesperrter Benutzer
komischer fehler,

aber mal was anderes: bei erfolgreichem Login willst du doch nicht das Frameset auswechseln?

eine jsf antwort ist immer im aktuellen Frame, und da drin willst du doch bestimmt nicht nochmal das frameset??


>>Geht in jsp-Seiten überhaupt das Frameset?

ja
 

mayer

Aktives Mitglied
Doch, denn nach der Login-Maske gelangt er ins eigentliche Programm.

Und im eigentlichen Programm ist ein Frame für das Menü und das andere Frame für das darstellen der Seiten die mittels
des Menüs ausgewählt werden können.

Mfg manuel
 

Bleiglanz

Gesperrter Benutzer
jetzt gibts 3 mögliche Fehlerquellen

die index.jsp (aber das kann nicht sein, wenn du nur die endung geändert hast)

Navigation.jsp

Welcome.jsp

worauf springt dein JSF-Servlet eigentlich an (jsp - das ist ok, oder /pages/, dann musst du uU Pfade anpassen)

schau mal ins logfile, vielleicht kann man dann den Grund für die Exception besser lokalisieren
 

mayer

Aktives Mitglied
Auszug faces-config.xml

<?xml version="1.0"?>

<!--
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
/WEB-INF/faces-config.xml
</param-value>
<description>
Comma separated list of URIs of (additional) faces config files.
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2
</description>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
<description>
State saving method: "client" or "server" (= default)
See JSF Specification 2.5.2
</description>
</context-param>

<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
<description>
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: "true"
</description>
</context-param>

<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
<description>
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: "false"

Setting this param to true should be combined with STATE_SAVING_METHOD "server" for
best results.

This is an EXPERIMENTAL feature. You also have to enable the detector filter/filter mapping below to get
JavaScript detection working.
</description>
</context-param>

<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
<description>
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: "true"
</description>
</context-param>

<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
<description>
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: "false"
</description>
</context-param>



<!--
<filter>
<filter-name>WelcomeFile Filter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.WelcomeFileFilter</filter-class>
<description>
Due to the manner in which the JSP / servlet lifecycle
functions, it is not currently possible to specify default
welcome files for a web application and map them to the
MyFacesServlet. Normally they will be mapped to the
default servlet for the JSP container. To offset this
shortcoming, we utilize a servlet Filter which examines
the URI of all incoming requests.
</description>
</filter>
-->









<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.

Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<!-- <init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/temp</param-value>
<description>Set the path where the intermediary files will be stored.
</description>
</init-param>-->
</filter>





<!--
<filter-mapping>
<filter-name>WelcomeFile Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->







<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>




<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>



<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>



<!--
<servlet>
<servlet-name>SourceCodeServlet</servlet-name>
<servlet-class>org.apache.myfaces.examples.servlet.SourceCodeServlet</servlet-class>
</servlet>
-->




<!--
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
-->


<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<!--
<servlet-mapping>
<servlet-name>SourceCodeServlet</servlet-name>
<url-pattern>*.source</url-pattern>
</servlet-mapping>
-->


<welcome-file-list>
<welcome-file>index.jsf</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>


</web-app>
 

mayer

Aktives Mitglied
Endlich, als ich gerade aufgeben wollte, hab ich die Lösung gefunden.
Man muss Index.jsf aufrufen anstatt Index.jsp.

Mfg manuel
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
D Fehler wegen Rest-Schnittstelle Allgemeines EE 4
A JPA Fehler beim JPA-Projekt Allgemeines EE 12
pkm "Unable to cache bundle"-Fehler bei Apache Karaf Allgemeines EE 0
H JWebUnit Fehler: java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException Allgemeines EE 24
mor16Euro Servlet Fehler code: The requested resource is not available Allgemeines EE 7
M Servlet Fehler beim Start der Serveranwendung Allgemeines EE 3
N Fehler 403 bei Sessiontimeout mit <security-constraint> Allgemeines EE 0
Q Fehler InitialContext.lookup Allgemeines EE 3
A LDAP Auth Fehler Allgemeines EE 5
J Fehler beim deployen von seam 2.2.2-Projekt Allgemeines EE 9
Ezra BIRT - Report erzeugt Fehler Allgemeines EE 26
JimPanse Tomcat Fehler nach redeploy Allgemeines EE 5
Z OSGi Implementierung - Fehler bei Import Package Allgemeines EE 9
H fehler beim deployen von ear file Allgemeines EE 2
E Fehler bei SQL Abfrage MAX Allgemeines EE 10
M Fehler bei Javamail Session mit Glassfish 3 Allgemeines EE 3
C WebStart Fehler nach update auf Java 1.6 Allgemeines EE 2
A jsf: Servlet aufrufen, wie geht das? web.xml Fehler? Allgemeines EE 13
M Fehler in JSF Anwendung Allgemeines EE 4
J Konvertierungs-Fehler: Wert ''{0}'' für Modell ''{1}'' Allgemeines EE 10
N Jboss als Dienst -> Fehler 1053 Allgemeines EE 1
G Fehler, wenn <f:view> Tag als Startseite Allgemeines EE 2
R auf der Suche nach dem Fehler,Sessions + Arrays Allgemeines EE 4
K Datatable Löschen Fehler Allgemeines EE 6
A Problem / Fehler beim Einbinden einer Klasse in ein JSP Allgemeines EE 20
G JSTL Fehler Allgemeines EE 2
F Fehler beim deployen von jsp und servlet Allgemeines EE 7
F Buildscript Fehler weblogic/Deployer Allgemeines EE 2
T Jsp die mehrere Servlets aufruft erzeugt Fehler Allgemeines EE 10
K [Sun AppServer 8.1] Fehler beim deployen Allgemeines EE 12
M EJB Fehler Allgemeines EE 2
M Servlet Methoden Aufruf im Servlet Allgemeines EE 10
D Remote Aufruf von EJB funktioniert nicht Allgemeines EE 1
OnDemand XHTML Aufruf verbieten? Allgemeines EE 4
S Aufruf eines EJBs aus einer nativen Java-Applikation Allgemeines EE 1
S [Design] Dynamischer EJB Aufruf von Servlet Allgemeines EE 3
F Session abgelaufen und direkter Aufruf Allgemeines EE 10
J Problem mit EJB Aufruf und DualCore Rechner Allgemeines EE 4
B tag lib aufruf falsch Allgemeines EE 7
G Aufruf des Garbage-Collectors Allgemeines EE 4
N Seiten aufruf in einer JSP Allgemeines EE 4
W Methoden Aufruf in der JSP funktioniert nicht. Allgemeines EE 4
M Probleme bei Aufruf von JSPs in Unterverzeichnissen Allgemeines EE 2
S Kompilieren der JSP-Seiten ohne Aufruf Allgemeines EE 7
F Index im Datatable Allgemeines EE 4
E forEach und index? Allgemeines EE 2

Ähnliche Java Themen

Neue Themen


Oben