I have WebLogic (10.3.5) application server installed in a server and in an another
server JBoss AS (7.1.1) installed.
ServletA.java gets compiled using Java EE specific jars in JBoss AS and deployed in WebLogic (during
runtime WebLogic will be using its own Java EE specific jars to execute). Currently, when I access the servlet in WebLogic, I’m not getting any errors, it’s working fine.
My question is, is this approach OK or will this create any problems in the future?
As long as you stick to the classes in the Java EE spec and don’t use any JBoss specific classes or features this approach is OK.
What can still go wrong is if you rely on server specific behavior (hard to test) or run into bugs on one server.