cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a custom servlet to the WIndchill tomcat

SOLVED
Highlighted
Regular Member

How to add a custom servlet to the WIndchill tomcat

Hello,

we are trying to add a custom servlet to the Windchill tomcat but we are not able to do it. So, far we added a custom servlet that can be accessed through Windchill like. http://<servername>/Windchill/servlet/myservlet/mybean But this is not we are trying to do we would like to access the servlet like http://<servername>/myservlet/mybean.

We did everything like on the regular tomcat (edit web.xml, deployed servlet under webapps) but still the servlet was not found.

Does any body has idea how to do it or can point us to the right direction?

 

Thanks, best regards!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to add a custom servlet to the WIndchill tomcat

This  is way beyond the support scope for PTC, but I may be able to provide some direction.

 

What you essentially want to do is to redirect to the servlet directly from the webserver context, so you may need a ajp-worker mapping in the HttpServer configuration.

 

Windchill AJP Configuration is in file > app-Windchill-AJP.conf so you may need a mapping like 

JkMount /myservlet ajpWorker

 

View solution in original post

4 REPLIES 4
Highlighted

Re: How to add a custom servlet to the WIndchill tomcat

This  is way beyond the support scope for PTC, but I may be able to provide some direction.

 

What you essentially want to do is to redirect to the servlet directly from the webserver context, so you may need a ajp-worker mapping in the HttpServer configuration.

 

Windchill AJP Configuration is in file > app-Windchill-AJP.conf so you may need a mapping like 

JkMount /myservlet ajpWorker

 

View solution in original post

Highlighted

Re: How to add a custom servlet to the WIndchill tomcat

Hi Arpit-Singh,

thank you for your response. I put my servlet under the tomcat folder in the folder webapps (name servletTestApp/myservlet) in the myservlet folder there are WEB-INF folder and class files. Then I changed app-Windchill-AJP.conf by adding a line JkMount /servletTestApp/myservlet ajpWorker.

I am just checking am I doing ok or not. After restarting Apache server the servlet should be accessible by

http://<servername>/servletTestApp/myservlet

 

Sorry for the trouble. We are trying to enable our student workers to be able to download certain pdf documents from the WIndchill without usage of Windchill interface (company policy). Student will input given part number to the web page that will search the Windchill (actually running a servlet that will obtain the document using qualified user credentials)  and return particular pdf (download).

 

Best regards!

Highlighted

Re: How to add a custom servlet to the WIndchill tomcat

Hi, nbojcetic.

 

You can also put any JSP file into the Windchill\codebase\infoengine\jsp folder and run it without any additional setup.

 

There you can create a simple interface and use rest services to fetch any data, including the pdf of drawings available to the currently logged-in user.

 

Here I made a tool that checks part usages across multiple databases and gives the user an option to download drawing PDF.

Custom Where Used.png

 

Kind regards,

Dmitry.

Highlighted

Re: How to add a custom servlet to the WIndchill tomcat

Hi Dimitry,

very interesting solution, thank you. I will try that also and see what suits students needs better. The main drawback of this approach is authentication (the user, in our case student, have to login, using form login, to the Windchill) in the case of servlet we can use "dummy" account to access the servlet and the "real" account to fetch data from Windchill.

No, I am struggling with servlets 😞

Best regards!

Nenad

Announcements
LiveWorx Call For Papers Happening Now!