Return jsp paramaters to another machine

M

M?rcia Elias

Good afternoon!
I am working with Apache and Tomcat in two different machines, and I
can access jsp pages in the Apache machine (connector mod_jk). The
problem is: I want to separate the HTML code(Apache machine) and de
JSP code (Tomcat machine). Its possible returns parameters from jsp to
the other machine (Apache)? And how can I do this?

theres a example for view the problem:

Machine (Apache)

Example.html

<html>
<body>
<h1>users list</h1>
<table>
<tr>
<!--#include virtual="/tomcat/users.jsp"-->
</tr>
</table>
</body>
</html>

Machine (Tomcat)

users.jsp


for (int i=0; i<users.length; i++) {
uilizador = (String) users;
out.println("<td>" + users + "</td>");
}
I would like to return the users list to the apache machine, and there
make the print.

P.S.- I am sorry, my English is not very good. In case of any question
please contact.
 
C

Chris Smith

M?rcia Elias said:
Good afternoon!

Good morning!
I am working with Apache and Tomcat in two different machines, and I
can access jsp pages in the Apache machine (connector mod_jk). The
problem is: I want to separate the HTML code(Apache machine) and de
JSP code (Tomcat machine). Its possible returns parameters from jsp to
the other machine (Apache)? And how can I do this?

No, I don't think that what you want is possible. I'm also unsure why
you'd want to do it. The whole point of a JSP is to contain HTML with
some dynamic content. There's absolutely nothing wrong with placing
HTML in JSP files. (In fact, if you're all-out avoiding HTML in your
JSPs, then it's kinda wasteful to use JSPs at all; may as well stick
with servlets.)

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
M

M?rcia Elias

Hello Chris.
What I want to do is connect many web servers (apache) to one web
server (tomcat), and every web server (apache) have a different site,
but just in look and feel, the functionalities are the same and they
must be in the tomcat machine. Because just that machine can access to
BD and make operations, and security is very important.

Thanks. Márcia Elias
 
C

Chris Smith

M?rcia Elias said:
What I want to do is connect many web servers (apache) to one web
server (tomcat), and every web server (apache) have a different site,
but just in look and feel, the functionalities are the same and they
must be in the tomcat machine. Because just that machine can access to
BD and make operations, and security is very important.

Okay. I would very strongly consider a different approach. What you've
got going there is one of the least flexible and most difficult means of
achieving this task. Off-hand, here's a strategy that I'd look into
instead, were I in your place.

Have your back-end process return data in something other than an HTML
fragment. The HTML fragment is one the least understandable (and
therefore hardest to customize) forms you could possibly choose for that
data. If it's important to you that it be easy to convert the data to
HTML, then an XML-based format might work well, and XSL could be used to
format the presentation layer.

(As I said earlier, I cannot think of a clean way to do what you
originally asked.)

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
M

M?rcia Elias

Hello Chris.
Tanks for your suggestion, I think I would use XML format, so I can
interpret the results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top