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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:29:34+00:00 2026-05-23T04:29:34+00:00

I have a website with several servlets. Each page like index, about, FAQ, contact

  • 0

I have a website with several servlets. Each page like index, about, FAQ, contact us and so on, have a servlet connected to them. I am also planning to make it possible to add additional pages with a button create new page, so that when somebody clicks it, a new servlet will be assigned to that page.

Is it possible to create servlets at runtime? My guess is that it is not possible (or at least very difficult).

…If not are there any workarounds?

I am using GlassFish, if that matters.

  • 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-23T04:29:35+00:00Added an answer on May 23, 2026 at 4:29 am

    No you can’t create new servlets, but what you’re suggesting is a common requirement. When a user creates a new page you need to save it somewhere e.g. database or file system. I would suggest the database.

    Then code your servlet to dynamically render its menu of pages and each individual pages content based on the contents of your database.

    In this example your servlet can play the role of a Front Side Controller to handle the decision points of determining which view has been requested and dispatching the rendering of it (you might want a separate Dispatcher). Your JSP could be very generic in nature i.e. hold the menu and the page contents, which it renders based on data which has been set in an appropiate scope (e.g. request) by the Servlet.

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

Sidebar

Related Questions

On my website I have several hidden div's with comments. Each comment div is
I have a Django website as follows: site has several views each view has
I have a website with several views, and most of them have a jqGrid
In my website I have pages with several layouts: a page with a header,
I have a website, published here . On the contact us page, linked above,
I have a website with several forms that all pass the same set of
I currently have a website where I'm hosting a webservice with several web methods,
We have redesigned the structure to a website which has several business units. Now
I have a C# website. It references several compiled dlls. My dlls need to
I have several projects and a website in a large asp.net solution. In some

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.