Bugs item #595985, was opened at 2002-08-16 07:38
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104754&aid=595985&group_id=4754

Category: Tapestry
Group: bug
Status: Open
Resolution: None
Priority: 7
Submitted By: Howard Lewis Ship (hship)
Assigned to: Howard Lewis Ship (hship)
Summary: Tapestry behind firewall

Initial Comment:
I switched over to 2.2-alpha4 and tried to install a new 
tapestry-application in our intranet. The problem about 
that is, that 
people from outside are not allowed to directly connect 
to the servelt 
container. We have an apache server instead that is 
doing redirection.  I 
cannot image how that should work, because no there is 
an absolute base URL 
(http://myhost ...) in the generated source of the page. 
My form submit 
goes directly to this (forbidden) URL and not to my 
apache server anymore. 
If there wasn't any host information in the base url, I 
could define a 
rewrite rule in my apache, now I cannot.

----------------

Hi,

I just happened to have the exactly same problem with 
viewcvs in
standalone-mode behind my firewall; see a possible 
quick-fix solution (in
the attachment) at:
http://sourceforge.net/tracker/index.php?
func=detail&aid=582885&group_id=18760&atid=318760
Of course the hardcoded public URL is not really a 
solution, but it does
work and something similar might do the trick for 
Christian.
Another way might be the use of a connector module, 
as described in e.g.
http://jetty.mortbay.com/jetty/doc/JettyWithApache.html 
or corresponding
docs for Tomcat.

The first approach relies on Apache's transparent 
forwarding via
mod_proxy, but only solves one part of the problem, 
namely the 'getting
in'. I just did a quick test and forwarded from my Apache 
host to my
laptop via mod_proxy; while static content works fine, 
dynamic URLs (e.g.
the actions on the tutorial tabs) are still generated 
without rewriting.


--------------

I found a solution to the problem described above. In 
your apache 
configuration (httpd.conf) you have to a proxyVia to the 
host the 
application is running on. My application is e.g. running 
on 
192.168.100.111 and the path is /daedalos/library 
(where daedalos is 
declared in jetty.xml and library is declared in web.xml). 
The configuraion 
should look like:

<IfModule mod_proxy.c>
ProxyRequests On
ProxyVia Full
ProxyPass        /daedalos/library 
http://192.168.100.111:1080/daedalos/library
ProxyPassReverse /daedalos/library 
http://192.168.100.111:1080/daedalos/library
ProxyPass /daedalos/css 
http://192.168.100.111:1080/daedalos/css
ProxyPassReverse /daedalos/css 
http://192.168.100.111:1080/daedalos/css
ProxyPass /daedalos/img 
http://192.168.100.111:1080/daedalos/img
ProxyPassReverse /daedalos/img 
http://192.168.100.111:1080/daedalos/img
</IfModule>

-----------------------

Here's what I propose to do:

1) Add methods to RequestContext for getting the 
request 
scheme, server, URL and port and modify code (in 
Gesture 
and in Shell) to use it (OOP side note:  look how few 
places!)
2) Define an interface, IRequestDecoder, that given an 
HttpServletRequest, provides these values.
3) Define a DefaultRequestDecoder that simply pulls the 
values from the HttpServletRequest.
4) Create an AppacheRequestDecoder (possibly in the 
contrib library) that handles decoding when using 
Apache 
in this way.
5) Change RequestContext to look for an extension in 
the 
application specification with the 
name "net.sf.tapestry.request-decoder" and use it 
instead of the DefaultRequestDecoder if it exists.

This gives us our first good use for extensions.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104754&aid=595985&group_id=4754


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to