Skip to content

Commit

Permalink
missed change in Info servlet helper
Browse files Browse the repository at this point in the history
  • Loading branch information
anneferger committed Nov 8, 2022
1 parent 68bb5be commit f40f481
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/pl/psnc/dl/ege/webapp/servlethelpers/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
import java.util.Properties;

public class Info extends HttpServlet {
HttpServlet servlet;

public void doGetHelper(HttpServletRequest request, HttpServletResponse response)
public void doGetHelper(HttpServletRequest request, HttpServletResponse response, HttpServlet httpservlet)
throws IOException, ServletException {
String serverInfo = getServletContext().getServerInfo();
servlet = httpservlet;
String serverInfo = servlet.getServletContext().getServerInfo();
try {
//create info json object
JSONObject json_info = new JSONObject();
Expand Down Expand Up @@ -66,7 +68,7 @@ public synchronized String getVersion(HttpServletRequest request) {

// fallback to using Java API
if (version == null) {
Package aPackage = getClass().getPackage();
Package aPackage = servlet.getClass().getPackage();
if (aPackage != null) {
version = aPackage.getImplementationVersion();
if (version == null) {
Expand Down

0 comments on commit f40f481

Please sign in to comment.