js调用applet实现和Servlet的数据和文件上传下载

applet文件上传 applet文件上传applet文件上传applet文件上传applet文件上传applet文件上传applet文件上传applet文件上传applet文件上传 立即下载

http://www.g4studio.org/thread-766-1-1.html

1.上传的代码:

applet代码:


package applet;
import java.applet.Applet;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
//本地文件上传(与Servlet交互)
public class AppInt extends Applet {

private String filePath;
private String fileName;
private String url;

private boolean bl=false;
public String getFilePath() {
    return filePath;
}
public void setFilePath(String filePath) {
    this.filePath = filePath;
    System.out.println(this.filePath);
}
public String getFileName() {
    return fileName;
}
public void setFileName(String fileName) {
    this.fileName = fileName;
    System.out.println(this.fileName);
}
public String getUrl() {
    return url;
}
public void setUrl(String url) {
    this.url = url;
    System.out.println(this.url);
}
public void setBl(){
    this.bl=true;
    System.out.println(this.bl);
    send();
}

public void init() {   
    if(this.bl){
     send();
    }
}

public void send() {
    {
     try {
      String filePath=getFilePath();
      String fileName =getFileName();   
      String urlstring=getUrl();
      System.out.println(filePath+"*****");
    //网络路径很重要
    URL url1 = new URL(urlstring+"?fileName="+URLEncoder.encode(fileName,"utf-8"));
    //打开打开SOCKET链接
   
      HttpURLConnection conn = (HttpURLConnection) url1
      .openConnection();
    conn.setRequestMethod("POST");
    conn.setAllowUserInteraction(true);
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.setUseCaches(true);
    conn.setRequestProperty("Content-Type", "application/octet-stream");
  
    File jpgFile = new File(filePath);
    if (jpgFile.isFile()) {
    // 建立文件的输入流
     FileInputStream fileInputStream = null;
     fileInputStream = new FileInputStream(jpgFile);
     BufferedInputStream bis = new BufferedInputStream(
       fileInputStream);
     OutputStream os = conn.getOutputStream();
     BufferedOutputStream bos = new BufferedOutputStream(os);
     int len = 0;
     byte[] bty = new byte[4096];
     while ((len = bis.read(bty, 0, 4096)) != -1) {
      bos.write(bty, 0, len);
      bos.flush();
     }
     bos.close();
     bis.close();
     System.out.println(conn.getContentType() + ": "+ conn.getResponseCode());
    }
     } catch (Exception e) {
      e.printStackTrace();
     }
    }
}
}


对应的Servlet代码:

package servlet;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Calendar;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.DB.DBconnect;
public class Receive extends HttpServlet {

public Receive() {
    super();
}

public void destroy() {
    super.destroy(); // Just puts "destroy" string in log
    // Put your code here
}

public void doGet(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
}

public void doPost(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
    // PrintWriter out=response.getWriter();
    InputStream in = request.getInputStream();         
          //System.out.print("qqqq");
  
      
    String name=new String(request.getParameter("fileName").getBytes(),"utf-8");
   
    String nn=new String(name.getBytes("ISO8859-1"),"utf-8");
    System.out.println("文件名:"+name+"******"+nn);
   
    String tr=name.substring(name.lastIndexOf("."),name.length());
  
   // 根据时间得文件名
      Calendar calendar = Calendar.getInstance();
      String filename = String.valueOf(calendar.getTimeInMillis())
        +tr;
      
    System.out.println("服务器,文件名:"+name);
   
          File f = new File("C:\\imgrec\\"+filename);
          String path="c:/imgrec/"+filename;
          FileOutputStream fos = new FileOutputStream(f);
           byte[] b = new byte[1024 * 1024];
           int bytes, sumBytes = 0;
           while (true) {
               bytes = in.read(b);
               if (bytes <= 0)
                   break;
               sumBytes += bytes;
               fos.write(b, 0, bytes);
           }
           fos.close();
           in.close();
           
           
           /*
            * 保存上传记录
            */
           DBconnect dao=new DBconnect();
           String sql="insert into fileList(fileName,filePath,name) values('"+filename+"','"+path+"','"+name+"')";
           dao.save(sql);
           dao.close();
         
          }

public void init() throws ServletException {
}
}

