Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web Technology question...

Options
  • 21-04-2002 12:30pm
    #1
    Posts: 0


    Having read the database thread, I was hoping someone could just clarify a few things that are flying around in my head (amongst other things!) , regarding web programming/development...

    I'm very interested in Java and the internet, and I was thinking of picking up JSP...the problem is i'm still not sure as to what it is exactly?

    1) Is JSP a scripting language or is it an extension of the Java language?

    2) Would JSP be good to know for future reference or would i be better off learning something older like PHP?

    3) Is JSP a class file like java programs, which a webpage passes form results to or is it run completely differently?

    Any help on the above would be great, so i can get a clear idea of what they are and the work they perform.

    If they seem stupid questions, sorry, but hopefully i'll be corrected as to my assumptions.

    Thanks in advance


Comments

  • Registered Users Posts: 2,660 ✭✭✭Baz_


    let me start off by saying, There is no such thing as a stupid question.

    Now I dont know the answer to question 3 there, but Im sure enygma or phobos will be able to help you out.

    Jsp's are coded in Java.

    IMHO Java will emerge (is emerging) as the dominant technology for web development, so to me yes it would be worth your while working with and studying jsp's.

    Question 3, which as I said I dont "know", I will answer as a kind of... The most common task I suppose you will be using a jsp for is to deal with forms or other such inputs, but you dont necessarily have to pass anything to the page (might be a little wasteful of resources if you are loading up a jsp file and not processing anything).

    Again, I stand to be corrected on number 3, and even numbers 1 and 2, but more so on 3


  • Registered Users Posts: 14,761 ✭✭✭✭Winters


    I was going to learn JSP but a few things stopped me. If i was to write my own pages through jsp...where would i host them? At presant i use a FREE hosting account with brinkster.com . They allow you to use Activer Server Pages and have a limited amount of components for free users.

    If you find any hosts that support JSP please tell me.


  • Closed Accounts Posts: 1,322 ✭✭✭phobos


    Now I dont know the answer to question 3 there, but Im sure enygma or phobos will be able to help you out.

    Ta da!! ;) -::- cheers for the plug Baz_

    Right I have the sollution to all your problems. First and foremost, fair play for considering the Java method because you won't go wrong. Lots of people avoid it, because they think it's difficult (it's all hype TBH, as with all new software technologies)

    JSP are an extension to the Java programming language because they let you write web applications, using Java instead of PHP, ASP etc. JSPs are not the first Java web application technology. Before that was Servlets, which was a compiled Java class, just like any Java application, but executed in a Servlet container in a web server (most popular server is Apache's Tomcat). The problem with Servlets was that it was basically a Java program with embedded HTML. If you were to look at the code you would think that it was just another Java program, that inherited from some higher generic web application code. This notion made it difficult for web developers to adopt because they weren't actually programmers, and didn't want to be bothered with learning Java. So the good lads at Sun, got together and created another technology called JSP. JSP to look at, is just a ASCII text document, that looks like HTML, but uses special tags to implement Java code. So now the web developers, could just write JSPs, and deploy them to Tomcat where they would be compiled in to Servlets and run just like Servlets. You don't have to worry about compiling etc, all you have to do is write the page, deploy, and the server takes care of the rest. It's pi$$ easy.

    Say for example you wanted to write a JSP that could send email, what you would do is write a Javabean (Java component) that could send the mail. write a tag library to interface with the component, and then the JSP page would just use the new tags to implement the functionality of the bean, in this case forward on HTML form information to be processed, from that information the email could be sent.

    Here are some sites with information & Tutorials on JSPs
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html [Good Introduction to JSPs]
    http://www.jspin.com/ [Good for pre written stuff etc]
    http://java.sun.com/products/jsp/resources.html [More places to get and see examples]

    Hosting
    I use http://www.mycgiserver.com , they are running Tomcat, and will host both your JSPs and Servlets for free (5 megs, which is loads, trust me). They even have 2 database implementations for you to connect to (also for free). They won't host things like static HTML documents or other resources like graphics. The idea is that you host them somewhere else and have your HTML code reference the web applications running here from there. Take for example you have your normal web stuff hosted by brinkster, and your java stuff hosted here. All works together to make your site work.

    HTH ;)

    ;-phobos-)


  • Registered Users Posts: 2,660 ✭✭✭Baz_


    np for the plug phobos, in fact I'm glad you did post that was some very informative stuff, and I will find it extremely useful meself.


  • Closed Accounts Posts: 6 99eurohosting


    I wouldn't write off servlets. Performance wise there is a benefit to using them particularly with database intensive applications. It is true that you do need to be a fairly good Java programmer to use them, so JSP (and beans) is good if full Java isn't your cup of tea.

    Personally I will be using the next version of ColdFusion (Neo) which is pure Java. This will allow you to mix CFML, JSP and Servlets very easily. Certain technologies suit certain problems. CFML is great for quick and dirty presentation and Servlets for processor intensive activity. JSP probably lies somewhere in between.

    On the hosting side of things, try out www.99eurohosting.com based in Ireland. We do JSP 1.2 and Servlets 2.3 on Tomcat 4.0.1. If you just want to learn JSP, then I might be able to do you a special deal.


  • Advertisement
  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Whoa! An extra €150 for JSP/Servlet is a bit much don't you think?
    Especially since you're only offering Tomcat as the Container.

    Tomcat's only an implementation for Suns JSP and Servlet specs and while it's fine for learning on or working on at home it's not great for deploying live sites on.

    Resin (www.caucho.com) is really (really reeeeelly) fast JSP container that's got tons of extra features over Tomcat. It's not free for commercial use but at least you could justify the extra charge.

    I've done quite a bit of benchmarking between Tomcat (4.0.1) and Resin(2.0.4) and Resin comes out about 4x-6x faster than Tomcat consistently. It scales a lot better too under pressure.

    I used www.cqhost.com before, didn't have any problems at all. My buddy hosts a site there that gets 10,000+ hits a day and it's running just fine.


  • Closed Accounts Posts: 6 99eurohosting


    There is much more of an overhead for sites using something like Tomcat. There is also more administration involved at the ISP compared to something like PHP and there is less of a market out there.... i.e. less competition means higher prices.

    My experience is that customers who use JSP / Servlets require more support because they often have special needs.

    I'm not going to dispute your claims on resin since I know nothing about it. All I do know is that I have satisfied customers using Tomcat.

    Anyway 249 euros isn't a lot to pay for JSP/Servlets with MySQL Database considering the level of support we supply.

    I take your point though.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Friendly warning :) No advertising.


  • Closed Accounts Posts: 6 99eurohosting


    Point received Hobbes.

    Consider this the last post of 99eurohosting on the boards.....

    I've noticed a few other users making eejits of themselves with blatant advertising where they go completely off topic. I won't fall into that trap....

    :)

    Ciao for good.... to be reborn as a 'normal' user.... ;)


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Fair enough, I understand that it takes a bit more effort to admin the Contexts etc and there's little demand.

    One good point for Resin is that a Context does not need to be restarted every time a new jar is added to the /WEB-INF/lib folder which I'd imagine might reduce some of the administration on your part.

    You can evaluate it for free so it's worth checking it out. Even if you don't it's good to see hosting companies offering JSP at least.


  • Advertisement
  • Registered Users Posts: 344 ✭✭DC


    I am interested in exploring the various JSP/Servlet engines out there.

    I have used Tomcat 3/4 and messed around with JRun. Resin I had heard about but never gone near for whatever reason (laziness?).
    Reloading contexts is a bit of a pain so that 'dynamic' feature of resin sounds good.

    One advantage of Tomcat is its integration with JBoss (jboss.org) which is a full J2EE implementation.
    I am a complete novice when it comes to J2EE, so I have a bit of a learning curve with it.

    I would consider Tomcat to be of production quality. Lots of live sites use it successfully. Can't testify to its performance levels versus other containers/engines....

    99euro.... you are too hard on yourself :) At least I know you exist now....


  • Closed Accounts Posts: 10 gg_666


    Got in a bit late on this thread but you can find a list of ISP's supporting Servlets her, complete with prices and some reviews.

    .http://www.servlets.com/isps/servlet/ISPViewAll

    NO Irish Hosts mentioned yet!

    GG


Advertisement