I'm new in the JSP and Servlet word.
I have a Servlet that builds and returns a XML file. Now I want to create a JSP page that performs a request to this servlet in order to obtain the xml and format it in a HTML table.
How do I send a request to my Servlet from my JSP page?
In other words, this is what I'd like to design:
- User opens the JSP page with this parameter:
artist=Dream Theater
- The JSP page sends a request to my Servlet in order to obtain the artist's songs
- The Servlet read the artist's songs from a database and returns the list in XML format
- The JSP page creates a nice looking HTML table containing the data
Does it make sense? I know, the Servlet could return directly the HTML with the data but I'd like to use XML: in this way I could access the data I need from different contexts (from a mobile application for example).