How to get result from another JSP file?
I have to write a jsp (my.jsp) to get information from another jsp file (other.jsp).
The other.jsp return integer value (0 / 1) so that user can tell if certain service is available or not. And in my.jsp I need to collect such result and other information from a text file to make up of a XML string.
How can I call other.jsp to get the result? Thanks a lot.
hi, you can put all the information into a <form method="post" action="other.jsp"> (this will call other.jsp from my.jsp when you do submit).
then in other.jsp you do
First you have to put the information you will need at other.jsp into <input type="hidden" name="id_house">
String name = request.getParameter("id_house");
if you have another doubt my email is frozados@fibertel.com.ar
Hi, I think I didn't describe the problem clearly enough. In fact, there is a JSP file, and if our database is currently connected, the JSP will return value 1, otherwise, it will return 0. My java program need to get that result, and then form an XML string, and send the string back to the client. I'm just wonder how can I write such a program to read result from JSP file. Thanks a lot.
> Hi, I think I didn't describe the problem clearly
> enough. In fact, there is a JSP file, and if our
> database is currently connected, the JSP will return
> value 1, otherwise, it will return 0. My java program
> need to get that result, and then form an XML string,
> and send the string back to the client. I'm just
> wonder how can I write such a program to read result
> from JSP file. Thanks a lot.
Why is this function implemented as a JSP file? It should be implemented as a bean. It would be simple to get the information you require from that bean.