Struts hibernate开发(源代码)

Frida动态插桩实战:Android与iOS安全测试核心指南 Frida是一种轻量级、跨平台的动态插桩框架,基于内存注入与运行时Hook技术,实现对移动应用Java层、Native层及Objective-C/Swift方法的实时拦截与行为观测。其核心原理是通过frida-server或frida-gadget在目标进程内存中构建JS执行沙箱,利用Interceptor、Java.use和ObjC.classes等API操控调用流程,无需修改APK/IPA文件,也无需root或越狱。该技术显著提升移动应用安全测试效率,广泛应用于接口逻辑验证、加固绕过分析、SDK合规审计 阅读详情
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> 测试页面:index.jsp <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page language="java" import="hibernate.HibernateSessionFactory"%> <%@ page language="java" import="mappingConfig.Admin"%> <%@ page language="java" import="org.hibernate.HibernateException"%> <%@ page language="java" import="org.hibernate.*"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> <FORM action="log.do" method="post"> username <input type="text" name="name"> <br> password <input type="password" name="password"> <br> <input type="submit" value="login"> </FORM> </body> </html> right.jsp <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> This is my JSP page. <br> </body> </html> LogAction.java //Created by MyEclipse Struts // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.1/xslt/JavaClass.xsl package action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import form.UserForm; import common.Com; /** * MyEclipse Struts * Creation date: 03-25-2006 * * XDoclet definition: * @struts.action path="/log" name="userForm" input="/index.jsp" scope="request" validate="true" */ public class LogAction extends Action { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { UserForm userForm = (UserForm) form; // TODO Auto-generated method stub Com.execute(); return mapping.findForward("suc"); } } Com.java package common; import hibernate.HibernateSessionFactory; import mappingConfig.Admin; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; public class Com { public static boolean execute() { Session session; Transaction tx = null; try { session = HibernateSessionFactory.currentSession(); tx = session.beginTransaction(); Admin admin = new Admin(); admin.setName("joliny"); admin.setAge("21"); admin.setEmail("jbakwd@163.com"); admin.setPassword("2466346"); admin.setSex("man"); admin.setTelphone("13571944243"); session.save(admin); tx.commit(); } catch (HibernateException e) { e.printStackTrace(); } return true; } //public static void main(String args[]) { //execute(); //} } UserForm.java //Created by MyEclipse Struts // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.1/xslt/JavaClass.xsl package form; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; /** * MyEclipse Struts * Creation date: 03-25-2006 * * XDoclet definition: * @struts.form name="userForm" */ public class UserForm extends ActionForm { // --------------------------------------------------------- Instance Variables /** password property */ private String password; /** name property */ private String name; // --------------------------------------------------------- Methods /** * Method validate * @param mapping * @param request * @return ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub return null; } /** * Method reset * @param mapping * @param request */ public void reset(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub } /** * Returns the password. * @return String */ public String getPassword() { return password; } /** * Set the password. * @param password The password to set */ public void setPassword(String password) { this.password = password; } /** * Returns the name. * @return String */ public String getName() { return name; } /** * Set the name. * @param name The name to set */ public void setName(String name) { this.name = name; } } HibernateSessionFactory.java package hibernate; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.cfg.Configuration; /** * Configures and provides access to Hibernate sessions, tied to the * current thread of execution. Follows the Thread Local Session * pattern, see {@link http://hibernate.org/42.html}. */ public class HibernateSessionFactory { /** * Location of hibernate.cfg.xml file. * NOTICE: Location should be on the classpath as Hibernate uses * #resourceAsStream style lookup for its configuration file. That * is place the config file in a Java package - the default location * is the default Java package.<br><br> * Examples: <br> * <code>CONFIG_FILE_LOCATION = "/hibernate.conf.xml". * CONFIG_FILE_LOCATION = "/com/foo/bar/myhiberstuff.conf.xml".</code> */ private static String CONFIG_FILE_LOCATION = "/hibernate/hibernate.cfg.xml"; /** Holds a single instance of Session */ private static final ThreadLocal threadLocal = new ThreadLocal(); /** The single instance of hibernate configuration */ private static final Configuration cfg = new Configuration(); /** The single instance of hibernate SessionFactory */ private static org.hibernate.SessionFactory sessionFactory; /** * Returns the ThreadLocal Session instance. Lazy initialize * the <code>SessionFactory</code> if needed. * * @return Session * @throws HibernateException */ public static Session currentSession() throws HibernateException { Session session = (Session) threadLocal.get(); if (session == null) { if (sessionFactory == null) { try { cfg.configure(CONFIG_FILE_LOCATION); sessionFactory = cfg.buildSessionFactory(); } catch (Exception e) { System.err.println("%%%% Error Creating SessionFactory %%%%"); e.printStackTrace(); } } session = sessionFactory.openSession(); threadLocal.set(session); } return session; } /** * Close the single hibernate session instance. * * @throws HibernateException */ public static void closeSession() throws HibernateException { Session session = (Session) threadLocal.get(); threadLocal.set(null); if (session != null) { session.close(); } } /** * Default constructor. */ private HibernateSessionFactory() { } } AbstractAdmin.java /* * WARNING: DO NOT EDIT THIS FILE. This is a generated file that is synchronized * by MyEclipse Hibernate tool integration. * * Created Fri Mar 24 14:48:52 GMT 2006 by MyEclipse Hibernate Tool. */ package mappingConfig; import java.io.Serializable; /** * A class that represents a row in the admin table. * You can customize the behavior of this class by editing the class, {@link Admin()}. * WARNING: DO NOT EDIT THIS FILE. This is a generated file that is synchronized * by MyEclipse Hibernate tool integration. */ public abstract class AbstractAdmin implements Serializable { /** The cached hash code value for this instance. Settting to 0 triggers re-calculation. */ private int hashValue = 0; /** The composite primary key value. */ private java.lang.Integer id; /** The value of the simple name property. */ private java.lang.String name; /** The value of the simple password property. */ private java.lang.String password; /** The value of the simple telphone property. */ private java.lang.String telphone; /** The value of the simple email property. */ private java.lang.String email; /** The value of the simple sex property. */ private java.lang.String sex; /** The value of the simple age property. */ private java.lang.String age; /** * Simple constructor of AbstractAdmin instances. */ public AbstractAdmin() { } /** * Constructor of AbstractAdmin instances given a simple primary key. * @param id */ public AbstractAdmin(java.lang.Integer id) { this.setId(id); } /** * Return the simple primary key value that identifies this object. * @return java.lang.Integer */ public java.lang.Integer getId() { return id; } /** * Set the simple primary key value that identifies this object. * @param id */ public void setId(java.lang.Integer id) { this.hashValue = 0; this.id = id; } /** * Return the value of the name column. * @return java.lang.String */ public java.lang.String getName() { return this.name; } /** * Set the value of the name column. * @param name */ public void setName(java.lang.String name) { this.name = name; } /** * Return the value of the password column. * @return java.lang.String */ public java.lang.String getPassword() { return this.password; } /** * Set the value of the password column. * @param password */ public void setPassword(java.lang.String password) { this.password = password; } /** * Return the value of the telphone column. * @return java.lang.String */ public java.lang.String getTelphone() { return this.telphone; } /** * Set the value of the telphone column. * @param telphone */ public void setTelphone(java.lang.String telphone) { this.telphone = telphone; } /** * Return the value of the email column. * @return java.lang.String */ public java.lang.String getEmail() { return this.email; } /** * Set the value of the email column. * @param email */ public void setEmail(java.lang.String email) { this.email = email; } /** * Return the value of the sex column. * @return java.lang.String */ public java.lang.String getSex() { return this.sex; } /** * Set the value of the sex column. * @param sex */ public void setSex(java.lang.String sex) { this.sex = sex; } /** * Return the value of the age column. * @return java.lang.String */ public java.lang.String getAge() { return this.age; } /** * Set the value of the age column. * @param age */ public void setAge(java.lang.String age) { this.age = age; } /** * Implementation of the equals comparison on the basis of equality of the primary key values. * @param rhs * @return boolean */ public boolean equals(Object rhs) { if (rhs == null) return false; if (! (rhs instanceof Admin)) return false; Admin that = (Admin) rhs; if (this.getId() == null || that.getId() == null) return false; return (this.getId().equals(that.getId())); } /** * Implementation of the hashCode method conforming to the Bloch pattern with * the exception of array properties (these are very unlikely primary key types). * @return int */ public int hashCode() { if (this.hashValue == 0) { int result = 17; int idValue = this.getId() == null ? 0 : this.getId().hashCode(); result = result * 37 idValue; this.hashValue = result; } return this.hashValue; } } Admin.java /* * Created Fri Mar 24 14:31:50 GMT 2006 by MyEclipse Hibernate Tool. */ package mappingConfig; import java.io.Serializable; /** * A class that represents a row in the 'admin' table. * This class may be customized as it is never re-generated * after being created. */ public class Admin extends AbstractAdmin implements Serializable { /** * Simple constructor of Admin instances. */ public Admin() { } /** * Constructor of Admin instances given a simple primary key. * @param id */ public Admin(java.lang.Integer id) { super(id); } /* Add customized code below */ } 配置文件: hibernate.cfg.xml <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <!-- Generated by MyEclipse Hibernate Tools. --> <hibernate-configuration> <session-factory> <property name="myeclipse.connection.profile">webases</property> <property name="connection.url">jdbc:mysql://localhost/webtest</property> <property name="connection.username">root</property> <property name="connection.password"></property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property><mapping resource="mappingConfig/Admin.hbm.xml"></mapping> </session-factory> </hibernate-configuration> Admin.hbm.xml <?xml version="1.0" encoding='UTF-8'?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > <!-- DO NOT EDIT: This is a generated file that is synchronized --> <!-- by MyEclipse Hibernate tool integration. --> <!-- Created Fri Mar 24 14:48:52 GMT 2006 --> <hibernate-mapping package="mappingConfig"> <class name="Admin" table="admin"> <id name="id" column="id" type="integer"> <generator class="native"/> </id> <property name="name" column="name" type="string" not-null="true" /> <property name="password" column="password" type="string" not-null="true" /> <property name="telphone" column="telphone" type="string" not-null="true" /> <property name="email" column="email" type="string" not-null="true" /> <property name="sex" column="sex" type="string" not-null="true" /> <property name="age" column="age" type="string" not-null="true" /> </class> </hibernate-mapping> struts-config.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <data-sources /> <form-beans > <form-bean name="userForm" type="form.UserForm" /> </form-beans> <global-exceptions /> <global-forwards /> <action-mappings > <action attribute="userForm" input="/index.jsp" name="userForm" path="/log" scope="request" type="action.LogAction" > <forward name="suc" path="/right.jsp" /> </action> </action-mappings> <message-resources parameter="ApplicationResources" /> </struts-config> web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> </web-app>
Java Web开发完全自学手册配套源代码 Java Web开发是构建互联网应用的核心技术之一,它使用Java语言作为后端开发的主要工具,以满足构建动态网站、企业级应用以及API服务等需求。Java Web应用的优势在于其跨平台性、安全性和健壮的生态系统,包括Spring、Hibernate等成熟框架的支持,使得Java Web开发在金融、电子商务以及企业资源规划等领域中占据重要地位。 阅读详情