JSP页面:

<%@ page language="java" import="java.util.*,applet.GLAppInt" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
     
     
     <title>test.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">     
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>

<body >
<APPLET    CODE = "applet.GLAppInt.class" archive="applet.jar" height="90%" MAYSCRIPT>
<param name="path" value="E:\test\upload">
</APPLET>
<script type="text/javascript">
function saveHtml(){
var filePath=document.applets[0].getAn();
var fileName=document.applets[0].getName();
//alert(fileName);
document.location="show.jsp?filePath="+filePath+"&fileName="+fileName;
}

</script>


</body>

</html>
//*************************
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
     <base href="<%=basePath%>">
     
     <title>My JSP 'show.jsp' starting page</title>
     
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">     
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

</head>

<body>
   
   
     <%
    String url=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/appUpFile/servlet/Receive" ;
    String filePath=request.getParameter("filePath");
   
    if(filePath.length()>0){
    String fileName=request.getParameter("fileName");
    String[] fPath=filePath.split(",");
    String[] fName=fileName.split(",");
   
   
    %>
    <div>
     <APPLET    CODE = "applet.AppInt.class" archive="ctr.jar" mayscript height="1" width="1">   
         </APPLET>
     <script type="text/javascript">
     function tsb(n){
       var fn=document.getElementById('fn'+n).value;
       var fp=document.getElementById('fp'+n).value;
       var ul='<%=url%>';
      document.applets[0].setFileName(fn);
      document.applets[0].setFilePath(fp);
      document.applets[0].setUrl(ul);
      document.applets[0].setBl();
     }
    </script>
    </div>
   
    <div align='center'>本地文件上传</div>
     <form action="">
     <table>
     <tr>
     <td>文件名</td>
     <td>路径</td>
     <td>上传</td>
     </tr>
     <%
     for(int i=0;i<fName.length;i++){
    String fp=new String(fPath.getBytes("ISO-8859-1"),"utf-8");
     String fn=new String(fName.getBytes("ISO-8859-1"),"utf-8");
   
     %>
     <tr>
     <td><input type="hidden" name="fn<%=i %>" id="fn<%=i %>" value="<%=fn %>"><%=fn %></td>
     <td><input type="hidden" name="fp<%=i %>" id="fp<%=i %>" value="<%=fp %>"><%=fp %></td>     
     <td><input type="button" name="sb" value="上传">
     </td>
     </tr>
     <%
     }
     %>
     </table>
     </form>
<%
}
%>

</body>
</html>






数据库设计:

fileList表:有4个字段 id,fileName,filePath ,name

package com.DB;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class DBconnect {
public static Connection conn = null;
public DBconnect() {
    this.conn = getMySqlConnection();
}
public static Connection getMySqlConnection() {
    String url = null;
    try {
     Class.forName("com.mysql.jdbc.Driver");
     url = "jdbc:mysql://localhost:3306/listenle?useUnicode=true&characterEncoding=UTF-8";
     conn = DriverManager.getConnection(url, "root", "rufeng8848");
    } catch (Exception e) {
     e.printStackTrace();
    }
    return conn;
}
/*
* 插入表fileList 给每一次上传的文件做好记录
* 记录上传
*/
public void save(String sql){
    Statement st=null;
  
    try {
     st=conn.createStatement();
     st.execute(sql);
    } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
}
/*
* 取出fileList表中 文件名,路径
* 便于下载
* 返回类型为
*/
public ResultSet findAll(){
    ResultSet rs=null;
    Statement st=null;
    String sql="select * from fileList";
    try {
     st=conn.createStatement();
     rs=st.executeQuery(sql);
    } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
    return rs;
}
/*
* 关闭链接
*/
public void close() {
    try {
     conn.close();
    } catch (SQLException e) {
     e.printStackTrace();
     System.out.println("关闭异常");
    }
}
}

这样就可以上传了。
经过测试发现,JS调用applet报java.security.accesscontrolexception异常。
原来是安全机制的问题。在客户端修改一下java的安全机制就可以了。
总结:在文件的传输中是流的形式存在的,在硬盘上是文件的形式存在的。我们要做的只是通过HttpServletRequest和HttpServletResponse,或者是response和request来发送流和读取流。以及把文件转换成流或把流转换成文件的操作。
现在该下载了:
下载的代码如下:
applet代码

