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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:42:07+00:00 2026-05-26T16:42:07+00:00

I have a servlet that is called from a link on another page. The

  • 0

I have a servlet that is called from a link on another page. The link actually references the servlet which then SHOULD write xml to the screen (outputting RSS XML information). Right now the link properly references and loads the servlet but because I have the code in the doPost method with nothing actually calling the doPost method nothing happens. (I’m new to Java EE) So how do I make that code execute without actually have a form that references the servlet through the “action =..” tag?

Can I call an init or main method that always executes on page refresh/load?

  • 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-26T16:42:08+00:00Added an answer on May 26, 2026 at 4:42 pm

    You can implement that logic in your doGet method. It has the same method signature as your doPost method.

    Please see this thread

    doGet and doPost in Servlets

    For the difference between get vs post please see this article.

    http://stevenclark.com.au/2008/01/12/get-vs-post-for-the-beginner/

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

Sidebar

Related Questions

I have code called from a servlet that calls out to an external service.
I have a servlet which is used to display image.This servlet actually called by
I have this java servlet that grabs information from a form, I need to
I have servlets that caches user information rather then retrieving it from the user
I have a Java class which can be called from shell. (via java [command][options])
The idea: I have a JAX-RS webservice servlet (Object called webServlet ) which instantiates
I have a servlet that is used for many different actions, used in the
I have a servlet that I would like to run within ColdFusion MX 7.
Under JBoss 4.0.1SP1, I have a servlet that makes multiple, concurrent calls to web
I have installed a servlet (solr) that requires that I set the variable solr.solr.home

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.