Skip to content

Commit

Permalink
Merge pull request #326 from wagnert/master
Browse files Browse the repository at this point in the history
Refactor README.md for new servlet manager configuration in context.xml
  • Loading branch information
wagnert committed Dec 16, 2014
2 parents 89e9af6 + bf3e314 commit 806c443
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Bugfixes

* Query directories under webapps for WEB-INF or META-INF to make sure we have a valid application
* Bugfixing invalid servlet init parameter initialization when using @Route annotation on servlets
* Bugfixing for invalid folder check when try to parse folders defined in context.xml for servlets

Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,6 @@ use AppserverIo\Psr\Servlet\ServletConfig;
use AppserverIo\Psr\Servlet\Http\HttpServlet;
use AppserverIo\Psr\Servlet\Http\HttpServletRequest;
use AppserverIo\Psr\Servlet\Http\HttpServletResponse;
use AppserverIo\MessageQueueClient\MessageQueue;
use AppserverIo\MessageQueueClient\QueueConnectionFactory;
use AppserverIo\Psr\MessageQueueProtocol\Utils\PriorityMedium;
use AppserverIo\Psr\MessageQueueProtocol\Messages\StringMessage;

/**
Expand Down Expand Up @@ -1067,7 +1064,7 @@ class HelloWorldServlet extends HttpServlet
> To make it easy, we can use the `@Resource` annotation to let the container inject a sender
> instance we can use to send the name of the file containing the data to the `Queue`.
# Timer Service
# Timer-Service

In most of your projects you have the need to schedule things to be processed in regular intervals
or at a given date in future. As PHP itself is a scripting language it lacks of such functionality
Expand Down Expand Up @@ -1607,7 +1604,12 @@ in `/opt/appserver/etc/appserver/conf.d/context.xml`
name="ServletManager"
beanInterface="ServletContext"
type="AppserverIo\Appserver\ServletEngine\ServletManager"
factory="AppserverIo\Appserver\ServletEngine\ServletManagerFactory"/>
factory="AppserverIo\Appserver\ServletEngine\ServletManagerFactory">
<directories>
<directory enforced="true">/WEB-INF/classes</directory>
<directory enforced="true">/vendor/appserver-io/routlt/src</directory>
</directories>
</manager>

<!-- provides functionality to handle HTTP sessions -->
<manager
Expand Down
19 changes: 18 additions & 1 deletion src/AppserverIo/Appserver/Core/GenericDeployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ public function deploy(ContainerInterface $container)
// gather all the deployed web applications
foreach (new \FilesystemIterator($container->getAppBase()) as $folder) {

if ($folder->isDir()) { // check if we've a directory (possible application)
// declare META-INF and WEB-INF directory
$webInfDir = $folder . DIRECTORY_SEPARATOR . 'WEB-INF';
$metaInfDir = $folder . DIRECTORY_SEPARATOR . 'META-INF';

// check if we've a directory containing a valid application,
// at least a WEB-INF or META-INF folder has to be available
if ($folder->isDir() && (is_dir($webInfDir) || is_dir($metaInfDir))) {

// this IS the unique application name
$applicationName = $folder->getBasename();
Expand Down Expand Up @@ -137,6 +143,17 @@ public function deploy(ContainerInterface $container)

// add the application to the container
$container->addApplication($application);

} elseif ($folder->isDir()) { // if we found a directory

// write a log message, that the folder doesn't contain a valid application
$this->getInitialContext()->getSystemLogger()->info(
sprintf('Directory %s doesn\'t contain a valid application, so we ignore it!', $folder)
);

} else { // if we found a file only

// do nothing here, because we only found a file
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/AppserverIo/Appserver/Meta/Composer/Script/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public static function prepareProperties($os, array $contextProperties)
Setup::$mergedProperties[SetupKeys::OS_IDENTIFIER] = sprintf(
'%s_%s_%s',
str_replace(' ', '-', strtolower(Setup::$mergedProperties[SetupKeys::RELEASE_NAME])),
Setup::$mergedProperties[SetupKeys::OS_FAMILY],
$os,
Setup::$mergedProperties[SetupKeys::OS_ARCHITECTURE]
);

Expand Down
Binary file modified webapps/welcome-page/logo_iron-horse_centOS_x86_64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webapps/welcome-page/logo_iron-horse_darwin_x86_64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webapps/welcome-page/logo_iron-horse_debian_x86_64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webapps/welcome-page/logo_iron-horse_fedora_x86_64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webapps/welcome-page/logo_iron-horse_redhat_x86_64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webapps/welcome-page/logo_iron-horse_ubuntu_x86_64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webapps/welcome-page/logo_iron-horse_windows_x86.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 806c443

Please sign in to comment.