File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes blank index.jsp on Tomcat 5.5.9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "blank index.jsp on Tomcat 5.5.9" Watch "blank index.jsp on Tomcat 5.5.9" New topic
Author

blank index.jsp on Tomcat 5.5.9

Shawn Garner
Greenhorn

Joined: Aug 25, 2005
Posts: 17
I have an index.jsp that redirects to a jsf page.

I tested it and it works fine on my development computer with JBoss/Tomcat 5.5
I then uploaded it to my web server and now I get a blank page instead of the redirect.
However I know the webapp was deployed because if I type in /welcome.jsf the page comes up.

Any help would be appreciated.

Shawn
[ May 25, 2006: Message edited by: Shawn Garner ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you checked your logs to see if there is an error?

Also, a tool like the LiveHttpHeaders plugin for Firefox is handy for debugging these types of problems.
With it, you can watch the headers being passed back and forth from the browser to the server in real time. If the redirect is being sent, you'll be able to see the 30x response code.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Shawn Garner
Greenhorn

Joined: Aug 25, 2005
Posts: 17
I checked the logs. No errors that I could find.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

My next step would be to use a tool to see what is coming back from the server. A packet sniffer or the plugin that I mentioned earlier should do the trick.
Shawn Garner
Greenhorn

Joined: Aug 25, 2005
Posts: 17
I uninstalled jboss and downloaded the new Tomcat 5.5.17.
Still seeing the same thing.
I tried with a forward and with the redirect.

I was wondering if it is a configuration issue.
Here is my web.xml

Any help please?

Shawn

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">


<!-- This web.xml can be used during debugging, when there is no myfaces.jar
library available.

The faces-config.xml file (that is normally in the myfaces.jar) must be
copied to the /WEB-INF directory of the web context.

The TLDs (that are normally in the myfaces.jar) must be
copied to the /WEB-INF/lib directory of the web context.-->
<description>debug web.xml</description>

<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
</context-param>

<!-- Use Documents Saved as *.xhtml -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>

<!-- Special Debug Output for Development -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<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>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/examples-config.xml</param-value>
</context-param>

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

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

<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>

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

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

<!-- Tiles ViewHandler config file -->

<context-param>
<description>
Tiles configuration definition files and a listener need to
be defined. the listener will initialize
JspTilesViewHandlerImpl with tiles definitions.
</description>
<param-name>tiles-definitions</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>

<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>
<!-- <filter-class>
org.apache.myfaces.component.html.util.ExtensionsFilter
</filter-class> -->
<filter-class>
org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<description>
Set the size limit for uploaded files. Format: 10 - 10
bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<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>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</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>extensionsFilter</filter-name>
<url-pattern>/faces/*</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>*.xhtml</url-pattern>
</filter-mapping>
-->

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

<!-- Faces Servlet -->
<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>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<url-pattern>/index.jsp</url-pattern>
</servlet-mapping>


<!-- Faces Servlet Mapping -->

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

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

<jsp-config>
<jsp-property-group>
<description>
Special property group for JSP Configuration JSP example.
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
<page-encoding>ISO-8859-1</page-encoding>
<scripting-invalid>false</scripting-invalid>
</jsp-property-group>
</jsp-config>

<!-- Welcome files -->

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

</web-app>
Shawn Garner
Greenhorn

Joined: Aug 25, 2005
Posts: 17
I fixed the redirect/forward problem.
I had a jsp-api.jar in my lib directory that must have been from JBoss and causing problems.

Shawn
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: blank index.jsp on Tomcat 5.5.9
 
Similar Threads
JavaServer Faces - forwarding (like JSP:FORWARD) but ...
Problem JSF as RuntimeException: Cannot find FacesContext
struts deploy issues
response.sendRedirect();jsp:forward;<c:redirect>
Eclipse "web.xml" entry point?