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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:59:26+00:00 2026-05-15T12:59:26+00:00

I have a form/calculator, which posts to itself some data, this data is then

  • 0

I have a form/calculator, which posts to itself some data, this data is then calculated by dispatching a servlet and the results are output as xml. The dispatcher code is shown below:

//create instance
ServletContext sc = this.getServletContext();
//create dispatcher
RequestDispatcher rd = sc.getRequestDispatcher("/ProCalcServlet");

rd.include(request, response);

Have a few problems with what I’m doing at the moment though. Firstly, is it possible to use a remote URL as opposed to just locally? And how do I process the data, since I’m assuming that because it’s a servlet, I can’t just call it an XML document and use the DOM to grab the data I want.

Quite new to this Java stuff, don’t even know what to google for exactly, so I’m kind of shooting in the dark with my current methods. Any help or directions would be greatly appreciated 😛 cheers

  • 1 1 Answer
  • 1 View
  • 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-15T12:59:26+00:00Added an answer on May 15, 2026 at 12:59 pm

    I hope I understand your questions correctly.

    It is possible to use remote URL. In that case, you need to invoke the URL through web service style. You can use HttpClient to call the URL. The URL will then return you data in XML form (in one big string).

    For you to process the XML, there are many libraries that allow you to easily to do so. You can stick JDK’s DOM or SAX parser, but in my opinion that’s messy. Consider using Castor, JDom, or Dom4J… some of them allows you to query the data using XPath too.

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

Sidebar

Related Questions

I have the following text input on a budget calculator form which displays the
I have two form inputs which display the calculated invoice sub-total and total of
I have a form-1 which has 4 fields. when the user inputs data in
I have a form that is basically a calculator. you can type an equation
Possible Duplicate: JavaScript post request like a form submit I have a value calculated
I have form where are 2 input fields and then i have dynamic dataTables
I have form, where some fields are looks like rows, so I can add/delete
I have form in my page, I am using ajax.beginform(). Inside this form I
I'm programming in python. I have the data of the following form: (A, B,
I have a simple HTML Form that allows the user to enter some text

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.