K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Paul Clapham wrote:I don't know... there are thousands if not millions of websites around the world which make people log in, and not all of them are written in PHP. So your statement that you need to use PHP isn't all that convincing. Your later suggestion that you could use AJAX is a better idea, if you are forced to use Tomcat. But if you're more comfortable with PHP you could discard the Tomcat idea and write your website all in PHP. After all there are plenty of websites around the world which are written in PHP too.
Karthik Shiraly wrote:If what you have now is pure HTML pages, and if you intend to implement your complete web app (including database access ) with PHP as server side language, then Tomcat isn't the right server; what you need instead is apache httpd (which is commonly called simply "apache server"). You can optionally install either the PHPclipse plugin or download the PDT distribution of eclipse; they are targeted at PHP developers and facilitate deployment of PHP webapps on apache server. For the error display, you can use a javascript framework like jquery to send ajax requests to server and reply to those requests from PHP scripts.
On the other hand, if you have already implemented your pages and database access using JSP/servlets and already deployed on tomcat, then you don't need PHP at all. Just use a javascript framework like jquery to send ajax requests to server and reply to those requests from a servlet.
PHP can't execute on tomcat; or more accurately, it can probably be coaxed to run with lots of deployment gymnastics and patience, but nobody does so because it's not the right tool for the job. Apache httpd is the right server for PHP.
Can you suggest me whether W3SCHOOLS best to start with jQuery. Can you suggest me any other website also.
Karthik Shiraly wrote:JSP is HTML + java code.
Karthik Shiraly wrote:JSP is HTML + java code. This java code can be included either as scriptlets with raw java code, or as custom JSP tags which include java code indirectly.
Which one to use is a subjective preference. Some people like including java code directly as scriptlets; others prefer custom tags.
I prefer customs tags and strongly dislike scriptlets for the following reasons:
1. Better Readability and "Codeability": To my eyes, this snippet with custom tags
is easier to type, read,and understand, than this scriptlet version:
Look at how the scriptlet has so much more verbose code, extra keystrokes and scope for mismatched braces!
2. Compiler error checking support: If there is a syntax or semantic problem in the above JSP scriptlet, we usually don't get to know it until the page has been deployed on server,
because most default configurations go for on-demand runtime JSP compilation, instead of build time compilation.
On the other hand, a custom tag library is like any other piece of pure java code and needs to be compiled first before deploying. So it's easy to find out
most syntactic or semantic faults.
I started to frame more reasons, but then guessed that some angel here would have already written a comprehensive FAQ, and indeed they have! Go through it.
Can you suggest me whether W3SCHOOLS best to start with jQuery. Can you suggest me any other website also.
In order to appreciate why frameworks like jquery are useful, you first need to understand what exactly are the problems when using plain javascript.
If you are not familiar with javascript, then my suggestion is learn plain javascript first and implement ajax and basic DOM manipulation using it for your current app (learn-by-doing). There are ajax and DOM manipulation examples on w3schools.
Also check out this site's own javascript FAQ.
Once you have understood the problems with that approach, learn jquery to appreciate how it makes life easier. The FAQ above has links to good resources.
Bear Bibeault wrote:
Karthik Shiraly wrote:JSP is HTML + java code.
Not since 2002. JSP is a template to create a text response, which is usually HTML (bit can be any text). Java code is no longer used in JSP, but rather the JSTL and EL.
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|