Skip to main content
14-Alexandrite
Mar 22, 2016 10:45 AM UTC
Question

mmweb - WebConfig.getInstance(context) - what's the context introduced with 19.1

CED Model Manager mmweb customization needs to use WebConfig.getInstance() to retrieve some info through the XML configuration file.

With 19.1 introduction WebConfig.getInstance() changed to WebConfig.getInstance(context).

Is there anybody able to explain what's the context parameter, and how to set it properly in order to re-use WebConfig.getInstance(context) to retrieve XML configuration information.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

3 replies

13-Aquamarine
Mar 30, 2016 4:58 PM UTC

First quick answer - retrieved from my Netbeans IDE

/**

     * Get the current WebConfig instance.

     * @return the WebConfig instance.

     * @see WebConfigFactory#createInstance(ServletContext)

     */

    public static synchronized WebConfig getInstance(final ServletContext context) {

Translate
lfortner14-AlexandriteAuthor
14-Alexandrite
Mar 30, 2016 6:01 PM UTC

Thanks Max,

And this is precisely my question: how to use this method, and what's the ServletContext context I should use to retrieve such a WebConfig. Have you a use example of this method?

Translate
13-Aquamarine
Mar 31, 2016 10:45 AM UTC

Well, from inspecting the sources with Netbeans, I don't get a clue 😞

I suggest the following Actions (in this order):

- Log A Case with PTC Support

- Debug the WebService - not easy, but can be done

Translate