在IntelliJ部署EAR至WebLogic 10.3时遇JSP HTTP 500错误
Hey, let's tackle this JSP 500 error you're facing when switching from MyEclipse to IntelliJ for your EAR deployment on WebLogic 10.3.6. I’ve run into similar deployment quirks before, so here’s a step-by-step breakdown to get to the bottom of it:
That truncated javax.servlet.jsp.Js... error is almost always tied to missing or conflicting JSP-related classes. MyEclipse tends to auto-configure WebLogic's built-in libraries, but IntelliJ might need a nudge:
- Open IntelliJ's Project Structure (hit
Ctrl+Alt+Shift+S), go to Modules and select your web module. - In the Dependencies tab:
- Make sure WebLogic's JSP API (included in
weblogic.jar) is marked asProvided—WebLogic supplies these classes, so you don’t want to package them in your EAR/WAR. - Delete any standalone
servlet-api.jarorjsp-api.jarfrom your project dependencies. These often clash with WebLogic’s native versions, triggering runtime 500 errors.
- Make sure WebLogic's JSP API (included in
IntelliJ’s deployment flow isn’t identical to MyEclipse’s autodeploy, so misconfigurations here are common:
- Open Run/Debug Configurations and select your WebLogic server instance:
- Check the Deployment tab to confirm your EAR is added and deploying to the correct path (either WebLogic’s
autodeployfolder ordomain/applications). - Ensure
Build Artifactsis checked in the Before launch section—this guarantees you’re deploying the latest build, not stale cached files. - Manually delete WebLogic’s
tmpandcachedirectories (e.g.,your_domain/servers/AdminServer/tmp,your_domain/servers/AdminServer/cache), then restart the server. Old cached class files often cause weird classloading issues.
- Check the Deployment tab to confirm your EAR is added and deploying to the correct path (either WebLogic’s
The truncated error message isn’t enough to pinpoint the root cause. Dig up the full log:
- Log into the WebLogic admin console, navigate to Deployments, select your app, then go to Monitoring -> Logs to view the complete exception.
- Or check the server log file directly at
your_domain/servers/AdminServer/logs/AdminServer.log. Look forClassNotFoundException(classpath issue) orNoSuchMethodError(version conflict)—these are the most frequent culprits.
Deployment might skip JSP compilation, leading to runtime failures:
- In the WebLogic admin console, go to your app’s Configuration -> JSP tab:
- Enable Compile JSPs During Deployment to ensure JSPs are pre-compiled before the app starts.
- Confirm the Working Directory has write permissions—WebLogic needs this to compile and store JSP-generated classes.
There might be differences in the generated EAR/WAR files:
- Unpack both the MyEclipse-built EAR and IntelliJ-built EAR, then compare the WAR contents:
- Check
WEB-INF/libfor missing or extra JAR files. - Verify
WEB-INF/web.xmlis identical—look for JSP-related settings likeisELIgnoredorcontentTypethat might have been altered during IntelliJ’s build.
- Check
内容的提问来源于stack exchange,提问作者LppEdd

