相关疑难解决方法(0)

Java EE开发入门

您使用什么IDE以及在哪里可以学习使用Java EE平台?

java java-ee

2
推荐指数
1
解决办法
1927
查看次数

java可以用作网站的服务器端语言吗?

假设,java可以用来编写一个网站而不是asp.net.还是php?

java server-side

1
推荐指数
2
解决办法
6760
查看次数

上传pdf文件

我想通过使用下面给出的代码上传pdf文件.它提供浏览设施,但不上传文件.当我点击sendfile按钮时,显示uploadfile.html代码页.我怎样才能做到这一点???给定代码中的错误在哪里???

文件名,upload.html

<%@ page language="java" %>
<HTml>
<HEAD><TITLE>Display file upload form to the user</TITLE></HEAD>  
<% //  for uploading the file we used Encrypt type of multipart/
form-data and input of file type to browse and submit the file %>
  <BODY> <FORM  ENCTYPE="multipart/form-data" ACTION=
"uploadfile.html" METHOD=POST>
        <br><br><br>
      <center><table border="2" >
                    <tr><center><td colspan="2"><p align=
"center"><B>PROGRAM FOR UPLOADING THE FILE</B><center></td></tr>
                    <tr><td><b>Choose the file To Upload:</b>
</td>
                    <td><INPUT NAME="F1" TYPE="file"></td></tr>
                    <tr><td colspan="2">
<p align="right"><INPUT TYPE="submit" VALUE="Send File" ></p></td></tr>
             <table>
     </center>      
     </FORM>
</BODY>
</HTML>
Run Code Online (Sandbox Code Playgroud)

文件名 …

java jsp file-upload

1
推荐指数
1
解决办法
2万
查看次数

JSP 导入文件

再会!

我在运行 JSP 程序时遇到以下错误。

java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response
Run Code Online (Sandbox Code Playgroud)

我的 JSP 中的 html 文件似乎不起作用。我的代码如下:

<%@page import  = "java.util.*"%>
<%@page import  = "javax.servlet.*"%>
<%@page import  = "javax.servlet.http.*"%>
<%@page import= "session.*" %>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <%
            Item item = (Item) request.getAttribute("invenItem");

            if (item != null) {
                out.println("<html><title>Inventory Item</title>");
                out.println("<body><h1>Inventory Item Details:</h1>");
                out.println("Stock ID  : " + item.getStockID() + "<br/>"); …
Run Code Online (Sandbox Code Playgroud)

java jsp

1
推荐指数
1
解决办法
8756
查看次数

JFileChooser弹出2次

这是我的JSP文件.

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            //JFileChooser filechoose = new JFileChooser();
            JFileChooser filechoose = new JFileChooser("D:\\");
            filechoose.showOpenDialog(null);
            File file = filechoose.getSelectedFile();
            XLCauHoi.ImportXmlFileToData(file);
        %>
        <h4> ?ã xu?t file thành công </h4>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的问题是:JFileChooser当我在浏览器上运行时弹出2次.如果我在Java类中运行它,会JFileChooser弹出一次.我的问题是什么以及如何解决?

java swing jsp jfilechooser

0
推荐指数
1
解决办法
1724
查看次数

标签 统计

java ×5

jsp ×3

file-upload ×1

java-ee ×1

jfilechooser ×1

server-side ×1

swing ×1