0

I am new to java web development.

Currently I'm learning technologies such as Servlets, Jsp, and Java Frameworks like Spring etc.

I was wondering that as an end user say for a java web-site without applets, would the user of the website be required to install java in his/her machine?

Because it seems that in the case of Servlet and Jsp all execution is done at the servers end and only the result is sent back to the user in html format.

Please correct me if I'm wrong.

Nathaniel Ford
21.3k20 gold badges98 silver badges112 bronze badges
asked Jan 17, 2013 at 5:22
4
  • 1
    all end user need is a Browser Commented Jan 17, 2013 at 5:23
  • Then what's the fuss about disabling Java in web-browzers coz of the recent security issue hardly any web-sites use applets right.And as a Java-EE developer is this something we should be concerned about. Commented Jan 17, 2013 at 5:26
  • @DarkMatter: A loophole was found in the security of Java's applets. That's it, nothing more. The media has hyped the public into thinking that the issue is with Java itself, not just its applet implementation. And no, you do not need to worry about this as a JavaEE developer. Commented Jan 17, 2013 at 5:47
  • @Crynix:Thanks a lot for those words. Commented Jan 17, 2013 at 5:50

6 Answers 6

2

As you suspect, Java is only run on the servers. It is the language that accepts an HTTP Request and processes it, issuing out an HTTP Response. As with most good coding practices, this means that the server program is returning a response that is, essentially, text. The implication here is that you can write the server in any sort of programming language, or set of languages, without the browser needing to know what or why.

Thus, the browser is agnostic to the languages you use on the server.

Java Applets are different; they are compiled Java code that is downloaded by the client and run inside a local JVM. For this to work, the client requires Java to be installed. Applets can be quite small - invisible even - and thus malicious sites can use them on unsuspecting browsers to do wonky things. For this reason people are concerned about Java security holes that would allow applets to do more than they should.

answered Jan 17, 2013 at 5:38
Sign up to request clarification or add additional context in comments.

5 Comments

Is this something a newbie java-ee programmers like myself should be concerned about.Isn't this bringing bad repo to the java language itself.
All languages have security holes that are found constantly. You should learn how to code defensively, but need not worry overmuch about this until you gain more expertise. You'll make mistakes, of course, but better to try and fail than to spend inordinate amount of time worrying about the bevy of problems that might occur. Also, don't worry overmuch about Java's reputation: it's quite solid and a few security holes won't affect people's opinion on it overmuch.
And even if java is disabled in all web browsers the java website would work perfectly right.
That is correct, because what your server is giving back is text; the browser need only interpret it as text.
@NathanielFord:Thanks for the advice.
1

You are correct. The java is executing on the server. The user would only have to install java if the application served applets, which as you say, is not the case here.

answered Jan 17, 2013 at 5:24

2 Comments

Can you comment on the above comment made by me to TechExchange's post.
TechExchange was correct (and brief). I believe the point was that most Java web applications simply produce HTML and JavaScript that is returned to the user's browser. Browsers support this type of content without any additional add-ons. Some web applications however deliver content with technologies that do require browser add-ons. Java, to run applets, as you have mentioned is one example. Another example would be applications that use Flex, which requires Adobe's Flash Player plugin.
0

No need to install java at end user(client). Because HTML renderkit return html format.

But if his or her need to developed , java is need.

answered Jan 17, 2013 at 5:24

Comments

0

hi you need to install jdk if you want to develope any java project,the jdk itself contains jre( java runtime environment),,

you can prefer below link

http://www.journaldev.com/546/difference-between-jdk-jre-and-jvm-in-java

answered Jan 17, 2013 at 5:33

1 Comment

I know that.I was just wondering what's the fuss about disabling java in web-browsers coz hardly any websites apart from a few e-banking apps use applets.
0

You do not need your client systems to have Java installed.

The news about disabling java in web browser was due to some security vulerabilities in the current release (which Oracle said they will fix in October release). But you do not have to worry about it since you do not have applets in your web site. The clients would need java jre installation if you have such plugins as applets

answered Jan 17, 2013 at 5:38

Comments

0

Http is a stateless and text based protocol. That means Http protocol is not able to remember its previous state and this can not hold any state of execution.Its a text based protocol so medium of exchange of information or data over this protocol is text. Main issue with this protocol is that it can handle only one request at a time and send response to user in same manner. But in current time user requirements have changed dramatically. So Http can not handle so much requests at a time as well as cant managed to send multiple response. So Here Java EE and web servers comes into effects

Web-servers provide an environments where a web-applications(servlet,jsp,Java EE) can run,executes and send responses to the client. Web- servers perform task such as:

1: Handle a Http-requests and in the same way send the responses to that requests.

2: Since, Http protocol only understand text so , Web-server parse the request as a text,then process it and then transform that response again into a text and send it to the client server.

3: Provide an environment where web-applications ,request-response and other services can run flawlessly,dynamically and with strong security undergo.

4: And last but not the least, these web-servers are designed and developed in pure java and run it thread-model so you trust your application is in safe hand.

And applets runs in different way, client side at least need JRE to provide an environment to executes an applets. Applets are differs from web-technology.

Arjan Tijms
38.2k12 gold badges112 silver badges144 bronze badges
answered Jan 17, 2013 at 6:33

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.