[英]invoke a java project from jsp button click event
I have created a simple java project to draw the bar chart taking certain values from text file and named it as ChartAdvancedBar.java
, now i need to invoke it when I press a button in JSP file. 我创建了一个简单的Java项目,以绘制从文本文件中获取某些值的条形图,并将其命名为
ChartAdvancedBar.java
,现在我在按JSP文件中的按钮时需要调用它。
I have added this java project within the libraries of my web project. 我已经在我的Web项目的库中添加了这个Java项目。 How can I import this java project to one of my JSP files?
如何将该Java项目导入我的JSP文件之一?
I have added a line: 我添加了一行:
<%@page import="ChartAdvancedBar.*"%>
But it is giving an error that ChartAdvancedBar
doesn't found. 但这是未找到
ChartAdvancedBar
的错误。
Try 尝试
<jsp:useBean id="give id here like an object" class="Fully qualified name of class file">
tag then access method 标签然后访问方法
Make sure it should be compiled before using this. 使用它之前,请确保应对其进行编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.