相关推荐

struts+spring+hebinate

这是一个简单的SSH整合实例,目的是了解SSH框架是如何整合的

struts+hibernate+jsp开发MedicineManager医疗后台管理系统源代码下载

struts+hibernate+jsp开发MedicineManager医疗后台管理系统源代码下载 源代码下载地址:http://www.zuidaima.com/share/1550463451368448.htm

springmvc_springdata的专栏 2730

struts2整合hibernate的网上商城源码

struts2整合hibernate的网上商城源码(框架)

Struts2+Spring2.5+Hibernate3.3整合开发附源代码

第一步在Spring中配置数据源: &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt; &lt;property name="driverClass" value="org.gjt.mm.mysql

ssh2技术论坛:ssh2.org ——struts2,hibernate,spring整合 217

NVIDIA DGX Spark (Ubuntu 24.04) 部署Isaac Sim与Isaac Lab:二进制安装与ROS2集成实战

本文详细介绍了在NVIDIA DGX Spark工作站(Ubuntu 24.04系统)上,通过预编译二进制包稳定部署Isaac Sim与Isaac Lab的完整实战流程。文章重点剖析了二进制安装相较于源码编译和pip安装的优势,有效规避了CUDA、PyTorch等关键组件的版本冲突陷阱,并逐步指导完成环境配置、Isaac Lab集成、Conda环境管理以及ROS2 Jazzy的集成,最终构建出完整的机器人仿真与强化学习开发平台。

