You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/recipes/ai.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ This feature is still a work in progress, and we are working to improve the qual
161
161
### Monitor Documentation Tab
162
162
163
163
In the Monitor's Documentation tab, AI can answer questions about Lucee based on retrieval-augmented generation (RAG) with available documentation and links to related documents.
164
-
This feature is also in development for enhanced input quality (read more about [https://github.com/lucee/lucee-docs/blob/master/docs/recipes/monitoring-debugging.md](Monitor Documentation) ).
164
+
This feature is also in development for enhanced input quality (read more about [Monitor Documentation](monitoring-debugging.md)).
Copy file name to clipboardExpand all lines: docs/recipes/check-for-changes.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,7 @@
19
19
20
20
## Check for changes in your configuration file automatically
21
21
22
-
Lucee can automatically check for changes in your configuration files from the complete server or a single web context.
23
-
24
-
This is useful if you are doing scripted deploys and/or synchronization from, for example, a master instance to many slave instances of Lucee.
22
+
Lucee can automatically check for changes in configuration files - useful for scripted deploys and syncing from a primary instance to many replica instances.
Copy file name to clipboardExpand all lines: docs/recipes/dynamic-proxy-enhancements.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@
26
26
27
27
# Dynamic Proxy Enhancements in Lucee 7
28
28
29
-
Lucee 7 introduces significant improvements to dynamic proxy creation, making Java interoperability more seamless and predictable when components implement Java interfaces.
29
+
All component functions and properties are now always included in dynamic proxies, making Java interoperability more predictable.
The example code shown underneath is a modified version of the DirectoryWatcher.cfc, which, at time of writing, is in line for reviewing at the Lucee team.
39
+
The example code shown underneath is based on `DirectoryWatcher.cfc`.
44
40
45
41
By default, you need to have the following functions:
46
42
47
-
- An init function, which receives the necessary config data.
48
-
- A start function, which continues to run while variables.state="running".
49
-
- A stop and restart function.
50
-
- A getState function, which returns the current state of the gateway instance (running, stopping, stopped).
51
-
- A sendMessage function, which will be called when the CFML sendGatewayMessage function is used.
43
+
- An `init` function, which receives the necessary config data.
44
+
- A `start` function, which continues to run while `variables.state="running"`.
45
+
- A `stop` and `restart` function.
46
+
- A `getState` function, which returns the current state of the gateway instance (`running`, `stopping`, `stopped`).
47
+
- A `sendMessage` function, which will be called when the CFML `sendGatewayMessage` function is used.
52
48
53
49
The following is all the code you need:
54
50
@@ -98,8 +94,8 @@ The following is all the code you need:
WHERE directory = "#getDirectoryFromPath(variables.config.filepath)#"
102
-
AND name = "#getFileFromPath(variables.config.filepath)#"
97
+
WHERE directory = <cfqueryparam value="#getDirectoryFromPath(variables.config.filepath)#" cfsqltype="cf_sql_varchar">
98
+
AND name = <cfqueryparam value="#getFileFromPath(variables.config.filepath)#" cfsqltype="cf_sql_varchar">
103
99
</cfquery>
104
100
105
101
<!--- call the listener CFC if the file size meets the minimum requirement --->
@@ -110,11 +106,11 @@ The following is all the code you need:
110
106
</cfcomponent>
111
107
```
112
108
113
-
We will save the file as {Lucee-install}/lib/lucee-server/context/gateway/filesizechecker/FileSizeWatcher.cfc.
109
+
We will save the file as `{lucee-server}/context/gateway/filesizechecker/FileSizeWatcher.cfc`.
114
110
115
-
The variables.listener and variables.config variables did not just come falling from the sky; instead, it was saved to the variables scope in the init() function.
111
+
The `variables.listener` and `variables.config` variables did not just come falling from the sky; instead, they were saved to the variables scope in the `init()` function.
116
112
117
-
Lastly, we need to create the Gateway driver. We can use the Gateway driver code shown before, and then save it as {Lucee-install}/lib/lucee-server/context/admin/gdriver/FileSizeWatcher.cfc.
113
+
Lastly, we need to create the Gateway driver. We can use the Gateway driver code shown before, and then save it as `{lucee-server}/context/admin/gdriver/FileSizeWatcher.cfc`.
118
114
119
115
Now we are almost good to go! We do need to restart Lucee to have it pick up the new Gateway driver. So just go to the server admin, click on the menu-item "Restart", and then hit the "Restart Lucee" button.
dump(cgi); // or writedump if you love to write more
45
-
echo(now()); // or writeoutput if you love to write more
46
-
</cfscript>
30
+
dump(cgi); // browser output (or writeDump if you love to write more)
31
+
echo(now()); // browser output (or writeOutput if you love to write more)
32
+
systemOutput(cgi, true); // console output
33
+
systemOutput(now(), true); // console output
47
34
```
48
35
49
-
This example has a simple dump with CGI. It displays normally in the browser while we are running example1.cfm.
50
-
51
-
## Example 2:
36
+
## New Line
52
37
53
38
```luceescript
54
-
// example2.cfm
55
-
systemOutput(now(),true); // with new line
39
+
systemOutput(now(), true); // with new line
56
40
```
57
41
58
-
systemOutput() creates output content in the web browser (console). Here the systemoutput has two arguments: first argument _now()_ for current date and time, and second argument _true_ for a new line. Run this in the browser and see the content in the console.
42
+
Second argument `true` adds a newline.
59
43
60
-
## Example 3:
44
+
## Error Stream
61
45
62
46
```luceescript
63
-
// example3.cfm
64
-
systemOutput(now(),true,true); // send to error stream
47
+
systemOutput(now(), true, true); // send to error stream
65
48
```
66
49
67
-
This example uses three arguments: first argument `now()` for current date and time, second argument `true`for a new line, and third argument for the stream. The stream argument indicates which stream the output should go. There are two streams to choose from: "Output stream" and "Error stream". A value of true in the third argument indicates the output should go to the error stream. Run this in the browser and see the contents with the output stream in the console.
50
+
Third argument `true`writes to stderr instead of stdout.
68
51
69
-
## Example 4:
52
+
## Complex Objects
70
53
71
54
```luceescript
72
-
// example4.cfm
73
-
systemOutput(cgi,true); // complex object
55
+
systemOutput(cgi, true); // complex object
74
56
```
75
57
76
-
In addition to simple strings or simple values, you can also pass complex objects to the SystemOutput() function. In this example we pass CGI as the argument. When you run this in the browser, you get a serialized output in the console.
58
+
Outputs serialized representation of structs, queries, etc.
77
59
78
-
## Example 5:
60
+
## Stack Trace
79
61
80
62
```luceescript
81
-
// example5.cfm
82
-
systemOutput("Here we are:<print-stack-trace>",true); // complex object
63
+
systemOutput("Here we are:<print-stack-trace>", true);
83
64
```
84
65
85
-
SystemOutput() has another good feature too. There is `<print-stack-trace>` used to show helpful information (where it is, which template, on which line number) while we mouse over the dump content. Lucee will detect and show the stack-trace if we add `<print-stack-trace>` to the SystemOutput() function in our code. When we run this in the browser, we see the stack-trace in the console.
86
-
87
-
## Footnotes
88
-
89
-
Here you can see these details on video also:
66
+
The `<print-stack-trace>` placeholder outputs the current stack trace.
0 commit comments