Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment:

Update formatting and nomenclature
Note

When deploying to WebLogic, some developers report problems with the framework locating resources, especially with Velocity. For more about WebLogic and Velocity, see the Velocity website.

Info

To deploy to WebLogic, the common approach is to create and deploy an unexpanded WAR to the WebLogic deployment directory. With WL 8.x, the deployment directory is typically at <bea_home>/user_projects/domains/mydomain/.

Adding an action-velocity.properties Configuration File

...

  • In the action.properties file (usually kept in the
  • WEB-INF/classes directory)

...

  • , add an entry that specifies a Velocity configuation file.
    • Code Block
      titleaction.properties
      action.velocity.configfile =

...

    •  action-velocity.properties

...

  • Create the corresponding Velocity properties file ("action-velocity.properties"

...

  • ), preferablly in the same location as the action.properties file.
  • Copy into the Velocity properties file the contents of the velocity.properties file that is

...

  • the the SAF velocity-dep.jar

...

  • .
  • In your new

...

  • action-velocity.properties

...

  • file, find

...

  • he section titled

...

  • "T E M P L A T E L O A D E R S", and change this section

...

  • as so:
>
Code Block
>

===========================================

>

resource.loader =
class
>
>
 class

file.resource.loader.description = Velocity File Resource Loader

>

file.resource.loader.class =

>
 org.apache.velocity.runtime.resource.loader.FileResourceLoader

>

file.resource.loader.path = .

>

file.resource.loader.cache = false

>

file.resource.loader.modificationCheckInterval =
2
>
>
 2

class.resource.loader.class =

>
 org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

>

class.resource.loader.cache = true

>

===========================================

>
> ... which straightens out the class resource loading problems (for us
> at least).
>
> hope this helps,
> james

...


  • Redeploy a fresh WAR to WebLogic.