Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6365847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:20:46+00:00 2026-05-25T00:20:46+00:00

I am running the Java Pet Store example and this is the top part

  • 0

I am running the Java Pet Store example and this is the top part of my “index.jsp” file :

<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
$Id: index.jsp,v 1.20 2007-03-16 20:18:59 basler Exp $ --%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.*, com.sun.javaee.blueprints.petstore.model.CatalogFacade, com.sun.javaee.blueprints.petstore.model.Tag"%>

<%
try {
    CatalogFacade cf = (CatalogFacade)config.getServletContext().getAttribute("CatalogFacade");
    List<Tag> tags=cf.getTagsInChunk(0, 12);
    // since top 20 come from database or desending refCount order, need to reorder by tag name
    Collections.sort(tags, new Comparator() {
        public int compare(Object one, Object two) {
             int cc=((Tag)two).getTag().compareTo(((Tag)one).getTag());
             return (cc < 0 ? 1 : cc > 0 ? -1 : 0);
        }
    });    
%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
        <title>Java Pet Store Reference Application</title>
        <link type="text/css" rel="stylesheet" href="./tag.css"/>
    </head>
    <body>

….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:20:46+00:00Added an answer on May 25, 2026 at 12:20 am

    This is not a direct answer to your question, but I’ll attempt to show what goes on to render a JSP. Following that path, and analysis of domains/domain1/server.log (if your installation is using the default domain called domain1) might give you a hint on what’s wrong.

    Normally in a GF2 there’s a file called default-web.xml in the domain’s config directory.

    It contains these snippets:

      <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>xpoweredBy</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
    

    The above code configures JSP support – of course it will fail if it cannot locate the servlet code, but that should be logged in server.log.

    After that, the following snippets ensure that the above servlet is called to manage jsp’s – one mapping for “classic” jsp’s and one for “xml syntax” jsps.

      <servlet-mapping>
         <servlet-name>jsp</servlet-name>
         <url-pattern>*.jspx</url-pattern>
      </servlet-mapping>
    
    
      <!-- ================ Built In Servlet Mappings ========================= -->
    
    
      <!-- The mapping for the JSP servlet -->
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
    

    Now, if for whatever reason these segments are missing in default-web.xml, jsp support will be inactive, and you’ll get an effect like the one you describe because the file will be picked up by the default servlet, and will be handled as a static resource.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is an actual running Java ServerPages (JSP) application within a *NIX box which
I'm running Java Server Faces on a IBM WebSphere 6.1. I'm getting this strange
I have a running java GUI application right now in a single class file,
Running Apache/PHP on this PC. I am using Eclipse >> Export Java > JAR
I now have a running Java program which only lacks of the final step,that
What are my options for running Java 6 on OS X? I have an
There's plenty of information on running Java apps as services, but I need to
I'd like to generate sequence diagrams of a running java ee application using jtracert
Could anyone please tell how jre directory help in the running java programs? I'm
If I run a Maven build in NetBeans which starts a long-running Java process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.