Why Did Servlet.Service() for Servlet Jsp Throw This Exception

Why did Servlet.service() for servlet jsp throw this exception?

It can be caused by a classpath contamination. Check that you /WEB-INF/lib doesn't contain something like jsp-api-*.jar.

Servlet.service() for servlet [jsp] threw exception

As already remarked in the comments, one of your dependencies (activiti-engine) has an alternative implementation of the EL Specification: JUEL.

This is, in my opinion, an error in activiti-engine's POM: the project should not depend on a specific EL implementation, just the EL API.

You can correct it by explicitly excluding the JUEL dependencies from your project:

    <dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>6.0.0</version>
<exclusions>
<exclusion>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-api</artifactId>
</exclusion>
<exclusion>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-impl</artifactId>
</exclusion>
<exclusion>
<groupId>de.odysseus.juel</groupId>
<artifactId>juel-spi</artifactId>
</exclusion>
</exclusions>
</dependency>

Why Servlet.service() for servlet jsp threw exception java.lang.NullPointerException?

In reference to this, FacesContext.getCurrentInstance() returns null.

You may use below code.

//ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
//context.redirect(context.getRequestContextPath() + "/gefencingJason.jsp?str=" + strret);
response.sendRedirect(request.getContextPath() + "/gefencingJason.jsp?str=" + strret);

or you may refer this article by @BalusC.

Servlet.service() for servlet jsp threw exception java.lang.NullPointerException

You are trying to call a method on an object that is null

See, on line 86 of:

/path/to/tomcat/work/Catalina/localhost/yourAppName/org/apache/jsp/search_005fresult_jsp.java

SEVERE: Servlet.service() for servlet [jsp] threw exception java.lang.NumberFormatException

The variable you are trying in the JSP is a String and you are trying to convert it to an integer. You might want to either convert that to an integer and set the value. Check the example in this code base of how to convert a String to Number. You can convert the Cheers

<fmt:parseNumber var = "parsedCandidateID" type = "number" value = "${tempcandDet1.candidateID_FI}"/>

<c:set var="var1" value="parsedCandidateID"/>

After making sure the variable of type integer, then u can do the compare operation ur doing.

Spring microservice: Servlet.service() for servlet [jsp] threw exception

Change your jasper dependency as

<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>


Related Topics



Leave a reply



Submit