Assuming CGI Task, I look at some of the sample code in iwhome/local/config/lib/content_center/customer_samples_src/src/com/corp/custom/ and see that they're basically simple frameworks that extend the HttpServlet class which presumably is tied to the import javax.servlet.http.*; entry in the code.What jar file contains this class?I'm looking in iwhome/httpd/webapps/content_center/WEB-INF/lib - should I be looking somewhere else?I already have commons-httpclient-3.1.jar as an external jar but that doesn't seem to satisfy EclipseI don't see any jar file whose name begins with javax, http, or servlet
Continuing this assumption, the sample source code appears to be, as I said, a simple framework that invokes a JSP fileIs this the right approach? or should I be trying to write the entire thing within the Java class?
Usually the file you are looking for is servlet.jar. But iwhome\servletd\common\lib\servlet-api.jar should work. javax.servlet.http is the name of the package. You could open that jar file up and see the directory structure inside that matches it. The * in the code will import all the classes within that package.
iwhome/servletd/lib/servlet-api.jar
web.xml
...<web-app> <filter-mapping> <filter-name>authentication</filter-name> <servlet-name>cgi_class_name</servlet-name> </filter-mapping> <servlet> <servlet-name>cgi_class_name</servlet-name> <servlet-class>com.company_name.wfm.cgi_class_name</servlet-class> </servlet></web-app>
http://$IW_SERVER/iw-cc/cgi_class_name
Aside[indent]What are the pros/cons of compiling the java files on the TS server as opposed to just placing the finished product into the customer_src/lib/ directory?I still need to run make_toolkit.ipl, which still disrupts [GUI] services temporarily. Is the "downtime" significantly shorter by just putting the jar file there?[/indent]Back to the issue currently at hand[indent]Okay, so I edit the web.xml file to look something like what I found semi-documented on page 102 of the UICG:...<web-app> <filter-mapping> <filter-name>authentication</filter-name> <servlet-name>cgi_class_name</servlet-name> </filter-mapping> <servlet> <servlet-name>cgi_class_name</servlet-name> <servlet-class>com.company_name.wfm.cgi_class_name</servlet-class> </servlet></web-app> and I run make_toolkit.ipl (wow - this took over 7 minutes, it usually only takes about 1 minute)I change the property on my CGI Task:[indent]CGI Script Name: http://$IW_SERVER/iw-cc/cgi_class_name[/indent] send the modified WFM to the server, publish it, and then try to run it and I get an error:[indent]TeamSite : WrapperError: Error trying to open a pipe to iwhome/httpd/iw-bin/http: (1).[/indent]Any ideas on this one?[/indent]Note: nothing shows up in servletd_out.log nor in my custom.log to which I send all my custom code diagnostic messages. So the error seems to be occurring before my code actually gets executed.
package com.company_name.wfm;
I've illustrated web.xml servlet settings in [thread=31953]this[/thread] thread, perhaps it may help.You *may* miss Servlet mapping, etc
...<web-app> <filter-mapping> <filter-name>authentication</filter-name> <servlet-name>cgi_class_name</servlet-name> </filter-mapping> <servlet> <servlet-name>cgi_class_name</servlet-name> <servlet-class>com.company_name.wfm.cgi_class_name</servlet-class> </servlet> <servlet-mapping> <servlet-name>cgi_class_name</servlet-name> <url-pattern>/url_alias</url-pattern> </servlet-mapping></web-app>
...- but when I try to invoke it through the CGITask in my workflow I get the error I showed before.[indent] TeamSite : WrapperError: Error trying to open a pipe to iwhome/httpd/iw-bin/http: (1).[/indent]Ideas?
/iw-cc/url_alias
http://$IW_SERVER/iw-cc/url_alias
Sigh - yes, I didn't scroll far enough down in the customer_samples_src/etc/web.xml when I was creating the one in customer_src/etc/ - and thus missed the additional section:...<web-app> <filter-mapping> <filter-name>authentication</filter-name> <servlet-name>cgi_class_name</servlet-name> </filter-mapping> <servlet> <servlet-name>cgi_class_name</servlet-name> <servlet-class>com.company_name.wfm.cgi_class_name</servlet-class> </servlet> <servlet-mapping> <servlet-name>cgi_class_name</servlet-name> <url-pattern>/url_alias</url-pattern> </servlet-mapping></web-app>In my case, I used the same name for cgi_class_name as I did for url_alias - I rebuilt the toolkit and I can access the URL directly via the browser - http://servername/iw-cc/url_alias (after going through the login page) - but when I try to invoke it through the CGITask in my workflow I get the error I showed before.[indent] TeamSite : WrapperError: Error trying to open a pipe to iwhome/httpd/iw-bin/http: (1).[/indent]Ideas?
Ghoti, Did you go with putting your java files into the src directory, or your class or jar files into the lib directory? Wondering for future reference for when I get to that point.
taskID : 427200iw_locale : eniw_taskid : 427200done_page : /iw-cc/base/util/close_or_home.htmltaskid : 427200full_redirect : truebanner.flag : falsecgi_transition : truetask_id : 427200area_path : //server3/default/main/test/WORKAREA/testsession : 52616e646f6d4956fc4a2c9a36a837d646e6b94cdc960469cdfc8bdc493cd941fe75874f787b751d6ab4bdd4445a62cdc6dc3cd398c087932ffcd0c1d59d9dcc2b2ecf2ba23fe6eesession_string : 52616e646f6d4956fc4a2c9a36a837d646e6b94cdc960469cdfc8bdc493cd941fe75874f787b751d6ab4bdd4445a62cdc6dc3cd398c087932ffcd0c1d59d9dcc2b2ecf2ba23fe6eeiw_user : SERVER3\Administrator
CSClient csClient = null; csClient = (CSClient) request.getAttribute("iw.csclient");
Exception at com.corp.teamsite.workflow.task.WebServletTask.doPost(WebServletTask.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.interwoven.ui.base.util.SetRequestEncodingFilter.doFilter(SetRequestEncodingFilter.java:105) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595)
client