|
WebServer_Embedded
ExtPascal also supports an embedded (or internal) Web server mode. When an ExtPascal application is compiled with an embedded Web server, you don't have to install and configure a Web server such as Apache or IIS to run the app, although you lose the flexibility and facilities that an Apache or IIS server can offer via its modules. StepsHere are the steps for compiling the example app with an embedded Web server: 1. Follow the First Steps on GettingStarted page. 2. Download the Indy 10 source code, if needed. Indy project Delphi source FPC source Note that Delphi 2006 and later already includes Indy 10. 3. Open ExtPascalSamples.dpr with Delphi or open ExtPascalSamples_embedded.lpi with Lazarus.
4. With Delphi, choose Project | Compile. With Lazarus, choose Run | Build. 5. Copy the ExtJS folder below the folder where the ExtPascalSamples executable file is located. Make sure the ExtJS folder is named ext for this example. 6. Start ExtPascalSamples from the command line or by double-clicking it. Note that the embedded server example does not appear to work when run within the Delphi or Lazarus IDE. 7. Start a Web browser and enter http://localhost/Home Port 80 is used in this example. Other Web servers must be disabled on your machine if they're using port 80. You can also change the port used in the call to TIdExtApplication.Create. For example, if you change the port from 80 to 8080 you would enter http://localhost:8080/Home in the browser. 8. You can shut down the app with Task Manager (Windows) or Activity Monitor (OS X). |
If you change the Port from 80 do you still need to disable other web servers?
No
If you can't run it from within the IDE, how are you going to debug the app? I don't see the point of going embedded unless you want to create a demo webapp. I'd really like to see embedded working within the IDE. Just my 2 cents. :)
> You can shut down the app with Task Manager (Windows) or Activity Monitor (OS X)
Such a dirty way, doesn't the shutdown method work?
Hi. I try to compile it on Delphi XE, but have some errors: Error? IdExtHTTPServer.pas(583): E2003 Undeclared identifier: 'AddSrcCookie?' (ARequest.Cookies.AddSrcCookie?(CookieText?) => I changed AddSrcCookie? -> AddClientCookies?)
Error? ExtPascalSamples?.dpr(63): E2010 Incompatible types: 'class of TIdExtSession' and 'class of TSession' (Application := TIdExtApplication.Create('ExtPascal? Samples ' + ExtPascalVersion?, TSession, 80, 5))
Hi, i have to made changes in IdExtHTTPServer for the method AddSrcCookie?, the program run and i can connect with my web browser, the problemm is the ExtSamplesEmbedded? no load in the web browser, only show "Loading ExtPascalSamples? 0.9.9...", wath i have to do?