Hi Torsten,
It appears to be a problem with the URL for the help set i.e. the problem
with absoulte and relative URL.
In the attached mail, which I had sent you earlier, there are guidelines
about converting the URL and even code that helps you convert the URL.
For ease of debugging you could print the URL on the client side to see what
it is exactly.
Also, I hope you set the correct user parameters for help-set-url-provider
and help-set-url-prefix correctly:
A snippet from ULCJavaHelpSample:
String helpSetURLProvider =
ClientContext.getUserParameter("help-set-url-provider");
if ("URL".equalsIgnoreCase(helpSetURLProvider)) {
String helpSetURLPrefix =
ClientContext.getUserParameter("help-set-url-prefix");
try {
animalsHelpSetURL = new URL(helpSetURLPrefix +
"/animals/Animals.hs");
May be you want to play with the url-prefix - absolute v/s relative url.
I hope this helps.
Thanks and regards,
Janak
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Hofmann, Torsten
Sent: Tuesday, August 01, 2006 6:26 PM
To: [email protected]
Subject: [ULC-developer] Error using ULCJavaHelp over Apache and Tomcat
Hello
I am trying to use ULCJavaHelp it does not work with an Apacke as "Proxy".
My javahelp-file .hs is in an jar file. This file is only on the server. The
URL is created like this:
helpSetURL = RequestConstants.class.getResource(test.hs")
But this does not work. Does anyone know why?
Environment:
This construct works
Tomcat --> Client
Tomcat --> Apache --> Client
This construct does not work!!!
The Application runs correct but the help does not work an i got the
following Exception
java.lang.IllegalStateException: could not create help set:
javax.help.HelpSetException: Could not parse
Got an IOException (Das System kann den angegebenen Pfad nicht finden)
Parsing failed for null
at javax.help.HelpSet.<init>(HelpSet.java:146)
at com.canoo.ulc.javahelp.client.UIHelpSet.createHelpSet(UIHelpSet.java:33)
at com.canoo.ulc.javahelp.client.UIHelpSet.restoreState(UIHelpSet.java:50)
at com.ulcjava.base.client.UIProxy.init(UIProxy.java:38)
at com.ulcjava.base.client.UISession.newInstance(UISession.java:66)
at com.ulcjava.base.client.UISession.find(UISession.java:185)
at com.ulcjava.base.client.UISession.getManaged(UISession.java:276)
at com.ulcjava.base.client.UISession.getManaged(UISession.java:263)
at
com.canoo.ulc.javahelp.client.UIHelpSet.getBasicHelpSet(UIHelpSet.java:26)
at
de.wuerth.phoenix.phxip.base.client.help.UIHelpBroker.handleSetHelpSet(Unkno
wn Source)
at
de.wuerth.phoenix.phxip.base.client.help.UIHelpBroker.restoreState(Unknown
Source)
at com.ulcjava.base.client.UIProxy.init(UIProxy.java:38)
at com.ulcjava.base.client.UISession.newInstance(UISession.java:66)
at com.ulcjava.base.client.UISession.handleRequest(UISession.java:95)
at com.ulcjava.base.client.UISession.b(UISession.java:119)
at com.ulcjava.base.client.UISession.access$1500(UISession.java:284)
at com.ulcjava.base.client.UISession$1.run(UISession$1.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at
com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(FilteringEventQueu
e.java:19)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at com.ulcjava.base.client.UIWindow.show(UIWindow.java:0)
at com.ulcjava.base.client.UIDialog.show(UIDialog.java:0)
at com.ulcjava.base.client.UIWindow.setVisible(UIWindow.java:90)
at com.ulcjava.base.client.UIWindow.restoreState(UIWindow.java:12)
at com.ulcjava.base.client.UIDialog.restoreState(UIDialog.java:28)
at com.ulcjava.base.client.UIProxy.init(UIProxy.java:38)
at com.ulcjava.base.client.UISession.newInstance(UISession.java:66)
at com.ulcjava.base.client.UISession.handleRequest(UISession.java:95)
at com.ulcjava.base.client.UISession.b(UISession.java:119)
at com.ulcjava.base.client.UISession.access$1500(UISession.java:284)
at com.ulcjava.base.client.UISession$1.run(UISession$1.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at
com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(FilteringEventQueu
e.java:19)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
at com.canoo.ulc.javahelp.client.UIHelpSet.createHelpSet(UIHelpSet.java:37)
at com.canoo.ulc.javahelp.client.UIHelpSet.restoreState(UIHelpSet.java:50)
at com.ulcjava.base.client.UIProxy.init(UIProxy.java:38)
at com.ulcjava.base.client.UISession.newInstance(UISession.java:66)
at com.ulcjava.base.client.UISession.find(UISession.java:185)
at com.ulcjava.base.client.UISession.getManaged(UISession.java:276)
at com.ulcjava.base.client.UISession.getManaged(UISession.java:263)
at
com.canoo.ulc.javahelp.client.UIHelpSet.getBasicHelpSet(UIHelpSet.java:26)
at
de.wuerth.phoenix.phxip.base.client.help.UIHelpBroker.handleSetHelpSet(Unkno
wn Source)
at
de.wuerth.phoenix.phxip.base.client.help.UIHelpBroker.restoreState(Unknown
Source)
at com.ulcjava.base.client.UIProxy.init(UIProxy.java:38)
at com.ulcjava.base.client.UISession.newInstance(UISession.java:66)
at com.ulcjava.base.client.UISession.handleRequest(UISession.java:95)
at com.ulcjava.base.client.UISession.b(UISession.java:119)
at com.ulcjava.base.client.UISession.access$1500(UISession.java:284)
at com.ulcjava.base.client.UISession$1.run(UISession$1.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at
com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(FilteringEventQueu
e.java:19)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at com.ulcjava.base.client.UIWindow.show(UIWindow.java:0)
at com.ulcjava.base.client.UIDialog.show(UIDialog.java:0)
at com.ulcjava.base.client.UIWindow.setVisible(UIWindow.java:90)
at com.ulcjava.base.client.UIWindow.restoreState(UIWindow.java:12)
at com.ulcjava.base.client.UIDialog.restoreState(UIDialog.java:28)
at com.ulcjava.base.client.UIProxy.init(UIProxy.java:38)
at com.ulcjava.base.client.UISession.newInstance(UISession.java:66)
at com.ulcjava.base.client.UISession.handleRequest(UISession.java:95)
at com.ulcjava.base.client.UISession.b(UISession.java:119)
at com.ulcjava.base.client.UISession.access$1500(UISession.java:284)
at com.ulcjava.base.client.UISession$1.run(UISession$1.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at
com.ulcjava.base.client.FilteringEventQueue.dispatchEvent(FilteringEventQueu
e.java:19)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Torsten Hofmann
Dipl. - Informatiker (FH)
IT Consultant Business Integration
Würth Phoenix GmbH
Drillberg 6
D-97980 Bad Mergentheim
(Phone: +49 7931 91 6284
7 Fax: +49 7931 91 7284
+E-Mail: [EMAIL PROTECTED]
Website: www.wuerth-phoenix.de
--- Begin Message ---
Hi Torsten,
The attached file is a URL:
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
Thanks and regards,
Janak
>-----Original Message-----
>From: Hofmann, Torsten [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, June 27, 2006 3:23 PM
>To: Janak Mulani
>Subject: AW: [ULC-developer] ULC over Apache
>
>
>Hello Janak
>
>The file you have attached was blocked from our firewall. Please
>could you rename the extention to e.g. .test and sent me again
>
>Thanks so far
>
>
>Torsten Hofmann
>Dipl. - Informatiker (FH)
>IT Consultant Business Integration
>
>Würth Phoenix GmbH
>Drillberg 6
>D-97980 Bad Mergentheim
>
>(Phone: +49 7931 91 6284
>7 Fax: +49 7931 91 7284
>+E-Mail: [EMAIL PROTECTED]
> Website: www.wuerth-phoenix.de
>
>
>-----Ursprüngliche Nachricht-----
>Von: Janak Mulani [mailto:[EMAIL PROTECTED]
>Gesendet: Dienstag, 27. Juni 2006 09:23
>An: Hofmann, Torsten
>Cc: Sandro Pedrazzini
>Betreff: FW: [ULC-developer] ULC over Apache
>
>Hi Torsten, Sandro,
>
>Here is a full compilation of all the info about "ULC over Apache".
>
>Please get back to me if you need more details.
>
>Thanks and regards,
>
>Janak
>
>-----------------------------
>following the snippet that handles relative URLs in the applet
>case. It is used by a custom AppletBrowserService in
>showDocument() and by the applet launcher itself when starting the
>UI session / creating the connector.
>
>public static URL convertToAbsoluteURL(Applet applet, String urlString) {
> if (urlString == null) {
> return null;
> }
>
> try {
> // check whether the URL is absolute (contains a
>protocol, ending with "://")
> if (urlString.indexOf("://") >= 0) {
> return new URL(urlString);
> }
>
> // the URL of the page the applet is embedded into
> URL documentBase = applet.getDocumentBase();
>
> // URL relative to the document base (not starting with "/")
> if (!urlString.startsWith("/")) {
> String documentBaseFile = documentBase.getFile();
> String documentBasePath =
>documentBaseFile.substring(0, documentBaseFile.lastIndexOf('/'));
> urlString = documentBasePath + "/" + urlString;
> } else {
> // URL relative to the host
> }
>
> return new URL(documentBase.getProtocol(),
>documentBase.getHost(), documentBase.getPort(), urlString);
> } catch (MalformedURLException e) {
> throw new IllegalArgumentException("invalid URL
>string: " + urlString, e);
> }
> }
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Pavkovic, Ilja
>Sent: Thursday, June 15, 2006 3:20 PM
>To: [EMAIL PROTECTED] Com; Hofmann, Torsten
>Cc: [email protected]
>Subject: RE: [ULC-developer] ULC over Apache
>
>
>Hi,
>
>one addition:
>in a configuration like
>
>client
>-> apache.somewhere.com:80
>-> tomcat.somewhere.else.com:8080
>
>you could play around the the apache directive ProxyPreserveHost On
>
>This keeps the hostname "apache.somewhere.com:80" in the request
>header and should solve your problem.
>
>Using this another problem arises:
>
>client
>-> https://apache.somewhere.com:443
>-> http://tomcat.somewhere.else.com:80
>
>is still a problem as the request type https is not preserved.
>
>Best Regards,
> Ilja Pavkovic
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Janak Mulani
>Sent: Thursday, June 15, 2006 10:50 AM
>To: Hofmann, Torsten
>Cc: [email protected]
>Subject: RE: [ULC-developer] ULC over Apache
>
>
>Hi Torsten,
>
>There is already an issue: http://www.canoo.com/jira/browse/UBA-5744.
>
>Some colleagues have had expreience with server side proxies and
>they offer the following tips:
>
>There are different way one can use tomcat together with apache:
>
>1. by using ajp13-connector (or ajp12)
>or
>2. by using http and apache as a server side proxy.
>
>If apache is configured as server side proxy it itself performs
>http-requests at the tomcat-http-server => the Servlet only sees a
>request - URI that points into the tomcat server and not the apache server.
>
>Example:
>
>client -> apache.somewhere.com:80 ->
>tomcat.somewhere.else.com:8080
>
>=> the ULC Application running on tomcat.somewhere.else.com only
>can see requests to tomcat.somewhere.else.com:8080 and therefore
>probably is generating URLs that use this as a basis.
>
>The .jsp's that generate the applet-tag, ... should show the same problem.
>
>One solution could be to use ajp13, because it transports the
>original request headers and URI to tomcat.
>
>Another one, to somehow configure the ULC-Application to know
>about apache.somewhere.com.
>
>If you make use of absolute URLs in your ULC application (e.g. the
>application-url in the JSP, or an URL to be opened via
>ClientContext.showDocument()) and if you use a server side proxy,
>these absolute URLs finally point to the application server and
>not to the server side proxy (i.e. Apache in your case).
>
>1. pass the context URL to your application and use this to
>calculate the absolute URLs => this is a deployment dependant
>element that has to be adapted for each deployment
>
>2. use relative URLs in your application and calculate the
>absolute URL on the client => only works with Applets For this you
>will have to implement a custom Applet launcher that could handle
>relative URLs for both, application-urls and
>ClientContext.showDocument() URLs. As URL root you need to use the
>Applets document base (Applet.getDocumentBase()).
>
>I hope this helps.
>
>Thanks and regards,
>
>Janak
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Hofmann, Torsten
>Sent: Tuesday, June 13, 2006 12:07 PM
>To: [email protected]
>Subject: [ULC-developer] ULC over Apache
>
>
>Hello
>
>Is it possible to run a ULC Application in this way
>
>
>ULC-Server(Tomcat) --> Apache --> Internet
>
>When i try this i get an error for example in the method
>ClientContext.showDocument, because the application tried to reach
>the file at the tomcat server.
>
>Could someone give me a hint.
>
>Regards
>
>Torsten Hofmann
>Dipl. - Informatiker (FH)
>IT Consultant Business Integration
>
>Würth Phoenix GmbH
>Drillberg 6
>D-97980 Bad Mergentheim
>
>(Phone: +49 7931 91 6284
>7 Fax: +49 7931 91 7284
>+E-Mail: [EMAIL PROTECTED]
> Website: www.wuerth-phoenix.de
>
>_______________________________________________
>ULC-developer mailing list
>[email protected]
>http://lists.canoo.com/mailman/listinfo/ulc-developer
--- End Message ---