package applet;
import java.applet.Applet;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import javax.swing.ProgressMonitor;
import javax.swing.ProgressMonitorInputStream;
public class Down extends Applet {
private String filePath;
private String fileName;
private String url;
private boolean bl=false;

public String getFilePath() {
    return filePath;
}
public void setFilePath(String filePath) {
    this.filePath = filePath;
    System.out.println(this.filePath);
}
public String getFileName() {
    return fileName;
}
public void setFileName(String fileName) {
    this.fileName = fileName;
    System.out.println(this.fileName);
}
public String getUrl() {
    return url;
}
public void setUrl(String url) {
    this.url = url;
    System.out.println(this.url);
}
public void setBl(){
    this.bl=true;
    System.out.println(this.bl);
    download();
}

public void init() {
}
public void download() {
    try {
     String filePath=getFilePath();
     String fileName =getFileName();   
     String urlstring=getUrl();
     System.out.println(filePath+"*****");
     //网络路径很重要
     URL url1 = new URL(urlstring+"?filePath="+filePath);
     //打开打开SOCKET链接
   
     HttpURLConnection conn = (HttpURLConnection) url1
     .openConnection();
conn.setRequestMethod("POST");
conn.setAllowUserInteraction(true);
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(true);
conn.setRequestProperty("Content-Type", "application/octet-stream");
     conn.connect();
     //获取流
       InputStream    is=conn.getInputStream();   
      
       System.out.println("获取流成功*****:"+is.read());
       //取文件类型
       //fileName 完整的文件名
      // String tr=fileName.substring(fileName.lastIndexOf("."),fileName.length());
     File file = new File("E:/test/upload/"+fileName);
     byte line[] = new byte[1024];
     int a;
     String temp = "";
     a = is.read(line);
     FileOutputStream outstream = new FileOutputStream(file);
     while (a != -1) {
      outstream.write(line);
      temp = temp + (new String(line));
      a = is.read(line);
     }
     is.close();
     outstream.close();
    } catch (IOException e) {
    }
}
}




对应的Servlet代码:

package servlet;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Calendar;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.DB.DBconnect;
public class DownFile extends HttpServlet {
/**
* Constructor of the object.
*/
public DownFile() {
    super();
}
/**
* Destruction of the servlet. <br>
*/
public void destroy() {
    super.destroy(); // Just puts "destroy" string in log
    // Put your code here
}
/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out
      .println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
    out.println("<HTML>");
    out.println(" <HEAD><TITLE>A Servlet</TITLE></HEAD>");
    out.println(" <BODY>");
    out.print("     This is ");
    out.print(this.getClass());
    out.println(", using the GET method");
    out.println(" </BODY>");
    out.println("</HTML>");
    out.flush();
    out.close();
}
/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
    // PrintWriter out=response.getWriter();
      byte[] buff = new byte[1024];
      boolean cont = true;
      FileInputStream infile = null;
      ServletOutputStream fos=null;
    String filePath=(String)request.getParameter("filePath");
    File fe=new File(filePath);
    try {
       infile = new FileInputStream(fe);
      // fos = new FileOutputStream(fe);
       fos=response.getOutputStream();
      } catch (FileNotFoundException e) {
       System.err.println("没有找到文件");
       System.exit(1);
      }
      int n = infile.read(buff);
      while (n!=-1) {
       try {
         // 从文件读取数据
        fos.write(buff, 0, n); // 写入System.out中
        n=infile.read(buff);
        
       } catch (Exception e) {
        cont = false;
       }
      }
      System.out.println("写入流成功!");
      try {
       infile.close();
       fos.close();
      } catch (IOException e) {
       System.err.println("文件错误");
       System.exit(1);
      }

    //InputStream in = request.getInputStream();         
         //System.out.print("qqqq");
  
      
  
   
      
         
}
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException {
    // Put your code here
}
}

JSP代码:

<%@ page language="java" import="java.util.*,com.DB.DBconnect,java.sql.ResultSet" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
     <base href="<%=basePath%>">
     
     <title>下载</title>
     
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">     
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<%
String url=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/appUpFile/servlet/DownFile";
    DBconnect dao=new DBconnect();
   
    %>
