package test; public class PrintMessage { public String print() { return “使用JavaBean返回信息”; } }
页面文件:
<%@ page import=”test.*” %> <jsp:useBean id=”printMessage” class=”test.PrintMessage” scope=”request”/> <html> <head><title>测试
title>
head> <body> 第一阶段<% out.print(printMessage.print()); %>
body>
html>
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/227994.html原文链接:https://javaforall.net
