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 8477577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:30:23+00:00 2026-06-10T18:30:23+00:00

When I access a jsp page like this on an appengine development server: localhost:8888/index.jsp/

  • 0

When I access a jsp page like this on an appengine development server:

localhost:8888/index.jsp/

it’s displaying the source code of index.jsp in the browser. if you access without the trailing slash (i.e. index.jsp) then it renders jsp but with the trailing slash (i.e. index.jsp/) it displays the source code

Any idea why is this? and how to fix it?

It seems to happen only in development server and not in production. Production gives a 404 Not Found error, which is fine.

I am using SDK 1.6.4

web.xml:

<?xml version="1.0" encoding="utf-8"?>
<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/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

    <servlet>
        <servlet-name>RegisterPage</servlet-name>
        <jsp-file>/register.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
        <servlet-name>RegisterPage</servlet-name>
        <url-pattern>/signup</url-pattern>
    </servlet-mapping>


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

==========

so…

index.jsp -> renders page

index.jsp/ -> returns source code

register.jsp/ -> returns source code

register.jsp -> renders jsp

signup/ -> renders register.jsp

signup -> renders register.jsp

so it seems like it’s the urls with *.jsp/ that have the issue

  • 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-06-10T18:30:24+00:00Added an answer on June 10, 2026 at 6:30 pm

    You should move all the *.jsp files into the /WEB-INF directory, and update your web.xml.

    This way the *.jsp files will not be accessible directly, and the source code will be hidden.

    <?xml version="1.0" encoding="utf-8"?>
    <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/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    <servlet>
        <servlet-name>RegisterPage</servlet-name>
        <jsp-file>/WEB-INF/register.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
        <servlet-name>RegisterPage</servlet-name>
        <url-pattern>/signup</url-pattern>
    </servlet-mapping>
    
    <servlet>
        <servlet-name>IndexPage</servlet-name>
        <jsp-file>/WEB-INF/index.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
        <servlet-name>IndexPage</servlet-name>
        <url-pattern>/index</url-pattern>
    </servlet-mapping>
    
    <welcome-file-list>
        <welcome-file>/index</welcome-file>
    </welcome-file-list>
    

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

Sidebar

Related Questions

In JSP page we can access to attributes using this: ${name} . But if
Here it goes: I am refreshing a page named index.jsp via this <head> <meta
I have a parent JSP with code that looks like <jsp:include page='a.jsp' flush='true'/> <jsp:include
I am trying to access my json data name on jsp page from android
I am trying to access an XML file from JSP on my Tomcat server.
Access denied for user 'root '@'localhost' (using password: YES) Yes, this error is all
How can I access an JavaScript variable from within an JSP page ?
I'm trying to access a soap webservice from a jsp page. I need something
i am using this reference in jsp .i am able to call functions like
When trying to access the addprod.jsp page, the following error occurs: org.apache.jasper.JasperException: An exception

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.