A standard "Symply Lift" RestHelper example project features code
, code.lib
and code.model
and bootstrap.liftweb.Boot
namespaces. I've changed those to mycompany.myproject.code
e t.c. Now the project compiles ok and Jetty starts just fine but I get The Requested URL /my/url was not found on this server
error when I try to access what used to work just fine before the refactoring. What may I have forgotten to change? How should I change the packages names safely?
Changing LiftRules.addToPackages("code")
to LiftRules.addToPackages("mycompany.myproject.code")
doesn't help.
UPDATE: I've found out that the problem was caused by the fact I've moved bootstrap.liftweb.Boot
to mycompany.myproject.bootstrap.liftweb.Boot
. I've moved it back and it is up and working again. But I am still curious how can I customize bootstrap.liftweb
location as bootstrap.liftweb.Boot
class differs from project to project and I don't want all of them to have the same full name.
From the main menu, select File | Project Structure Ctrl+Alt+Shift+S and click Project Settings | Modules. Select the necessary module and then open the Sources tab in the right-hand part of the dialog. Click Add Content Root and specify the folder that you want to add as a new content root.
Open the Project Structure settings. In the Projects pane of the Project Structure page, click the project you want to configure content roots for. In the dialog that opens, locate the desired directory and click OK.
There is no problem in deleting this. It's not only the WebStorm IDE creating this file, but also PhpStorm and all other of JetBrains' IDEs. It is safe to delete it but if your project is from GitLab or GitHub then you will see a warning.
Switching between projects To switch between open projects, you can use the following commands of the Window menu: Window | Next Project Window Ctrl+Alt+] Window | Previous Project Window Ctrl+Alt+[
You can define your own Boot
class using LiftFilter Setup in web.xml
as described in Chapter 3.2 Bootstrap of Exploring Lift.
From the book:
<filter>
... filter setup here ...
<init-param>
<param-name>bootloader</param-name>
<param-value>foo.bar.baz.MyBoot</param-value>
</init-param>
</filter>
where your custom boot class class must subclass net.liftweb.http.Bootable
and implement the boot
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With