Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When running in WebSphere, why can my servlet find my PCML files?

files running servlet websphere
0
Posted

When running in WebSphere, why can my servlet find my PCML files?

0

When running servlets under WebSphere, at least two different class loaders are at work: The system class loader, and the servlets or WebSphere class loader. A common practice is to have the Toolbox jar file (jt400.jar) in the system class loader’s classpath. That way, all instances of WebSphere can share a single copy of the Toolbox. The application’s servlets and .pcml files are typically in the servlet class loader’s classpath. When the Toolbox tries to load the .pcml files, it uses the class loader that loaded the Toolbox (that is, the system class loader). The directory that holds the .pcml files is not in this classpath, however, so the system class loader cannot find the .pcml files.

0

When running servlets under WebSphere, at least two different class loaders are at work: The system class loader, and the servlets or WebSphere class loader. A common practice is to have the Toolbox jar file (jt400.jar) in the system class loader’s classpath. That way, all instances of WebSphere can share a single copy of the Toolbox. The application’s servlets and .pcml files are typically in the servlet class loader’s classpath. When the Toolbox tries to load the .pcml files, it uses the class loader that loaded the Toolbox (that is, the system class loader). The directory that holds the .pcml files is not in this classpath, however, so the system class loader cannot find the .pcml files. For example, suppose the system classpath is /jt400/jt400.jar:/otherCommonStuff/, and the WebSphere classpath is /myServlets/. The application provider will put her servlets and .pcml files in /myServlets/ . The Toolbox will use the system class loader to find .pcml files, so it will only look in jt

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123