Last modified by Kieran Kelleher on 2010/01/27 13:23

Show last authors
1 **Discussion:** You select 'Run as...' -> WOApplication; the project runs; you can copy the url out of the console and into the browser; but it doesn't conveniently launch straight into the browser anymore.
2
3 **Solution:** You probably have a space in your Eclipse project name; eg. 'My Project' remove it, or replace it suitably, eg. 'My_Project' and it will probably all start working again.
4
5 **Discussion:** Presumably, the launch fails because the Eclipse project name automatically forms part of the URL for running the application as a WOApplication in Eclipse/WOLips. However, a space is not a legal character for a URL as we know, and must usually be escaped with UTF-8 encoding as '%20'.
6
7 === Leopard is missing WOOpenURL ===
8
9 {{note}}
10 WOOpenURL only exists in WO 5.3.3 and lower versions of WO. WO 5.4.X does not use WOOpenURL file, which incidentally existed to provide cross-platform launching. In WO 5.4.X, the method com.webobjects._ideservices._WOLaunchServices#_openURL now determines the logic for auto-open-in-browser. And if you could look at the source code, not that I would of course, you would notice that it just calls /usr/bin/open instead. So if you want auto-open-in-browser to launch a different browser than your default (for example if you use FireFox for development and Safari as your default browser) you will have to write a patch for this class and insert it in classpath ahead of the built-in one.
11 {{/note}}
12
13 If you are on Leopard, something else is going on.
14
15 There used to be an application called /System/Library/WebObjects/Executables/WOOpenURL that opened the standard web browser with a pointer to the running the project, eg: [[http:~~/~~/193.78.79.17:49832/cgi-bin/WebObjects/d2wupload2.woa>>url:http://193.78.79.17:49832/cgi-bin/WebObjects/d2wupload2.woa||rel="nofollow" shape="rect" class="external-link"]]
16
17 That application does not exist any more in Leopard. But there is a simple workaround:
18
19 Type this in a terminal as root (or precede with sudo).
20
21 {{code}}
22
23 mkdir -p /System/Library/WebObjects/Executables
24 ln -s /usr/bin/open /System/Library/WebObjects/Executables/WOOpenURL
25
26 {{/code}}
27
28 ==== WebObjects 5.3.3 on Leopard ====
29
30 If you change the **wo.wosystemroot** setting to use WO 5.3 frameworks from a different location than {{code language="none"}}/System/Library/Frameworks{{/code}}, you will need to also change the location of the above hack. e.g.
31
32 {{code}}
33
34 wo.wosystemroot=/Users/chuck
35
36 {{/code}}
37
38 Requires this change:
39
40 {{code}}
41
42 mkdir -p /Users/chuck/Library/WebObjects/Executables
43 ln -s /usr/bin/open /Users/chuck/Library/WebObjects/Executables/WOOpenURL
44
45 {{/code}}