后端代码第三部分
package com.student.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.student.service.IStudentService; import com.student.service.StudentServiceImp; /** * Servlet implementation class AddStudentServlect */ @WebServlet("/AddStudentServlect") public class AddStudentServlect extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public AddStudentServlect() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.getWriter().append("Served at: ").append(request.getContextPath()); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name=request.getParameter("name"); String age=request.getParameter("age"); IStudentService service =new StudentServiceImp(); int i=service.add(name,Integer.parseInt(age)); if(i>0) { System.out.println("增加成功"); response.sendRedirect("HomeServlet"); } } }
package com.student.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.student.service.IStudentService; import com.student.service.StudentServiceImp; /** * Servlet implementation class DeleteStudent */ @WebServlet("/DeleteStudent") public class DeleteStudent extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public DeleteStudent() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub String id=request.getParameter("id"); IStudentService service =new StudentServiceImp(); int i= service.delete(Integer.parseInt(id)); if(i>0) { response.sendRedirect("HomeServlet"); } } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
package com.student.controller; import java.io.IOException; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.student.service.IStudentService; import com.student.service.StudentServiceImp; /** * Servlet implementation class HomeServlet */ @WebServlet("/HomeServlet") public class HomeServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public HomeServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //将浏览器的任务接收,发给业务逻辑层处理 IStudentService service=new StudentServiceImp(); List<Map<String, Object>> oList=service.getStudents(); // HttpSession session =request.getSession(); //将从数据库中查询出来的数据存储至request session.setAttribute("students", oList); //请求转发跳转页面 request.getRequestDispatcher("index.jsp").forward(request, response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
package com.student.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.student.service.IStudentService; import com.student.service.StudentServiceImp; /** * Servlet implementation class UpdateStudentServlet */ @WebServlet("/UpdateStudentServlet") public class UpdateStudentServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public UpdateStudentServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.getWriter().append("Served at: ").append(request.getContextPath()); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id=request.getParameter("id"); String name=request.getParameter("name"); String age=request.getParameter("age"); IStudentService service=new StudentServiceImp(); int i=service.update(Integer.parseInt(id), name, Integer.parseInt(age)); if (i>0) { //修改成功 response.sendRedirect("HomeServlet"); } } }
package com.student.controller; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.student.service.IStudentService; import com.student.service.StudentServiceImp; /** * Servlet implementation class UpdateStudentServlet */ @WebServlet("/UpdateStudentServlet") public class UpdateStudentServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public UpdateStudentServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.getWriter().append("Served at: ").append(request.getContextPath()); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id=request.getParameter("id"); String name=request.getParameter("name"); String age=request.getParameter("age"); IStudentService service=new StudentServiceImp(); int i=service.update(Integer.parseInt(id), name, Integer.parseInt(age)); if (i>0) { //修改成功 response.sendRedirect("HomeServlet"); } } }
package com.student.dao; /** * 数据访问层操作学生表的接口 * @author admin * */ import java.util.List; import java.util.Map; public interface IStudentDao { //接收业务逻辑层的任务,查询出所有学生信息 List<Map<String, Object>> getStudents(); //接收信息 int add(String name,int age); //Dao修改操作 int update(int id,String name,int age); //删除 int delete(int id); }
package com.student.dao; /** * 数据访问层操作学生表的接口 * @author admin * */ import java.util.List; import java.util.Map; public interface IStudentDao { //接收业务逻辑层的任务,查询出所有学生信息 List<Map<String, Object>> getStudents(); //接收信息 int add(String name,int age); //Dao修改操作 int update(int id,String name,int age); //删除 int delete(int id); }
package com.student.dao; import java.util.List; import java.util.Map; import org.junit.Test; import com.student.utils.DBUtil; /** * 数据访问操作学生表的实现类 * @author admin * */ public class StudentDaoImp implements IStudentDao { @Override public List<Map<String, Object>> getStudents() { String sql="select * from tb_student2"; return DBUtil.jt.queryForList(sql); } @Override public int add(String name, int age) { // TODO Auto-generated method stub String sql="insert into tb_student2(name,age) values (?,?)"; return DBUtil.jt.update(sql,name,age); } //修改 @Override public int update(int id, String name, int age) { String sql="update tb_student2 set name=?,age=? where id=?"; return DBUtil.jt.update(sql,name,age,id); } @Override public int delete(int id) { // TODO Auto-generated method stub String sql="delete from tb_student2 where id=?"; return DBUtil.jt.update(sql,id); } }
package com.student.dao; import java.util.List; import java.util.Map; import org.junit.Test; import com.student.utils.DBUtil; /** * 数据访问操作学生表的实现类 * @author admin * */ public class StudentDaoImp implements IStudentDao { @Override public List<Map<String, Object>> getStudents() { String sql="select * from tb_student2"; return DBUtil.jt.queryForList(sql); } @Override public int add(String name, int age) { // TODO Auto-generated method stub String sql="insert into tb_student2(name,age) values (?,?)"; return DBUtil.jt.update(sql,name,age); } //修改 @Override public int update(int id, String name, int age) { String sql="update tb_student2 set name=?,age=? where id=?"; return DBUtil.jt.update(sql,name,age,id); } @Override public int delete(int id) { // TODO Auto-generated method stub String sql="delete from tb_student2 where id=?"; return DBUtil.jt.update(sql,id); } }
package com.student.utils; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import javax.sql.DataSource; import org.springframework.jdbc.core.JdbcTemplate; import com.alibaba.druid.pool.DruidDataSourceFactory; /** * 连接数据库的工具类 * @author admin * */ public class DBUtil { public static JdbcTemplate jt=null; //获得druid配置的数据库连接池 static { //使用反射机制获得druid配置文件转换成输入流 InputStream is= DBUtil.class.getClassLoader() .getResourceAsStream("com/student/utils/druid.properties"); Properties properties=new Properties(); try { //将输入流导入properties对象 properties.load(is); //获得数据库连接池 DataSource ds=DruidDataSourceFactory.createDataSource(properties); jt=new JdbcTemplate(ds); } catch (Exception e) { e.printStackTrace(); } } }
package com.util; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.entity.Book; /** * 放图书的内容工具类 * @author MZFAITHDREAM *2021/10/19 */ public class BooksDBUtil { public static List<Book> getBooks(){ Book book1 =new Book("java程序设计","自由", "39元","人民日报",""); Book book2 =new Book("java网站设计","马玉", "89元","清华",""); Book book3 =new Book("javascript程序设计","不变", "239元","人民日报",""); Book book4 =new Book("jquery程序设计","胡毅", "189元","江西出版社",""); Book book5=new Book("mysql程序设计","ok", "179元","北大",""); Book book6 =new Book("Sping框架设计","胡三", "129元","人民日报",""); Book book7 =new Book("java高级编程","呼万岁", "159元","河南出版社",""); Book book8=new Book("ps设计","ok", "239元","西安出版社",""); Book book9 =new Book("Sping框架设计","胡三", "129元","人民日报",""); Book book10=new Book("Java程序设计", "马云", "78.0元", "人民邮电出版社", ""); Book book11=new Book("Jsp网络编程", "马化腾", "118.0元", "清华大学出版社", ""); Book book12=new Book("Python爬虫技术", "李彦宏", "65.0元", "电子工业出版社", ""); Book book13=new Book("网页程序设计", "任正非", "38.0元", "江西出版社", ""); Book book14=new Book("MySQL程序教程", "雷军", "59.0元", "吉林出版社", ""); Book book15=new Book("Spring框架技术", "马小云", "46.0元", "人民邮电出版社", ""); List <Book> oBooks=new ArrayList<Book>(); oBooks.add(book1); oBooks.add(book2); oBooks.add(book3); oBooks.add(book4); oBooks.add(book5); oBooks.add(book6); oBooks.add(book7); oBooks.add(book8); oBooks.add(book9); oBooks.add(book10); oBooks.add(book11); oBooks.add(book12); oBooks.add(book13); oBooks.add(book14); oBooks.add(book15); return oBooks; } public static String getNowTime() { Date date=new Date(); //2021年10月19日 SimpleDateFormat sdf=new SimpleDateFormat ("YYYY年MM月DD日HH:mm:ss"); //要求当前时间进行格式化 String time=sdf.format(date); return time; } }
package com.util; import java.sql.Connection; public class Time { public static int time=60*60*60; static Connection time() { while (time>0) { time--; try { Thread.sleep(1000); int hh=time/1/1%1; int mm=time/60%1; int ss=time%6; if(hh==0 &&mm==0 && ss==0) { break; } System.out.println("0小时"+hh+"Сʱ"+mm+"分钟"+ss+"秒"); } catch (InterruptedException e) { // TODO: handle exception }finally { System.out.println("正在跳转页面哦 ServlectB"); System.out.println(".......真在跳转页面 "); } } return null; } public static void main(String[] args) { // TODO Auto-generated method stub time(); } }
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>MVCImport</display-name> <welcome-file-list> <welcome-file>ZhuCe.jsp</welcome-file> </welcome-file-list> <servlet> <servlet-name>ServlectOne</servlet-name> <servlet-class>com.Servlect.ServlectOne</servlet-class> <init-param> <param-name>SFZ</param-name> <param-value>360429100056781234</param-value> </init-param> </servlet> <context-param> <param-name>LQ</param-name> <param-value>篮球</param-value> </context-param> <servlet-mapping> <servlet-name>ServlectOne</servlet-name> <url-pattern>/ServlectOne</url-pattern> </servlet-mapping> <filter> <filter-name>MyFilter4</filter-name> <filter-class>com.Filter.MyFilter4</filter-class> </filter> <filter-mapping> <filter-name>MyFilter4</filter-name> <url-pattern>/Servlect1</url-pattern> </filter-mapping> <listener> <listener-class>com.Listener.Listener</listener-class> </listener> <context-param> <param-name>USER</param-name> <param-value>ABC</param-value> </context-param> <context-param> <param-name>QQ</param-name> <param-value>123456</param-value> </context-param> <context-param> <param-name>PSD</param-name> <param-value>123456</param-value> </context-param> <context-param> <param-name>SJ</param-name> <param-value>18172928419</param-value> </context-param> <context-param> <param-name>HOME</param-name> <param-value>江西省</param-value> </context-param> <jsp-config> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/c.tld</taglib-location> </taglib> </jsp-config> </web-app>
<?xml version="1.0" encoding="UTF-8" ?> <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0"> <description>JSTL 1.1 core library</description> <display-name>JSTL core</display-name> <tlib-version>1.1</tlib-version> <short-name>c</short-name> <uri>http://java.sun.com/jsp/jstl/core</uri> <validator> <description> Provides core validation features for JSTL tags. </description> <validator-class> org.apache.taglibs.standard.tlv.JstlCoreTLV </validator-class> </validator> <tag> <description> Catches any Throwable that occurs in its body and optionally exposes it. </description> <name>catch</name> <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class> <body-content>JSP</body-content> <attribute> <description> Name of the exported scoped variable for the exception thrown from a nested action. The type of the scoped variable is the type of the exception thrown. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <description> Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <when> and <otherwise> </description> <name>choose</name> <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class> <body-content>JSP</body-content> </tag> <tag> <description> Simple conditional tag, which evalutes its body if the supplied condition is true and optionally exposes a Boolean scripting variable representing the evaluation of this condition </description> <name>if</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class> <body-content>JSP</body-content> <attribute> <description> The test condition that determines whether or not the body content should be processed. </description> <name>test</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>boolean</type> </attribute> <attribute> <description> Name of the exported scoped variable for the resulting value of the test condition. The type of the scoped variable is Boolean. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Scope for var. </description> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <description> Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'. </description> <name>import</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class> <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class> <body-content>JSP</body-content> <attribute> <description> The URL of the resource to import. </description> <name>url</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Name of the exported scoped variable for the resource's content. The type of the scoped variable is String. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Scope for var. </description> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Name of the exported scoped variable for the resource's content. The type of the scoped variable is Reader. </description> <name>varReader</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Name of the context when accessing a relative URL resource that belongs to a foreign context. </description> <name>context</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Character encoding of the content at the input resource. </description> <name>charEncoding</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <description> The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality </description> <name>forEach</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class> <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class> <body-content>JSP</body-content> <attribute> <description> Collection of items to iterate over. </description> <name>items</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>java.lang.Object</type> </attribute> <attribute> <description> If items specified: Iteration begins at the item located at the specified index. First item of the collection has index 0. If items not specified: Iteration begins with index set at the value specified. </description> <name>begin</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>int</type> </attribute> <attribute> <description> If items specified: Iteration ends at the item located at the specified index (inclusive). If items not specified: Iteration ends when index reaches the value specified. </description> <name>end</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>int</type> </attribute> <attribute> <description> Iteration will only process every step items of the collection, starting with the first one. </description> <name>step</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>int</type> </attribute> <attribute> <description> Name of the exported scoped variable for the current item of the iteration. This scoped variable has nested visibility. Its type depends on the object of the underlying collection. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Name of the exported scoped variable for the status of the iteration. Object exported is of type javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility. </description> <name>varStatus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <description> Iterates over tokens, separated by the supplied delimeters </description> <name>forTokens</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class> <body-content>JSP</body-content> <attribute> <description> String of tokens to iterate over. </description> <name>items</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description> The set of delimiters (the characters that separate the tokens in the string). </description> <name>delims</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description> Iteration begins at the token located at the specified index. First token has index 0. </description> <name>begin</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>int</type> </attribute> <attribute> <description> Iteration ends at the token located at the specified index (inclusive). </description> <name>end</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>int</type> </attribute> <attribute> <description> Iteration will only process every step tokens of the string, starting with the first one. </description> <name>step</name> <required>false</required> <rtexprvalue>true</rtexprvalue> <type>int</type> </attribute> <attribute> <description> Name of the exported scoped variable for the current item of the iteration. This scoped variable has nested visibility. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Name of the exported scoped variable for the status of the iteration. Object exported is of type javax.servlet.jsp.jstl.core.LoopTag Status. This scoped variable has nested visibility. </description> <name>varStatus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <description> Like <%= ... >, but for expressions. </description> <name>out</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class> <body-content>JSP</body-content> <attribute> <description> Expression to be evaluated. </description> <name>value</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Default value if the resulting value is null. </description> <name>default</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Determines whether characters <,>,&,'," in the resulting string should be converted to their corresponding character entity codes. Default value is true. </description> <name>escapeXml</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <description> Subtag of <choose> that follows <when> tags and runs only if all of the prior conditions evaluated to 'false' </description> <name>otherwise</name> <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class> <body-content>JSP</body-content> </tag> <tag> <description> Adds a parameter to a containing 'import' tag's URL. </description> <name>param</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class> <body-content>JSP</body-content> <attribute> <description> Name of the query string parameter. </description> <name>name</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Value of the parameter. </description> <name>value</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <description> Redirects to a new URL. </description> <name>redirect</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class> <body-content>JSP</body-content> <attribute> <description> The URL of the resource to redirect to. </description> <name>url</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Name of the context when redirecting to a relative URL resource that belongs to a foreign context. </description> <name>context</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <description> Removes a scoped variable (from a particular scope, if specified). </description> <name>remove</name> <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class> <body-content>empty</body-content> <attribute> <description> Name of the scoped variable to be removed. </description> <name>var</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Scope for var. </description> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <description> Sets the result of an expression evaluation in a 'scope' </description> <name>set</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class> <body-content>JSP</body-content> <attribute> <description> Name of the exported scoped variable to hold the value specified in the action. The type of the scoped variable is whatever type the value expression evaluates to. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Expression to be evaluated. </description> <name>value</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Target object whose property will be set. Must evaluate to a JavaBeans object with setter property property, or to a java.util.Map object. </description> <name>target</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Name of the property to be set in the target object. </description> <name>property</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Scope for var. </description> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <description> Creates a URL with optional query parameters. </description> <name>url</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class> <body-content>JSP</body-content> <attribute> <description> Name of the exported scoped variable for the processed url. The type of the scoped variable is String. </description> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> Scope for var. </description> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description> URL to be processed. </description> <name>value</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <description> Name of the context when specifying a relative URL resource that belongs to a foreign context. </description> <name>context</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <description> Subtag of <choose> that includes its body if its condition evalutes to 'true' </description> <name>when</name> <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class> <body-content>JSP</body-content> <attribute> <description> The test condition that determines whether or not the body content should be processed. </description> <name>test</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>boolean</type> </attribute> </tag> </taglib>