I want to migrate from Oracle WebLogic to Apache Tomcat. So, Oracle WebLogic 10.3.6 changed to Apache Tomcat 9.0.x . I founded break point not work at tomcat and eclipse specific JSPs. All of source working good in Oracle WebLogic and Eclipse IDE. Break point working source:
<%
System.out.println("breaking point"); // Break point working in Eclipse IDE.
%>
Break point not working source:
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.3">
<jsp:directive.page extends="javax.servlet.http.HttpServlet" />
<jsp:declaration><![CDATA[//
public void doGet(HttpServletRequest req, HttpServletResponse resp) {
System.out.println("hello doGet"); // Break point not working in Eclipse IDE.
}
//]]></jsp:declaration>
</jsp:root>
CodePudding user response:
Your version of Apache Tomcat is too new. Need use old version. Check JSP specification version. These code has no problem in migrating process, if you choose correct Apache Tomcat version (should be version Apache Tomcat 6.x or 7.x) JDK version (should be 1.7).
Related documents
https://docs.oracle.com/cd/E24902_01/doc.91/e18840/install_config_10_3_6.htm#EOHWL189
https://blogs.mulesoft.com/dev-guides/how-to-migrate-your-weblogic-or-websphere-app-to-tomcat/
https://docs.oracle.com/cd/E19316-01/819-3669/bnajw/index.html
Let's tell me the result.
CodePudding user response:
Thanks, @Do Nhu Vy
i must migrate from jdk 1.6 to jdk 1.8 now.
I happened to find a solution.
it need a line break with 'jsp:declaration' and '<![CDATA[//'
when i execute auto formatting then line break disappear.
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.3">
<jsp:directive.page extends="javax.servlet.http.HttpServlet" />
<jsp:declaration> <!-- here insert line break-->
<![CDATA[//
public void doGet(HttpServletRequest req, HttpServletResponse resp) {
System.out.println("hello doGet"); // Break point not working in Eclipse IDE.
}
//]]>
</jsp:declaration>
</jsp:root>