Basic Project Flow: 1. User selects a report name (reportList.jsp)
2. ReportListAction then populates the ReportListForm with the appropriate parameters to be selected (optional) or filled out (mandatory)
3. reportList.jsp is redisplayed (tiles configuration)with a new visible section for the user to enter parameter choices, user submits
4. ReportListAction recognizes the submittal and is suppose to do the following:
-> create an URL to submit to the Crystal Reports Server -> submit URL -> receive report response(suppose to be in HTML) -> pass response through to a NEW browser window for viewing
PROBLEM STATEMENT: How do I, internal to the ReportListAction, submit the URL? What general order do I need to follow? For example, do I create a HTTPClient and have that handle the request submittal and receive the response? Or should I use HttpURLConnection? I have looked over the APIs (HTTPRequest, HTTPClient, HTTPServletRequest, HTTPSession, etc.) but am not familiar enough with HTTP to know which to try first. This is my first time attempting to use HTTP.
See you should use the URLConnection to connect to your server and get the response. But you must be sure of how to communicate to the Crystal reports . As far as i know its not HTTP thus there is no ? of using HTTPURLConnection.
Its just the same as connecting from Simple java program , but here you can get the outputStream from crystal reports in to the ServletOutputStream of the response.
hope you got what i said
Joined: Jun 29, 2006
Thank you very much for your reply. I will look into the URLConnection class and see how that works.
I believe I understood your advice in that I really don't have to worry about HTTP. Instead, just a straight URL with parameters.
I think I also understood that once I receive the response, use a ServletOutletStream to send to a new browser window.