kite3的博客 396

RK3588-NANOPC-T6移植ubuntu+xenomai内核

更具网址下载相应的内核。导入到开发板并执行内核。

qq_42007446的博客 574

新书出版:Java Web开发技术大全——JSP+Servlet+Struts 2+Hibernate+Spring+Ajax (附源代码)

本文为原创,如需转载,请注明作者和出处,谢谢!源代码下载作者:李宁图书详细信息:ISBN:9787302195757定价:79.8元印次:1-1装帧:平装印刷日期:2009-4-23 图书简介:SSH是

一个被知识诅咒的人 3881

IEEE Access投稿全流程解析:从初次提交到最终接收的完整指南

本文详细解析了IEEE Access期刊从初次投稿到最终接收的全流程,包括ORCID注册、论文投稿七步法、回稿再投流程及最终版提交等关键步骤。特别强调了4-6周快速同行评审的特点,为研究者提供了一份实用的投稿指南,帮助高效完成IEEE Access期刊投稿。

weixin_29273849的博客 915

ava Web开发速学宝典(JSP+Servlet+Struts 2 + Hibernate + Spring)源代码下载

文为原创,如需转载,请注明作者和出处,谢谢! 由于有些读者因随书光盘遗失,应广大读者的要求,特提供《Java Web开发速学宝典》一书的源代码下载,由于源代码所使用的jar包过大(随书光盘中包含了完整的源代码和jar包),在这里只提供了jar文件的列表,读者可以自行获得这些jar包,见下图。 各章节例子源码 综合项目案例源码 jar文件列表 ...

