如何在jsp页面中显示java输出 [英] How to display java output in jsp page

查看:1114
本文介绍了如何在jsp页面中显示java输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sheet.jsp页面试试这个







<%@ page import = com.ExcelDataParser%>





< meta http-equiv =Content-Typecontent =text / html; charset = ISO-8859-1>

< title>在这里插入标题





< br $> b $ b

out.write(+ work +
);











i得到这样的输出out.write(input type =radio>+ work +br> ;);我没有得到床单显示在console.in控制台我有这样的

sheet1

sheet2

sheet3

sheet4我想在jsp页面中显示相同的输出,所有sheet的单选按钮。我想要示例代码



我尝试过: < br $> b $ b

sheet.jsp page am trying this



<%@ page import="com.ExcelDataParser"%>


<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here




out.write("" + work+"
");





i got output like this out.write("input type="radio">"+work+"br>"); am not getting sheets what display in console.in console i got like this
sheet1
sheet2
sheet3
sheet4 i want to display same output in jsp page with radio button for all sheet.i want sample code

What I have tried:

package com;

import java.io.FileInputStream;

import java.io.IOException;

import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class ExcelDataParser
{
	public static void main(String args[])	 throws IOException
	{




		//ArrayList<string> arr=new ArrayList<string>();

    	try {
    		 String str="C:\\Downloads\\Associate_Details.xlsx";

             FileInputStream fileInputStream = null;

			fileInputStream = new FileInputStream(str);
			 XSSFWorkbook workbook = new XSSFWorkbook(fileInputStream);
	        	String work=null;
	        	for (int i = 0; i < workbook.getNumberOfSheets(); i++)
	        	 {

	        		   work=workbook.getSheetName(i);
	        		 //  arr.add(work);




	        	System.out.println(work);

	        	 }
	        	workbook.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}



	}

	}

推荐答案

这是您第三次发布此问题。请不要继续重新发布。如果您有额外的信息需要添加,请编辑原文。
This is the third time you have posted this question. Please do not keep reposting. If you have extra information to add then edit your original.


这不是您的工作方式。



您需要学习全新的发展领域。

请在google上搜索如何在JAVA中开发Web应用程序

您可以快速查看 JSP教程 [ ^ ]



但是如果你想使用你的一些java应用程序或函数创建一个静态页面;然后你可能需要创建自己的规则,如何将xls文件传输到html或jsp文件
This is not how you do this.

You need to learn whole new area of development.
Please search on google about how to develop web application in JAVA
You can take a quick look at JSP Tutorial[^]

But if you want to create a static page using your some java application or function; then you probably need to create your own rule about, how you are going to transfer a xls file to an html or jsp file


这篇关于如何在jsp页面中显示java输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