Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

XML HTTP Post & JSP

Thread view: 
Harry - 21 Dec 2005 05:09 GMT
Hello...
I have a servlet that accepts an XML request (via HTTP post) and
responds with an XML output. Now, my question is - Is it possible to
respond with output to a JSP page?
Scenario.....
User sends XML request to servlet.
Servlet processes request. OK
Servlet responds by outputting the result to a JSP page.

How can this be done? Code snippets are welcome.

Thanks muchly.....
Harry H.
castillo.bryan@gmail.com - 21 Dec 2005 05:48 GMT
Look at these methods:

(I think that you meant - Is it possible to respond with output
generated by a JSP page?)

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletRequest.html#getReque
stDispatcher(java.lang.String
)
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html#forwa
rd(javax.servlet.ServletRequest,%20javax.servlet.ServletResponse
)
JScoobyCed - 21 Dec 2005 07:04 GMT
> Servlet responds by outputting the result to a JSP page.

If you mean injecting the result to a page that is already displayed in
the client browser: you can't... Or not using this scenario.
There is a JavaScript method that let you perform XML HTTP request. The
result is return in a String variable that you can process in your
javascript code and dynamically display.
This is not specific to Java but Javascript.

Signature

JSC

Malte - 21 Dec 2005 08:25 GMT
I have written entire systems based on XML being sent back to the
browser. I preferred XSLT transformation over JavaScript.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.