</head>

<body>
     服务器文件下载 <br>
     <div>
     <APPLET    CODE = "applet.Down.class" archive="down.jar" mayscript height="1" width="1">   
         </APPLET>
     <script type="text/javascript">
     function tsb(n){
       var fn=document.getElementById('fn'+n).value;
       var fp=document.getElementById('fp'+n).value;
       var ul='<%=url%>';
      document.applets[0].setFileName(fn);
      document.applets[0].setFilePath(fp);
      document.applets[0].setUrl(ul);
      document.applets[0].setBl();
     }
    </script>
    </div>
   
     <table>
     <tr>
     <td>文件名</td>
     <td>路径</td>
     <td>下载</td>
     </tr>
     <%
     try{
     int i=0;
      ResultSet rs=dao.findAll();
      while(rs.next()){
      %>
      
      
      <tr>
     <td><input type="hidden" name="fn<%=i %>" id="fn<%=i %>" value="<%=rs.getString("name") %>"><%=rs.getString("name") %></td>
     <td><input type="hidden" name="fp<%=i %>" id="fp<%=i %>" value="<%=rs.getString("filePath") %>"><%=rs.getString("filePath") %></td>     
     <td><input type="button" name="sb" value="下载">
     </td>
     </tr>
     
      <%
       //rs.getString("fileName");
      i++;
      }
      }catch(Exception e){
      e.printStackTrace();
      }      
     %>
</table>
<%
    dao.close();
    %>
     
</body>
</html>

OK下载搞定了

servlet上传 易懂的servlet语言编写简单的上传操作, 立即下载

相关推荐

servlet上传图片

servlet上传图片的例子,还有二分算法,最近敲得代码例子

纯js调用Servlet图片上传(XMLHttpRequest/FormData方式IE10+才行)(获取参数为空的问题)

JS端 //上传文件方法 function upladFile() { //纯js调用Servlet图片上传(XMLHttpRequest/FormData方式IE10+才行) //注意(浏览器高速模式/IE10+才行,IE10-不支持FormData()) var form = new FormData(); // FormDat...

tanzongbiao的专栏 732

applet上传,已嵌入html并打jar,下载即用

java applet 实现的大附件上传,将客户端下载到浏览器页面 ,直接操作ftp服务器,此demo,已经将applet小程序嵌入页面并打jar,下载即用

Servlet——文件上传

更改表单提交方式:form enctype = “multipart/form-data”,method 必须为post(如果不更改,则文件上传并不能上传实际文件里的内容,上传的只是文件名称等元信息)默认的表单提交方式为application/x-www-form-urlencoded 上传文件后网络抓包先正常操作,重写doPost然后,必须使用@MultipartConfig修饰类读取文件时,用req.getPart()如下面这个例子:前端: 后端: 实现结果: 点击选择文件,弹出本地文件目录,选择将要

敲敲敲 2014

Centos7.9使用kubeadm部署K8S集群

使用kubeadm部署一个k8s集群,单master+2worker节点。

lldhsds的专栏 1301

知识图谱与人工智能本体论:构建机器认知的语义基石

本文探讨了知识图谱与人工智能本体论如何作为机器认知的语义基石,让AI从‘知道数据’迈向‘理解知识’。文章详细拆解了本体论的核心构件与构建方法,并阐述了从本体到知识图谱的实践路径,包括知识获取、融合、存储及推理应用,最终分析了其在智能搜索与专家系统等场景中带来的根本性重塑。

nginx7reverse的博客 910

java applet 文件上传组件,Applet 文件上传进度条有关问题

Applet 文件上传进度条问题在applet中用HttpURLConnection 来上传文件,现在出现一个问题,如果在eclipse中运行applet上传插件,连接tomcat上传没问题,进度条也能实现,但如果把applet放到jsp页面中,在浏览器中访问,上传就出错,进度条也有问题,大概的问题是sessionID的原因。在用HttpURLConnection 进行上传的时候,我都会手动设置s...

weixin_34006342的博客 236

头歌平台-人工智能导论实验(人脸识别)

答案仅供参考,自己动手丰衣足食!!!

