JSP versus PHP

Is there anything JSP does better than PHP?

PHP is a good scripting language, probably the best one. It does the same job as ASP only much better. I would suggest that JSP can actually do a whole lot more than that because you have the full functionality of the programming language behind it rather than being purely designed for web scripting. This gives flexibility and the jsp/servlet/bean architecture also offers far greater options for re-use and extension than php offers.

Similar Messages

  • EJB+JSP versus PHP

    What is the advantage of using EJB+JSP for a web ticket selling application instead of using PHP?
    Can Java support more customer hits compare to PHP?
    Is EJB+JSP better than PHP? Why?

    I know both PHP and Java. PHP is a more rapid development tool than Java. Once you know it, it is just easier to make simple pages out of it vs Java. In some ways PHP is easier to develop in and in some ways it is harder.
    There is no real IDE for PHP. There are some tools for real time syntax checking (Komodo) and debugging, but they are not as mature as the pick of current Java IDE's.
    In reverse, there is never a need to restart a server when updating a php file unlike Java. This is not a problem with JSP's, but when you change servlets the server will unload all classes from memory and reload. This is a major pain if you are working on a production server.
    I have created a game clan site with many functions using PHP and an order processing section of someones web site. It is fine for smaller projects and is very fast to develop in, however PHP does not scale as well as Java. A large enterprise system is better suited to using Java.
    Also, PHP is a loosely typed language. This has many nuances that are different from a strongly typed language like java. OOP is definately not as powerful in PHP, as there is no private, protected and public typing of methods and fields. You can make classes and even extend classes, but it is poorly implimented IMO. I did all my PHP OOP style, but did not use any inheritance. The limitations of OOP principles is probably the most restrictive aspect of PHP that I can see.

  • In Dreamweaver MySites[New Site] menu option , if I had a hosting JSP/PHP what I must declare the hosting JSP or PHP ?

    In Dreamweaver MySites[New Site] menu option , if I had a hosting JSP/PHP what I must declare the hosting JSP or PHP ?

    The simplest answer is to choose the language you work best with, and that fits the clients specification the best.
    I have mixed server languages on a site before, (would not recommend) when a client has decided they wish to change from their old one to a new(er) /different one, the only thing you must watch if doing this, is that you do not mix languages on the same page (will not work correctly, if at all), and parameter passing.
    PZ

  • JSP ASP PHP (and others)

    Does anyone know how many projects are implementing JSPs in comparison to those using .asp (and others)? I was just curious.. There's an "unfair" (I think) comparison (March 2002) here http://php.weblogs.com/popularity

    .ASP being the widest used. I think .jsp and .php are somewhere close to each other in the amount of projects out there.
    Hope this helps

  • JSP v PHP

    What is the difference, if any, between the abilities of JSP and PHP.
    Too many different technologies competing in the same space makes my head spin..

    PHP is more for dynamic content
    in websites, while JSP's and servlets are used in
    webbased applications built on top of Java.I disagree. If you use JSP tags, it's quite dynamic.
    One difference I'd like to point out is that JSP is based on Java and HTML, which are existing technologies you may already know. PHP is something new and you'd have to learn a new language/syntax. To me that's a real turn-off and I probably won't be using PHP anytime soon. I already use several languages and dozens of API's.

  • JSP and PHP ?!

              is it possible to include a php file into a JSP with the include tag?
              infos:
              the php file is on another server as the jsp file.
              the php server doens'nt support jsp and vice versa.
              hope anyone can help!!!!
              bye
              Phil
              

    Am I being an idiot or is there ever a reason for
    using JSP over PHP?A very large number of people have chosen to write their websites (or at least the user interface part) in JSP. They can't all be idiots.

  • Does apex support any server side JSP or PHP?

    I have the folowing script that is used to save flash files as images. I am hoping there is some way to make these serverside calls from within apex.
    <%@ page import="java.io.OutputStream"%>
    <%@ page import="java.awt.Color"%>
    <%@ page import="java.awt.Graphics"%>
    <%@ page import="java.awt.image.BufferedImage"%>
    <%@ page import="javax.imageio.ImageIO"%>
    <%
         //Decoded data from charts.
         String data="";
         //Rows of color values.
         String[] rows;
         //Width and height of chart.
         int width=0;
         int height=0;
         //Default background color of the chart
         String bgcolor="";
         Color bgColor;
         //Get the width and height from form
         try{
              width = Integer.parseInt(request.getParameter("width"));
              height = Integer.parseInt(request.getParameter("height"));     
         catch(Exception e){
              //If the width and height have not been given, we cannot create the image.
              out.print("Image width/height not provided.");
              out.close();
         if(width==0 || height==0){
              //If the width and height are less than 1, we cannot create the image.
              out.print("Image width/height not provided.");
              out.close();
         //Get background color from request and set default
         bgcolor =request.getParameter("bgcolor");
         if (bgcolor==null || bgcolor=="" || bgcolor==null){
                   bgcolor = "FFFFFF";
         //Convert background color to color object     
         bgColor = new Color(Integer.parseInt(bgcolor,16));
         //Get image data  from request
         data = request.getParameter("data");
         if(data==null){
              //If image data not provided.
              out.print("Image Data not supplied.");
              out.close();
         try{
              //Parse data
              rows = new String[height+1];
              rows = data.split(";");
              //Bitmap to store the chart.
              //Reference to graphics object - gr
              BufferedImage chart = new BufferedImage(width,height,BufferedImage.TYPE_3BYTE_BGR);
              Graphics gr = chart.createGraphics();
              gr.setColor(bgColor);
              gr.fillRect(0,0,width,height);     
              String c;
              int r;
              int ri = 0;
              for (int i=0; i<rows.length; i++){
                   //Split individual pixels.               
                   String[] pixels = rows.split(",");               
                   //Set horizontal row index to 0
                   ri = 0;
                   for (int j=0; j<pixels.length; j++){                    
                        //Now, if it's not empty, we process it                    
                        //Split the color and repeat factor
                        String[] clrs = pixels[j].split("_");     
                        //Reference to color
                        c = clrs[0];
                        r = Integer.parseInt(clrs[1]);
                        //If color is not empty (i.e. not background pixel)
                        if (c!=null && c.length()>0 && c!=""){          
                             if (c.length()<6){
                                  //If the hexadecimal code is less than 6 characters, pad with 0
                                  StringBuffer str = new StringBuffer(c);
                                  int strLength = str.length();
                                  for ( int p = c.length()+1; p <= 6 ; p ++ ) {
                                            str.insert( 0, "0" );
                                  //Assing the new padded string
                                  c = str.toString();
                             for (int k=1; k<=r; k++){     
                                  //Draw each pixel
                                  gr.setColor(new Color(Integer.parseInt(c,16)));
                                  gr.fillRect(ri, i,1,1);
                                  //Increment horizontal row count
                                  ri++;                              
                        }else{
                             //Just increment horizontal index
                             ri = ri + r;
              //Returns the image
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition", "attachment; filename=\"FusionCharts.jpg\"");
              OutputStream os = response.getOutputStream();
              ImageIO.write(chart, "jpeg", os);
              os.close();
         }catch(Exception e){
              //IF the image data is mal-formatted.
              out.print("Image data is not in proper format.");
              out.close();
    %>

    NO, APEX does NOT support running jsp or PHP scripts..
    Thank you,
    Tony Miller
    Webster, TX

  • Passing values between jsp and php

    hi there, is it possible to pass values between jsp and
    php? i really need to find out the way if there is
    any. thanks in advance
    -azali-

    Yes, there are a few ways to do this.
    1) Think about using Cookies.
    2) Maybe use a Redirect passing the values in the Query string.
    3) Retain the data in a repository in the back end.
    4) Using Hidden fields within your pages.
    I am sure you can use these Idea's for a base to develop other methods on how to pass values back and forth from JSP -> PHP and vice versa.
    -Richard Burton

  • JSP inside PHP?

    Is it possible (with calculable effort) to integrate JSPs in a PHP driven web site? Or are Java experts kicked off that way?

    Hmm, this is becoming a little tougher. You can't really mix PHP and JSP code in the exact same file, because your webserver would send it off to either the JVM or the PHP interpreter and both are going to fail when reading the 'alien' code.
    I think you could use include tags in a JSP to place the PHP parts where you'd like to have them. I believe the PHP would be parsed before it is given to the JVM and then the result, which is common HTML, is inserted into the JSP page. That way you wouldn't need to rewrite any of the portions that are already available in PHP.
    Check out http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSPIntro8.html for detailed information on including stuff in JSP pages...

  • JSP and PHP together?

    hi all,
    can we use an utility developed in php in our jsp web application.
    thanks
    yashvant

    Depends on the back end technology that u r using ...
    Read more and u will get it ...

  • JSP to PHP

    I have a content management system that is currently all JSP. At login time, session variables are set (username, password, authority level).
    Can and HOW do access JSP-set session varibles with PHP?
    Thanks

    Hi
    The only way, as far as know, is to pass jsp variables encoded via post to your php routine and the start a new php session and set java variables as php variables:
    <?
    start_session();
    if (isset($_POST['name']) && strlen($_POST['name'])) > 0) {
       $_SESSION['name'] = $_POST['name']);
    ?>Also, I know I've seen a java php section in php manuall, but I don't remember if there you will find the answer for your question...
    Nevertheless, I think that java could do anything that php does and the best way will be translate your php routine to java... :)
    Hope this helps
    <xl>

  • What is jsp and php

    hi to all
    this might not the place to ask this question but i need someone to explain his thing once and for all
    what is jsp , what is it used for (please give relevant daily examples)
    what is php, what is it used for( please give relevant daily example)
    Thanks in advance for the help...

    > > i wanna ask again what is STFW ????
    >
    http://www.google.com/search?q=what+is+stfw
    Jeepers.
    ~

  • Jsp versus JSP/SERVLET

    Hello folks! :)
    First of all, I would like to apologize for posting such a question. I suppose with hardly any doubt that it has been raised a lot of times and I feel a little bit ashamed to put it another time... but fact is that I browsed the forum and did not found any real complete and technical answer.
    So, here is my question:
    I have to convince my technical superior (with concrete fact, numbers if possible!)that using SERVLET/JSP is a better way than using only JSP (which is the way they do thing at the time I post this message - everything is done in JSP).
    I did not found any "rocking" argument that demonstrate the benefits of using jsp for application.
    Boss said me "Jsp is just hidden SERVLET, so why not using them" and "we do not have complicated FORMS submission to treat, so JSP are good enough." and "graphical department doesn't work a lot on HTML. So no prob with scriplets".
    I suppose it's ok for now and for "small" projects; but I sense that in the coming future, that will probably become a problem with bigger project.
    So I would like to convince them to start working with servlets now, to avoid future waste of time!
    Thanks or your wise upcoming answers!

    well, there is a fact that servlets and jsp can be used for exactly the same purpose. A JSP page is through a JSP engine transformed to a servlet. You just put servlet code inside the <% and %>. However, the benefit of using servlets is that it is more like pure java-code, and clean from annoying tags. Using JSP also requires you to learn about the functionality behind tags. Also, in using JSP there are more difficult to control errors. In my experience it is really difficult to know where the fault lies in the JSP compared to the servlet.
    I think that it seems like you are quite convinced that servlets are the right choice, and this is what matters if you are the developer.
    Good luck,
    M

  • Include jsp versus seperate class/bean versus taglib

    Hi friends,
    I am working on Servlet/JSP project. There are large no. of jsp pages. A common set of methods get repeated in all the jsp pages. Now my concen is to separate out the methods in a file and then use it in jsp page.
    Kindly suggest me the right path to follow, taking into consideration that we take up the optimized solution and performance-wise also feasible.
    Whether I should go for
    1. Using 'include jsp'
    2. using 'taglib'
    3. creating a seperate utility class with the required methods and 'import' it in the JSP pages.
    Kindly reply ASAP.
    Thanks in advance.
    Regards.

    I would suggest you should go for user defined tags.
    This would ensure that the business functionality is isolated from your web objects and it would be modular to maintain.
    Using simple classes will add java code to your JSP pages, which makes them less readable.
    Apart from that implicit object creation by the Servlet/JSP engine(which are instantiating and garbage collecting the taglib objects) will be more efficient.
    Hope this helps
    regards
    Ravi

  • JSP versus Servlets

    In our shop, we're currently in the planning stages of moving a C++/VB application to the Web, using Java. My boss seems to favor a pure "Servlet" approach to the User Interface (i.e., all HTML will be rendered using Servlets). I strongly believe in a JSP approach for the User Interface. Who's "right" here? Pure Servlets or JSP?

    Definitly easier to do pages in JSP, since you can have all your base HTML code inlined with the JSP output. In a servlet, you need to have the HTML all in out.println() statements, so lots of \" to escape quotes and + concatenation and just making things harder to read.
    You might want to take a look at Struts at jakarta.apache.org/struts. It might help you with the new site.

Maybe you are looking for

  • Conky broken after global update

    I just ran a pacman -Syu and conky was updated to the newest version. Since then I have restarted my computer. When I started KDE I noticed that Conky was not running. I opened up a terminal and tried to run it manually, and I got the following error

  • Strange...I need help!

    So, this afternoon, I was using iTunes, downloading an album off of Slsk (actually, the mac version Ssx).....and, without reason, when I tried to play videos on youtube and google video, the videos would play, but the sound would not........but the s

  • SQL Server Management Studio 2008 R2 not showing Maintenance Plan

    I do not have the Maintenance Plan listed under the Object Explorer.  I am running SQL Server 2008 R2 (that is listed in Control Panel/Programs). When I tried to run the install to check that the management tool is configured I received the "instance

  • SRA gateway performance tuning

    Hello, I don't find any perftune script on my gateway system and nothing in the 7.2 docs. I only found some info for 6.3 (http://docs.sun.com/source/816-6754-10/ch4.html). Do someone already tried to tune a gateway? Are the 6.3 recommandations still

  • Link to MIME Image in WAD

    Hi, I'm trying to get an image stored in the MIME repository to show up on my Web Template.  The image is stored in SAP/BW/Customer/Images/ I have tried everything to no avail:  It looks like when I execute the web template from WAD it automatically