[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can I use JAVA code in HTML?

Posted on 2001-06-15
2
Medium Priority
?
150 Views
Last Modified: 2010-04-09
I konw one can use Java code in JSP with tags like

<%@ page language="java" %>
...
<%
  response.setHeader("Pragma", "No-cache");
  response.setHeader("Cache-Control", "no-cache");
  response.setDateHeader("Expires", 0);
%>

Can I use these code in HTML as well?
0
Comment
Question by:chenwei
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
CJ_S earned 40 total points
ID: 6194566
No...but you can use META tags to achieve the same

<META HTTP-EQUIV="Expires" CONTENT="Fri, Jun 12 1981 08:20:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">

Regards,
CJ
0
 
LVL 1

Expert Comment

by:iagorubio
ID: 6194573
This jsp code is embeded in an HTML page, but you need a Java enabled server, to parse the java code and send a response to the client.

If your server is not Java enbled, you can not run Java Server Pages.

In fact, even if  your server have java support, some scripting and compiling Java Servlets or Beans should be necesary to give full Java power (data base acces, ...) to your pages.

You can dowload the Java 1.3 SDK from http://java.sun.com/j2se/1.3/  by choosing your OS and providing them an e-mail address (you set, this way, an account that gives you full acces to documentation pages. It's free).

It came with some documentation packaged, and development tools as a compiler, debbuger, appletviewer, .. and more. You can also develope Java applets to directly embed it in any web page, with no matter about the server. But the client may be java enabled (Netscape, Explorer,Hot Java, AOL and others are Java enabled Browsers).
You can see the documentation packaged with the SDK in http://java.sun.com/docs/books/tutorial/ 
More Info about Java in http://developer.java.sun.com/developer/infodocs/  (Require logging).

Hope this heps.

- Iago -
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question