Pages

Friday, November 11, 2011

Java code in jsp source files is not allowed in ojsp

Applies to:


Oracle JDeveloper - Version: 11.1.1.1.x

Symptoms

Your application includes a JSP page with scriptlets like the following:














This page runs correctly in JDeveloper 11.1.1.0

After having migrated to JDeveloper 11.1.1.2.0, running the page fails with the following error:

Java code in jsp source files is not allowed in ojsp.next mode.



You see the following error displayed in the page:



"JSP scriptlets will not work properly if using OJSP".

Changes

You upgraded from JDeveloper 11.1.1.0.x to 11.1.1.1.x

It was working correctly in JDev 11.1.1.0.x



Cause

The deployment descriptor file weblogic-application.xml is automatically updated '(for performance reasons) with the following lines:



oracle.jsp.next

under one of these conditions:



•you use MDS (Metadata Services), that you set up with the option

"Enable user customizations" in "ADF View" in the "Project Properties"

•or you use WebCenter (that automatically turns on the aforementioned option)



•or you use the ADF Library Filter ("ADFLibraryFilter") for your JSP page.



OJSP does not support scriptlets in its 'next' mode,



Solution

You need to either adapt your code to remove the scriptlets in your JSP page (that's the only option

if you use WebCenter that forcibly sets that option),



or you can use the following Java option to disable OJSP:



-Dadfvdt.disableOjspDeployment=true

You can add this option -Dadfvdt.disableOjspDeployment=true in your file "ide.conf" in the directory "\jdeveloper\ide\bin".

Alternatively, you can start up JDeveloper with that parameter:



\jdeveloper\jdev\bin\jdev.exe -J-Dadfvdt.disableOjspDeployment=true

For your Production environment, you can have your Managed WLS ignoring the OJSP mode by adding the Java Option -Dadfvdt.disableOjspDeployment=true



•in the "startManagedWebLogic" (if you want to limit it to a specific Managed Server)



•or "setDomainEnv" (for all managed servers in a domain).





1 comment:

Blogger said...

Bluehost is ultimately one of the best web-hosting provider with plans for any hosting requirments.