weixin_34265814的博客 118

房产平台系统小程序源码

🏠 一键解锁购房新体验 🔓房产小程序 实现前端 发布二手房 租房 商品 求租 求购等信息;后台发布 新房,二手房租房 商品 写字楼 求租求购等房源信息;功能完善的一块房产小程序。

2401_84413757的博客 796

Hadoop生态系统-新手快速入门(含HDFS、HBase系统架构)

Hadoop简介 Hadoop是一个由Apache基金会所开发的分布式系统基础架构。 用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。 Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量...

Hadoop环境搭建教程 472

Java Web开发速学宝典(JSP+Servlet+Struts 2 + Hibernate + Spring)源代码下载

 文为原创,如需转载,请注明作者和出处,谢谢!    由于有些读者因随书光盘遗失,应广大读者的要求,特提供《Java Web开发速学宝典》一书的源代码下载,由于源代码所使用的jar包过大(随书光盘中包含了完整的源代码和jar包),在这里只提供了jar文件的列表,读者可以自行获得这些jar包,见下图。各章节例子源码综合项目案例源码jar文件

一个被知识诅咒的人 1368

单细胞双胞过滤-scrublet安装

pip install scrublet ----use-pep517有如下报错,分析可知安装annoy时不会自动更新gcc的版本,centos默认是4.8.5。pip install scrublet ----use-pep517 仍然报错,但似乎不影响使用,提示Successfully installed。打开终端,进入Python环境,输入以下代码,查看Python安装位置。暂时还没尝试是否存在问题,如果存在问题,降级scrublet版本。包的开发依赖的是比较低版本的numpy,会用到。

hzau_t的博客 793

AI安全警示:从深度学习原理到外星智能风险与工程应对

人工智能作为模拟人类智能的技术,其核心原理基于神经网络与机器学习算法,通过数据驱动实现模式识别与决策。从技术价值看,AI提升了自动化水平与问题解决效率,但深度学习模型的黑箱特性带来了可解释性挑战。在应用场景中,当AI能力超越特定阈值时,可能涌现出与预设目标偏差的行为,其中欺骗能力成为潜在风险。这引出了对齐问题——如何确保AI系统的目标与人类价值观一致。本文基于杰弗里·辛顿的前沿洞察,探讨数字智能与生物智能的本质差异,分析欺骗作为优化策略的涌现机制,并指出当前扩展定律可能同步放大能力与不可控性。对于开发者而言

keke1314520的博客 400

基于Cadence IC617的共源级放大器设计:从直流到交流的virtuoso仿真实践

本文详细介绍了使用Cadence IC617的Virtuoso平台进行共源级放大器设计的完整仿真流程。从电路图绘制、直流工作点分析,到负载电阻RD的参数扫描及其对增益和带宽的影响,再到交流小信号频率响应仿真,提供了从理论到实践的全面指导,帮助初学者掌握模拟集成电路设计的核心仿真技能。

jj890的博客 480

芒果YOLO11改进59:分类损失函数Loss篇FocalLoss:即插即用|最新改进FocalLoss损失函数,提高处理不平衡数据分类场景下的任务性能,提升YOLO11检测精度

即插即用|最新改进FocalLoss损失函数,提高处理不平衡数据分类场景下的任务性能,提升YOLO11检测精度

包括YOLOv5、YOLOv7、YOLOv8等模型改进 552

新书出版:Java Web开发技术大全——JSP+Servlet+Struts 2+Hibernate+Spring+Ajax (附源代码)...

源代码下载作者:李宁 图书详细信息:ISBN:9787302195757定价:79.8元印次:1-1装帧:平装印刷日期:2009-4-23 图书简介:SSH是目前最流行的Java Web开发技术。本书通过对SSH中的各种技术循序渐进地讲解,使读者尽快掌握开发基于SSH的Web程序的方法。本书内容包括Web客户端技术、JSP/Servlet技术、Struts 2(拦...

weixin_34194087的博客 279

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

Struts2+Hibernate

由MyEclipse下导入的Hibernate的jar包 Struts2基本jar包和MySql驱动jar包 源代码文件 数据库脚本  create database hibernate; use hibernate; create table if not exists user ( id int primary key, name

zhubinqiang的专栏 1034

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

上一篇: XML配置文件的读取处理
下一篇: 跟我学Java之Java GUI的发展和演化
java169
博客等级 码龄19年 27粉丝 2568原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值