Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Java - Return jsp paramaters to another machine

 
Thread Tools Search this Thread
Old 01-26-2004, 03:08 PM   #1
Default Return jsp paramaters to another machine


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[i];
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.


M?rcia Elias
  Reply With Quote
Old 01-26-2004, 03:36 PM   #2
Chris Smith
 
Posts: n/a
Default Re: Return jsp paramaters to another machine
M?rcia Elias wrote:
> 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


Chris Smith
  Reply With Quote
Old 01-26-2004, 06:36 PM   #3
M?rcia Elias
 
Posts: n/a
Default Re: Return jsp paramaters to another machine
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
Chris Smith <> wrote in message news:<>...
> M?rcia Elias wrote:
> > 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.)



M?rcia Elias
  Reply With Quote
Old 01-26-2004, 07:54 PM   #4
Chris Smith
 
Posts: n/a
Default Re: Return jsp paramaters to another machine
M?rcia Elias wrote:
> 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


Chris Smith
  Reply With Quote
Old 01-27-2004, 10:45 AM   #5
M?rcia Elias
 
Posts: n/a
Default Re: Return jsp paramaters to another machine
Hello Chris.
Tanks for your suggestion, I think I would use XML format, so I can
interpret the results.

Chris Smith <> wrote in message news:<>...
> M?rcia Elias wrote:
> > 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.)



M?rcia Elias
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
pcAnywhere and Brother fax machine on same phoen line bem522 Software 0 07-20-2007 04:20 PM
Re: Can't login to XP Pro machine jjw A+ Certification 2 10-19-2004 12:36 AM
Re: Can't login to XP Pro machine Solomon Kozanski A+ Certification 5 09-25-2004 05:24 PM
Re: Can't login to XP Pro machine Gary A+ Certification 3 09-22-2004 10:17 PM
XP machine cant see network Rick Todd A+ Certification 2 07-28-2004 04:23 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46