tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Design Question
Date Sun, 07 Aug 2011 01:10:47 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mohit,

On 8/5/2011 5:46 PM, Mohit Anchlia wrote:
> I also need to use mod_rewrite to direct request to new Servlet. Can
> I use rewrite to say abc.com/abc to abc.com/switch/abc?

Of course. That's kind of what mod_rewrite was written to do... rewrite
URLs.

> Mess :) Yes kind of but there is a risk involved since all the 
> functionality is not moving to the new system. Yes requests split 
> accross 2 systems and merge them back.

Yuck. Good luck. I think this design is going to make it very difficult
to manage and maintain. If you can't migrate systems, can you migrate
APIs? If you use SOA, you can just re-implement one service and then
combine using any appropriate technology (e.g. XSLT) instead of having
to combine HTML from bits and pieces.

> Asking my previous question, do you think Valve is better or
> Servlet? I like servlet better in this case.

It depends upon the requirements.

I would use a Filter over a Valve any day unless there is a real reason
to dig-into the Tomcat internal classes.

If you want your code to be able to modify/wrap the request and deliver
it somewhere else, then use a Filter. If the code is really making all
the decisions and generating content (or, in fact, merging content from
other sources), then a Servlet is more appropriate IMO.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk495hcACgkQ9CaO5/Lv0PC++ACcD0fI3jsxretus4qJzLBqxt//
D4kAmwfwYUbJi1DctW3iT4WqtxWFysbB
=kh5Q
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message