A few weeks ago, I moved my personal domain to a new hosting which supports J2EE too (from my previous PHP-only one). It had been a mess to maintain the look&feel of my site in a mix of static HTML and PHP environment, so I decided to do such decorations using SiteMesh. The framework I've used in every single J2EE web application I've developed in the recent years, but never got the chance to use it on my own site because of the lack of J2EE support.
Extracting the current look&feel of my site, designing a new navigation system and setting up SiteMesh to decorate my static HTML pages was just a matter of few hours of work. Very easy, straight forward and rock solid.
But as for my PHP pages I was a bit in trouble! The site was going to be backed by Apache2 for non-java stuff (as the master server) and Apache Tomcat for my j2ee applications (as slave), and the connection between these two was via JK_Module. Obviously Apache2 was serving the static contents (like images, CSS files and so) and PHP files. The rest were forwarded to Tomcat.
The first problem was here!! Tomcat (thus SiteMesh) didn't even get the PHP requests because Apache2 was directly catching the requests and serving them without forwarding. The result was that the PHP pages were not getting decorated although SiteMesh was present there and I've set its apply pattern on "/*" :-) Ok! It just took me an email to hosting support and they were kind enough to quickly modify the configuration files so that even *.php requests get forwarded to Tomcat (for my domain only) and Apache2 no more was in charge of processing them.
But wait, the second problem! Does Tomcat have any built-in PHP processing support? NO! So how's it going to do this? Well, poking around a bit (obviously googling), I found out that there is a pre-bundled Servlet with PHP Distributions which makes *.php request processing possible. It's actually a proxy Servlet which you map *.php requests on it, and it processes them using the command line PHP interpreter. So far so good! Again I contacted the support to make PhpServlet jar file available in Tomcat's common/lib folder. It was done within some minutes and in the meanwhile I'd modified my web.xml to include PhpServlet configuration block.
After a couple of hours of debugging because of an output flushing issue (that caused SiteMesh not to get the input from PhpServlet when the volume of input was not hitting the minimum threshold to be flushed), the server was ready to serve and to decorate the PHP files. Yes, finally got it working and started to give it a more thorough test.
Hey wait! Why does my site go completely down after each time I try to access an invalid/unavailable PHP page? Oops! Seems that Tomcat crashes when it gets a "404 Page Not Found" error from PhpServlet. Googling again showed me that this is a common problem and many have reported this issue but there is still no solution. Well, end of the story :-) Fortunately my PHP codes were not a lot or complicated, and I could easily translate them into JSP and you know the rest.
Just three final thoughts which I found them the real hurdles:
Armond
]]>Well, actually dropping it here for my later reference ;-)
Armond
]]>Armond
]]>Have Happy Datings!
Armond
]]>Armond
]]>Call me crazy but I would like to see Jini handled these things all without much trouble! When can we see the first JVMs in our cars, home electronical devices? And all communicating, discovering and knowing each other with no pain, no wiring or so? Ah, writing a few lines of java code to program my own car will be really interesting ;-) A little science fiction but we'll see them in real use pretty soon...
Armond
]]>Just wishing some day in near future we can see JPG2000 format support on the cameras which will be a huge improvement.
Armond
]]>Armond
]]>Here is what I believe and experienced in my life. Please note that these are all about hiring a developer and so, neither a consultant nor designer or so, as their interview types differs a lot from view...
I've never been directly in charge of hiring nor owned a company or so, but in many cases, I've been asked for doing the technical interviews. So to me, as an interviewer, it's really important to perform the same way which I would like to see when I'm in interviewee position. While having some basic questions about some general stuffs can help the both sides to know more about each other, I'm not much for non-technical ridiculous questions while going for technical interview! Going to some technical information exchanges fit the best for me and I really love them. In this way I can really expose my experiences and see what other side has to say, and perhaps learn a bit from him/her both on interviewee and interviewer cases (yes! why not?).
It's really boring for me to sit there for hours to fill the interview forms (specially those nastily copied from the Certified exam sheets) and answer many dumb non-technical questions in a-question-from-them-an-answer-from-me kind!! Hey man! It's technical interview... Start hitting me with real world practical cases and questions. See what I have in my resume and check their validities by some technical discussions.
Someone at the above thread had said that he'd been asked for the differences between SAX and DOM parsers and so... It's just reminding me of an interview I'd gone for many years ago as a java developer (not so much separated editions then). You just can not believe the question types they asked me (yes! four technical guys there to interview me). All pure academical questions which none of them matched any of their working acreas. Can you beleive that they were asking me mathematical questions? Ranging from the grade I'd scored in "Differential Equations" course in university to what particular sections a compiler has (name and describe them) to what an automata (from "Theory Of Languages" course) is and how it's being used!!
I was just like "eh?! Are they going to hire me as mathematical engineer to do their Mars Lander programming/calulations or I'm gonna do some pure java stuffs and so?"
Much more to say in this regard but not quite enough time... I would be glad to hear your thoughts.
Armond
]]>Will java be back on desktops? I've always been a GUI development fan and I'm very hopeful now by seeing all those sexy stuffs ;-) Hey! I've really missed the old days developing client side!
Moreover, you'll find a lot on client side toys here:
- Javio
- JGoodies
- Javootoo
- L2FProd
Woohoo... Great job guys!
Armond
]]>Armond
]]>Look at Spring ... I'm sure there will be many guys out there, want to drive their projects by EJB 3.0 only. No need to have application servers to support all those nasty and foolish 1.x/2.x classes, interfaces and architechture, to call them EJB 3.0 compliant :-( I wish this can be changed in the final version!
Armond
]]>The sad news (at least for me!) is that my hosting doesn't have any Java support so I have to go mostly with CGI, Perl and PHP! Since I've been using MovableType from the day one and I found it far better than other PHP players out there, so just decided to stick with it. Also having no data migration headache push me more on this way...
I wish I could install Confluence for both my site WIKI and Blogging stuffs! Man! I really love Confluence like my child :D It rocks! Especially with the latest fixes and improvements we've done on WIKI rendering and exporting (HTML, XML and PDF) engine, it will fly for v1.1! Something really mature and usable which easily bits any other Content Management and WIKI system out there (both java and non-java ones)...
Well, Experiences new home is accessible under:
http://blogs.armondavanes.com/experiences/index.html
And for the RSS Feed, here it is:
http://blogs.armondavanes.com/experiences/index.xml ( RSS 2.0 )
http://blogs.armondavanes.com/experiences/index.rdf ( RSS 1.0 / RDF )
Armond
]]>It's mostly about nature photography with some exceptions on my own photos too! I've shared as many as I could as I had plenty of spaces there on server to go on and more will be added later...
Please let me know if you get into any flaw, or have any comments, suggestions and so on.
Armond
]]>