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

  • Home
  • SEARCH
  • 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 1082021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:14:38+00:00 2026-05-16T22:14:38+00:00

I have a developed a Restlet application. I would like to return a JSP

  • 0

I have a developed a Restlet application. I would like to return a JSP file on a URL request through Restlet. How can I achieve this without using a redirect?

i.e.
Let’s say I have the file “contact.jsp” on mydomain.com and I want people to be able to access contact.jsp at http://mydomain.com/contact

Thus, in Restlet, I would have:

router.attach("/contact", MyResource.class);

But how can I return the “contact.jsp” page? I know that a redirect would work, but I don’t want users to see the “.jsp” in “http://mydomain.com/contact.jsp“… or is there another strategy that would work without even using restlet? Maybe some modification of my web.xml file?

Edit (2009-08-14):

My answer posted below doesn’t work on App-Engine and Restlet. It does work however, if I don’t include Restlet, or allow Restlet to have a url-pattern of “/*”

What would be ideal is to have a subclass of the Router that allows me to do this:

router.attach("/contact", "/contact.jsp");

Thanks!

Edit (2009-08-17):

I’m surprised I haven’t had any responses since I posted a bounty. Will someone comment and let me know if my question/problem isn’t clear?

Edit (2009-08-17):

Interesting observation. When using the method described by “Rich Seller” below, it works when deployed on Google App-Engine and not locally. Additionally, If I call http://mydomain.com/contact.jsp on Google App-Engine it bypasses Restlet and goes straight to the JSP. But, locally, Restlet takes over. That is, http://localhost:8080/contact.jsp does not go to the JSP and goes to Restlet. Do deployed app-engine applications respond differently to URLs as their local counterpart?

  • 1 1 Answer
  • 4 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-16T22:14:39+00:00Added an answer on May 16, 2026 at 10:14 pm

    “I would like to return a JSP file on a URL request through Restlet” – My understanding is JSP’s are converted to servlets. Since Servlets are orthogonol to Restlets not sure how you can return JSP file through Restlet.

    Assuming you are asking for a way to use JSP in addition to Restlet, This is best achieved by mapping your restlets to a rootpath such as /rest instead of /* and using the .jsp as usual.

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

Sidebar

Related Questions

I have developed sample api as jar file. This jar file contains the code
I have developed a Facebook application using Flash as3. In this application when ever
I have developed an application with tab using FragmentActivity. How can I pass some
I have developed an android app that works great and i would like to
I have developed an web application using JSP and deployed in tomcat server. In
I have developed a simple application in GWT. After that, I generate war file
I have developed about 300 Applications which I would like to provide with multi-language
I have developed a small administration page for game servers which you can add/remove/edit
Have developed a small Windows application using SQL Server as its database. I need
I have developed a web application that uses the jQuery DateTimePicker by Trent Richardson

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.