Greetings. I hope I have selected the correct forum to post this thread. If not I'm sure the sheriff will correct my ways.
We've heard the adage: Be carefull what you ask for as you just may get it. Well, its happend to me.
I took a position as a contractor for a large company and now I find myself working on a project whereby I have limited technical experience or it has been several years since I last used the technologies required (see title of this thread for the technologies I am referring to). To make matters worse I have very little time to complete the task. On the good side, I am finally working with the technologies that I've wanted to work with for some time now.
I am writing this thread because I could really use some consultation with my task. Here are the specifics. The task as a whole is quite simple. Picture a completely blank web page. Now split that web page in two vertically down the middle. On the left hand side of this web page will be about twenty something text fields for the user to enter all sorts of numeric and text data. On the right side of the web page there will exist a checkbox treeview control from which the user can click on certain checkboxes. The objective of this web page is to build an XML file which will contain data from all of the entries made on the left hand side of the page and all of the nodes that were selected in the checkbox treeview control on the right hand side of the page. The user simply enters all of the fields on the left hand side of the page and clicks on the desired elements in the checkbox treeview control on the right side of the page that are to be included in the XML file. The user then clicks a "Go" or "Apply" or "Submit" button and the web page will build the XML file and park it in some directory on the server to be used downstream.
Thank you all for your time in reading this lengthy post and addressing my questions. My humble apologies if this is something that is so elementary. As stated, either I lack the skill or it has been quite some time.
Request is received by server.
page is received by client (view source to see what was generated by the jsp)
It does sound like you are on the right track.
You might want to check out this article just for a quick overview.
You will probably want to query your webservice from a servlet. Process the results of that webservice call into a java object of some sort, and then forward it on to your jsp to render. That would be the standard pattern. It depends what your checkbox control on the page is expecting.
Just to emphasize a few of the excellent points that Stefan made to make sure that they are understood:
In modern JSPs, there should be no Java code. None. Nada. Zero.
Do read the article Stefan linked to. I wrote it, and it will give you a good grounding in what JSP is all about.
Thank you Mr. Evans and Mr. Bibeault for your time and your suggestions and comments. And thank you, Mr. Bibeault, for writing that article about JSP pages. Reading that certainly helped me understand the nature of what a JSP page is used for.
Thank you again for your time and suggestions. Any links you can provide that offer suggested solutions or further learning, of course, is also appreciated.
First question: What information do you have on this web service? Is it a SOAP or a RESTful service?
I would certainly get this web service call/xml creation working as a separate class or set of classes which can be tested outside the servlet/jsp environment
Joined: Feb 19, 2007
I believe this will be a SOAP call. I have already created the web service client with the Apache CXF tool (here is the link).
I agree with you and will be testing this web service client call separately from my JSP page. Before I do I need to get some additional required information from the tech lead and update the "...._Client.java" modules. I hope to have that information by the end of our next business day.