qq_52119136的博客 3026

applet实现大文件ftp上传(一,面试秘籍

bl = true; } } }catch(Exception e){ //可具体报错到用户和密码 throw new BaseException(“FTPConnError02”,new String[]{“connect”,e.getMessage()}); } return bl; } public DownloadStatus download(String remote,String local) throws Exception{ //设置被动模式 ftpClient.enterLocalPas

m0_61488759的博客 190

Golang实现企业级AI智能体安全合规自动化检测系统

需求:自动化解析欧盟AI法案、中国网络安全法、美国NIST框架等多国法规,提取具体合规要求并映射到企业技术实现。技术挑战法规文本非结构化,语义复杂,存在大量法律术语与技术术语交叉多语言支持(中文、英文、欧盟24种官方语言)法规动态更新(平均每季度更新2-3次)架构创新性:提出了"规则引擎+AI模型+实时监控"的混合架构,兼顾了合规要求的明确性与智能体行为的动态性。性能突破:通过Golang协程、多级缓存、数据库优化等技术,实现了12,800 req/s的高吞吐量和38ms的低延迟。准确性提升。

shao.bing的专栏 722

GEPA_AIME教程:使用GEPA优化数学问题求解的完整指南

本教程展示了如何使用DSPy框架中的GEPA(Generative Evolutionary Prompt Adaptation)优化器来提升大语言模型在数学竞赛问题(AIME)上的表现。# 创建基础的链式思考程序"""带有详细反馈的评估指标,为GEPA提供学习信号"""try:# 处理解析错误feedback_text = f"最终答案必须是一个有效的整数。你回答了'

步子哥的博客 1386

javaapplet js调用applet实现上传下载

转自:http://writeblog.youkuaiyun.com/blog/714839<br />1.上传的代码:<br />applet代码:<br />package applet;<br /><br />import java.applet.Applet;<br />import java.io.*;<br />import java.net.HttpURLConnection;<br />import java.net.URL;<br />import java.net.URLEncoder;<br />

xiaowu218的专栏 915

超详细的Burp Suite安装使用

‌Burp Suite是一个强大的Web应用安全测试工具,适用于网络安全专业人士进行自动化网络应用程序的安全测试。‌ 它提供了在Windows和Kali Linux上安装和激活Burp Suite Professional的简便步骤,帮助用户快速集成并启用强大的网络扫描和渗透测试功能。Burp Suite的特点包括易于安装、良好的兼容性、内置的自动化工具、优秀的用户体验以及详细的教程,使得无论是安全领域的新手还是经验丰富的专家,都能轻松上手并高效地进行安全测试。此外,Burp Suite还支持扩展功能的使用

Dreams°的博客 2641

JSP和Servlet常见面试题

1. Servlet的生命周期? 装载Servlet类并创建实例阶段,该阶段在默认情况下发生在客户端第一次向服务器端发送请求 初始化阶段,servlet实例创建完成后,调用init(ServletConfig config)方法对该实例完成初始化工作 服务阶段,根据Http请求方式,调用service()方法中对应的doGet()或doPost()方法,并将响应结果返回 销毁阶段,当服务器关闭或...

SileeLiu的博客 3082

GEE高阶应用——如何绘制2000-2022年土地利用变化轨迹时序图

土地利用变化是指在一定时间范围内,土地利用类型和结构发生的变化。时序变化是指这种变化随时间的推移而发生的序列变化。土地利用变化轨迹的时序变化具体介绍如下:首先,土地利用变化轨迹的时序变化体现在土地利用类型的演变上。在过去的几十年里,随着人口的增加、经济的发展和城市化的推进,土地利用类型发生了显著的变化。传统的农田逐渐减少,而城市、工业、交通、居住等用地的面积不断扩大。同时,随着环境保护意识的提高,生态保护用地、森林、湿地等绿色用地的面积也在增加。

此星光明博客 1113

【数据集8】全球人口数据WorldPop详解

全球人口数据WorldPop详解

WW、forever的博客 7879

Applet和ajax

Applet 定义   Applet是一种运行于Web客户端环境下的Java程序组件。 工作原理   Applet以代码的形式嵌入Web页面中,用标签<applet></applet>标明,当支持Java的网络浏览器遇到这对标记时,就下载相应的应用程序代码,并在本地计算机上执行Applet。 作用优势   Applet可以提高Web页面的交互能力和动态执行能力 ...

weixin_30726161的博客 137

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

JS和JSP的区别

转载自:http://blog.youkuaiyun.com/a2806005024/article/details/28265503 最近很多同学在纠结于名词缩写之间的相似性,因此本人也来写一篇,讲讲JS和JSP的区别。 SUN首先发展出SERVLET,其功能比较强劲,体系设计也很先进,只是,它输出HTML语句还是采用了老的CGI方式,是一句一句输出,所以,编写和修改HTML非常不方

aedvance的博客 530

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

servlet与jsp比较

1.Servlet是什么? Java提供了一整套客户机/服务器解决方案,在这个方案中,程序可以自动地下载到客户端并执行,这就是applet。但是它仅仅是问题的一半。问题的另一半就是Servlet,Servlet可以被认为是服务器端的applet。Servlet被Web服务器加载和执行,就如同applet被浏览器加载和执行一样。Servlet从客户端(通过Web服务器)接...

bangci6459的博客 162

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

关于jsp和servlet的区别

JSP与Servlet 这篇文章的主要目的不是单纯的介绍JSP,也不是详细的介绍Servlet。这是一篇讲述JSP和Servlet之间关系的基础性文章。这篇文章主要是针对那些学习JSP的人而写的。至于Servlet和JavaBean以及Servlet和XML我的两个同学在他们的文档中将会给出明确的解释。 本文的主要结构: 1. Servlet是什么? 2. JSP与Servlet. 3.

qq_3693的博客 343

JAVA--Servlet

Servlet是Server Applet的简称,Java编写的服务器端的程序.servlet运行在web服务器中,web服务器负责Servlet和客户的通信以及调用Servlet方法作用:​ 请求:接收用户发送的请求数据​ 处理:调用其他的java程序来处理请求​ 响应:根据处理结果,将结果响应给客户端客户端连上服务器后,向服务器请求某个web资源,称之为客户端向服务器发送了一个http请求。

qq_56486237的博客 96

分布式计算、云计算与大数据第五章

HTTP协议 HTTP协议是TCP/IP 协议栈中的应用层协议,而TCP/IP是Transmission Control Protocol/Internet Protocol的简写,中译名为传输控制协议/因特网互联协议,又名网络通讯协议,是Internet最基本的协议和Internet国际互联网络的基础。TCP/IP 定义了电子设备如何连入因特网,以及数据如何在它们之间传输的标准。 TCP/IP协...

CYHYZC的博客 708

Report+jasperReport客户端打印

http://ajava.org/hot/print/16569.html<br />Report+jasperReport客户端打印 时间:2009-10-28 23:44    来源:未知    作者:凌晨风 优快云IEQQ百度我挖GooglePOCOYahoo新浪365Key天极和讯博拉Live奇客鲜果收客饭否叽歪挖客核心提示:jasperReport客户端采用 applet,appl

mmllkkjj的专栏 2584

arcims开发经验总结(4) (arcIMS 客户端 连接器的选择)

客户端选择。   就IMS来说提供了 HTML Viewer Java Standard Viewer Java Custom Viewer    Java Standard Viewer,Java Custom Viewer功能差不多。 对于程序员、中国客户来说。Java    Standard Viewer基本不用。典型的胖客户端,Image 和Feature MapServices 都要下载

原创专栏 开源学习 3742

Web原理与与应用开发

HTTP协议 WWW

weixin_45961305的博客 243

pushlet java_pushlet 之 Pushlet使用手把手实例

Pushlet(一种comet 架构的实现)是基于Servlet 机制,数据从server端的Java 对象直接推送(push)到客户端浏览器的(动态)HTML 页面,而无需任何Java applet 或者插件的帮助。在MyEclipse中创建工程。附件包含了从官方下载的Pushlet包已经本次的源码包,直接导入到开发工具即可。在创建的工程中增加pushlet.jar,log4j.jar。拷贝pu...

weixin_28811757的博客 200
上一篇: Css+Div布局小结
下一篇: java读写文件大全
crazy_fire
博客等级 码龄18年 19粉丝 57原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值