A web project it not limited to just static files. Web projects can include server-side scripting files including JSP, PHP, CF, or Python files. In the end, these files would be published to the appropriate application server or web server enabled to evaluate these files. Specifically for Java, Alfresco supports the evaluation of JSPs and exploded WARs within a web project with support for preview of JSPs by the Virtual Server.
You could upload archived WARs, have Alfresco deploy them to a web application server for unpacking, and so on. For Tomcat, it could place them in the webapps
directory.
Create a simple "hello world" JSP, load it up, and test. The JSP will evaluate without creating the WEB-INF
and web.xml
files. But more complex WARs will need WEB-INF
and web.xml
files for Tomcat to evaluate.
For JSP and Java code that use the getRealPath()
method or the filesystem path for a file, Alfresco requires additional configuration for the virtual server preview to function. This is the case for Spring-based web applications, where configuration and properties files are required to be read on startup.
To enable preview in this case, Alfresco needs to be modified to:
The virtual server needs to be configured to mount the new drive. Follow these steps:
alfresco-virtserver.properties
file in the directory:c:Alfrescovirtualtomcatconf.
# # On Windows, the ".unix" properties are ignored. # On Linux, the ".win" properties are ignored. # alfresco.virtserver.cifs.avm.versiontree.win=v alfresco.virtserver.cifs.avm.versiontree.unix=/media/alfresco/cifs/v
alfresco.virtserver.cifs.avm.versiontree.win=v
to use the drive letter "Z" used above when mapping to the CIFS server, as follows:alfresco.virtserver.cifs.avm.versiontree.win=z:.