About
This website is part of the course websoft: Course Website.
This is an webcourse which we leanrs how to program to the WWW
This website is part of my forked CourseRepo: Github.
This website is part of the course websoft: Course Website.
This is an webcourse which we leanrs how to program to the WWW
This website is part of my forked CourseRepo: Github.


A Walking Tour of the Struts Example Application
This article is meant to introduce a new user to Struts by "walking through" the example application. See the Struts Users Guide and Strut's API for more documentation.
This article is based on the working 1.0 builds of Struts. It is assumed that the reader has already installed a developer's copy of Struts and the example application (following the instructions in the Struts readme), and is ready to explore the example on their own development workstation (e.g. localhost).
This article also assumes the reader has a basic understanding of the Java language, JavaBeans, Web applications and JavaServer Pages. For background on these topics, see the various Sun Javasoft product sites.
The standard Struts package comes with four applications: struts-test, struts-documentation, struts-template, and struts-example. Regarding struts-example, the readme tells us that:
"This example is the beginnings of a portal application that would allow users to register themselves, and maintain a set of subscriptions they own to mail servers elsewhere on the Internet. When completed, this application will provide the ability to read mail from various mail servers, through the application."
The example is still incomplete, but still a very useful introduction to Struts. For more about installing Struts and the example application, see the Struts readme.
index.jsp
Once installed, the example application is entered through a standard welcome page, index.jsp. This page offers two links, one to register with the application and one to login in (if you have already registered).
Behind the scenes, index.jsp also checks for the existence of a database servlet and message resource. Both of these objects are referenced in the application's web.xml, and should be loaded before the index.jsp displays. If they are absent for any reason, index.jsp displays an error message.
Note that the error messages are hardcoded into the welcome page; this way they can be displayed even if the message resource is missing. In other pages, a message resource is used to lookup and display messages, based on the user's locale.
web.xml and ApplicationResources.properties
If you check the application's web.xml, you will see how these objects are loaded. The message resource is loaded by the application parameter to the ActionServlet. When the ActionServlet initializes, it parses the ApplicationResources.properties in the package folder into the default message resource. If you change a message in the resource, and then reload the application, it will appear throughout the application.
You can even reload the configuration and message resources without restarting the container. See the end of the web.xml file for details.
DatabaseServlet.java
The database object has it's own initialization block. The database servlet stores the database contents as a XML file, which is parsed by the Struts digester and loaded as a set of nested hashtables. The outer table is the list of user objects, each of which has its own inner hashtable of subscriptions. When you register, a user object is stored in this hashtable ... and when you login, the user object is stored within the session context.
If you want to follow along (and you should!), the package source can be found under the src/example folder in your jakarta-struts folder.
In the Example application, the database is seeded with a sample user. If you check the database.xml file, you'll see the sample user described as:
<user username="user" password="pass" fullName="John Q. User"<EMAIL_ADDRESS><subscription autoConnect="false" host="mail.hotmail.com" type="pop3" username="user1234" password="bar" />
</user>This creates a registration record for "John Q. User", with the detail for his hotmail subscription.
In the source to the database servlet, you should notice that the attribute name for the servlet is read from the package's constant file. This is a good way to be sure a name or other string value is uniform between source files.
index.jsp 2
Back in the index.jsp, we can find several good uses of Struts custom tags. Two worth noting now are the base and the link tags. The base tag returns the current URL to the page, to be sure other relative hyperlinks on the page work properly. The link tag renders another important service. Besides being a quick way to write a hyperlink, it will also URL encode the hyperlink to maintain the client's session -- if the current client can't store the session as a cookie.
 (If you are using Internet Explorer and try this, be sure you reset cookies for the appropriate security zone, and that you disallow "per-session" cookies.)
In just a simple welcome page, Struts has done quite a bit already:
- Confirmed that required objects were created during initialization.
- Written all the page headings and labels from an internationalized message resource.
- Automatically rendered a current base tag for the page.
- Automatically URL-encoded hyperlinks as needed.
At the top of the index.jsp page, you may also note several directives that load the tag libraries. These are just the usual red tape that goes with any Java source file.
logon.jsp
Next, if you choose the log on link, the container loads the logon.jsp file. You can use the default username and password (user:pass) to login. (Note that both the username and password are case sensitive.) Better yet, try omitting or misspelling the login in various combinations and see how the application reacts.
If you do this, Struts will return you to the same JSP, but with three major differences:
- The page address is now logon.do rather than login.jsp.
- Struts will display a validation-error above the logon form.
- Whatever username you entered before is defaulted on the form.
Pretty cool, but how does it work?
struts-config.xml and LogonForm.java
First, the logon.jsp makes use of the custom-tag "form". This tag can scan the application's properties for a form bean related to the path /logon.jsp (from the link on the welcome page). In this case, Struts finds one, and then checks for an instance of this particular form bean. Not finding one, Struts creates a new form bean. When the form is submitted, Struts grabs the form fields from the HTTP request, and updates the waiting bean.
To enable all this, you can simply
- define a class for the form bean in your package (the form fields with setters and getters),
- add the bean class to your application's configuration resource, and
- link the bean class to your action mapping by their name properties (name="logonForm").
In addition to parameters representing standard HTML options, The form tag can also take several handy parameters to add JavaScript features to a form. These include focus, onsubmit, and onreset. There are even parameters for specifying cascading stylesheets.
Struts has tidy mechanisms for validating forms and printing error messages. An action object can add as many messages as needed to a standard Struts collection. The JSP can then print all the messages, and clear the queue, using a single custom tag, <html:errors/>. There can be as many messages as your validation routine cares to post.
Struts labels this mechanism as an error message handler, though your application could use it for other messages too. For example, to post a message than a record was added or deleted.
To get the most out of your form beans, Struts provides a special class, ActionForm, with built-in support for validation and message handling that you can use as the base for your own form beans. Each of your JSP forms will probably have a unique set of fields, and would have their own specific form bean.
LogonAction.java
The initial JSP submits its form to logon.do. If you check the servlet mappings in the example's web.xml you will see that requests for *.do files are directed to the Struts "action" servlet (an instance of ActionServlet). In the example, the ActionServlet refers to struts-config.xml for its own mappings (among other things), which is where we find the reference to logon.do:
<!-- Process a user logon -->
<action
path="/logon"
type="org.apache.struts.webapp.example.LogonAction"
name="logonForm"
scope="request"
input="/logon.jsp"
>
</action>and a form bean to go with the "logonForm" action:
<!-- Logon form bean -->
<form-bean
name="logonForm"
type="org.apache.struts.webapp.example.LogonForm"
/>In the action mapping, the path property tells the ActionServlet to forward a request for logon.do to the LogonAction object. The input property tells the LogonAction object where it can pass control to get information from the user.
Before passing the request to LogonAction, the ActionServlet looks for the LogonForm bean. If it finds it, the ActionServlet updates the bean by matching properties named in the HTTP request with properties named in the form bean. If it doesn't find the bean, ActionServlet creates it, so LogonAction can assume that it already exists.
When called by the ActionServlet, LogonAction retrieves the username and password from the LogonForm bean. (If just created, the bean will return default values.)
In the example, LogonAction then checks with the DatabaseServlet to see if the logon matches a registered user. If the logon doesn't match, LogonAction adds a message key to an error list. At the end of the routine, if the error list is not empty, LogonAction adds a User bean to the session context, and forwards control to its input form (login.jsp).
Note that direct access to the DatabaseServlet should really be handled by a business-logic bean, and NOT by LogonAction. To quote the example's author "This should be considered a bug in the example."
If there are no errors, LogonAction places a user bean into the session context (replacing any prior user bean), and forwards control to the "success" action. Where that control actually goes is determined by the mappings in struts-config.xml.
Before returning from a successful login, LogonAction also disposes of the LogonForm bean. This way, if the user returns to the index.jsp form later, it will be a clean form without the (old) login already entered. Note that LogonAction first checks to see if the scope has been set to "request", and then removes the bean from the request context, or otherwise from the default session context.
The Struts best practice is to use request scope for single-page forms that contain all of your relevant properties, because there is no need to maintain such form beans across requests.
Note that the example removes the LogonForm bean regardless of scope. This is for backward compatibility with earlier configurations. In your application, you should follow the advice of the configuration, and remove it only if the scope is set to "request". This way, the behavior can be changed just by editing struts-config.xml and reloading the application.
Go ahead and login successfully now, using the default username and password (user and pass).
struts-config.xml 2
As mentioned, on a successful login, LogonAction forwards control to the "success" action, and where control actually goes is determined by the mappings in struts-config.xml. But if you check the mappings for LogonAction, you'll find this block
<!-- Process a user logon -->
<action
path="/logon"
type="com.husted.struts.example2.LogonAction"
name="logonForm"
scope="request"
input="/logon.jsp">
</action>Huh!? Where's the success mapping? If you dig around, you'll also find
<!-- Global Forward Definitions -->
<global-forwards>
<forward
name="logon"
path="/logon.jsp"
/>
<forward
name="success"
path="/mainMenu.jsp"
/>
</global-forwards>Which says, if somebody says forward to "success", and doesn't have a local forward for "success", then forward using the path "/mainMenu.jsp". (Ditto for forward to "logon", but forward to "/logon.jsp".)
And which is why you should be now be staring at the result of the mainMenu.jsp now, offering the choices
- Edit your user registration profile
- Log off MailReader Demonstration Application
If you check the page path shown by your browser, you will see that it shows "logon.do" not "mainMenu.jsp". This is because the page was loaded as the ultimate result of the logon.do request, so for all the browser knows, that's where you are. This is why the base custom tag is important. If your page included relative links to images, your browser would be trying to make them based on the path to "logon.do". So the Struts base tag saves the day by telling the browser to resolve relative links based on the path to the file Struts returned, rather than on the "file" the browser requested.
If you have a sharp eye, you also may have noticed that logon.do is not followed by any parameters from the login form (logon.do?username=user). The default method for a from created with the Struts form tag is POST, which does not append form parameters to the request path, as GET does. This is the opposite of the HTML form tag, which uses GET by default.
mainMenu.jsp
If you check the source for mainMenu.jsp, you will find some interesting new tags. The first is app:checkLogon. This is not a standard Struts custom tag, but one designed for the Example application. The directive at the top of the file tells us that the app tags are defined in app.tld. Tracing through app.tld, we find that source for this tag is (surprise!) CheckLogonTag.
CheckLoginTag.java
This is an excellent example of using custom tags to encapsulate application logic. CheckLoginTag.java looks to see if the user is logged in by checking for an object named "User" in the session context. If not, control is forwarded to "/login.jsp". So, whenever you want to be sure someone is logged in before they access a page, just put "<app:checkLogon/>" at the top of the JSP.
If you take a good look at the CheckLoginTag source, you will probably see a quick and easy way the code could be made easier to maintain.
Hint: 'Consistency is Key'.
You may not have noticed, but the heading on the mainMenu page is customized for the current user. If I were to create a new login for myself and come back to the mainMenu page, instead of saying "Main Menu Options for user" it would say "Main Menu Options for thusted". In doing this, the mainMenu.jsp demonstrates using regular jsp:bean tags alongside Struts custom tags. (No worries mate!) It simply uses a standard jsp:useBean jsp:getProperty tags to snag your username from the User bean and display it in the HTML heading.
Unfortunately, some of the application's model is exposed by this page view. Struts goes a long way toward minimizing this sort of thing, but in some cases it is unavoidable.
The other links we've seen have either gone directly to a JSP file, or to a Struts action path, like login.do. The "Edit your user registration profile" link is a little different, since it also uses a parameter, as in editRegistration.do?action=Edit. When the Struts ActionServlet processes this link, it will ignore the parameter for the purpose of matching the request, but still pass the parameter along to action's object.
This means that in Struts, an action object must be able to handle every valid parameter for it's base path. (In the Example, editRegistration must handle both Edit and Create.)
You may want to check for invalid parameters too. (And be careful of differences in case if your comparisons are not case insensitive!)
If you check the struts-config.xml, you'll see that the editRegistration action is mapped to the (surprise again!), the EditRegistrationAction; it uses a registrationForm bean, and registration.jsp for input.
<!-- Registration form bean -->
<form-bean name="registrationForm"
type="org.apache.struts.webapp.example.RegistrationForm"/>
<!-- Edit user registration -->
<action path="/editRegistration"
type="org.apache.struts.webapp.example.EditRegistrationAction"
name="registrationForm"
scope="request"
validate="false"
input="/registration.jsp">
<forward name="success" path="/registration.jsp"/>
</action>Hint: Consistent naming conventions, like the ones used throughout the Example, make applications much easier to write and understand. Save your creativity for the things that matter, and follow an established standard for source code formatting, like the Elements of Java Style.
EditRegistrationAction.java
Many objects in an application may do double-duty. For example, EditRegistrationAction not only lets you update a registration, but is also used to create a new one. Which task the object performs is determined by the action passed to it. In the case of EditRegistrationAction, it can either edit or create a registration, the default being create if a task is not specified. To select between tasks, simply add ?create or ?edit to the hyperlink or form action.
Like most classes in the example application, editRegistration makes good use of the log to track it's progress. Note that ActionServlet has had a new log method added since the Example was written. You can now specify both the message and a minimum logging (or debug) level. For more, see the Javadoc in your struts-documentation application.
registration.jsp and RegistrationForm.java
If you follow the "Edit your user registration profile" link from the mainMenu, we will finally reach the heart of the Example application, the registration page. This page displays everything the Example application knows about you (or at least your login), while demonstrating several interesting techniques.
You'll remember that mainMenu.jsp wanted to be sure that everyone was logged in, and used the CheckLogin tag to enforce that. The registration.jsp is a little different. First it uses a Struts logic tag to see if the task at hand is to register a new User. If not (e.g. action != "Create"), the logic tag exposes a CheckLoginTag to be sure we have a user (and therefore a registration) to edit.
<logic:equal
name="registrationForm"
property="action"
scope="request"
value="Edit"
>
<app:checkLogon/>
</logic:equal>Note that the Struts html:form tag will refer to properties set by struts-config.xml and automatically create a registrationForm bean if one is not present. However, that does not happen until the form tag is processed within the page. Since this block appears before the html:form tag, a runtime error is exposed if you try to access registration.jsp directly (rather then going through the editRegistration.do action).
registation.jsp continues to use logic tags throughout the page so that a single JSP can be used to perform more than one task. For example, if you are editing the form (action == "Edit"), the page inserts your username from the registrationForm bean. If you are new user (action == "Create"), the page creates an empty field, so you can pick your username.
The Struts logic tags are a very convenient way to express application logic within your pages. This prevents user error and reduces the number of JSPs your application needs to maintain, among other benefits.
The page also uses logic tags to display a list of subscriptions for the given user. If the user enters this page with an edit action in the request context, the lower part of the page listing the subscriptions is exposed by this logic tag:
<logic:equal
name="registrationForm"
property="action"
scope="request"
value="Edit"
>Otherwise, the page just contains the top portion -- a blank data-entry form for creating the user's registration.
logic:iterate
Beside making the usual conditional tests, you can also use logic tags to forward control to other actions, to redirect control to another path, and to iterate over collections. The registration page includes a good example of using the logic:iterate tag to display the user's subscriptions.
The subscriptions are stored in a hashtable object, which is in turn stored in the user object. So to display each subscription, we have to reach into the user object, and loop through the members of the subscription collection. Using the iterate tag, this couldn't be easier.
<logic:iterate name="user" property="subscriptions" id="subscription">
<!-- block to repeat -->
</logic:iterate>The three parameters to the iterate tag ( name, property, and id) tell it to
- Check this context for an attribute (e.g. object) named "user",
- Snag the property of user named "subscriptions",
- In the block to iterate, use "subscription" (singular) as the name for each member of the collection.
So, to list the host for each subscription in a HTML unordered list, we could write:
<ul>
<logic:iterate name="user" property="subscriptions" id="subscription">
<li>
<bean:write name="subscription" property="host" filter="true" />
</li>
</logic:iterate>
</ul>This is another good example of how Struts works with the standard JSP tags, like bean. The filter option says to use convert HTML commands to their character entity. So a < would be output in the HTML as <.
In registration.jsp, iterate is used to create a menu of subscriptions, each linked with an edit and delete action.
<logic:iterate id="subscription" name="user" property="subscriptions">
<tr>
<td align="left">
<bean:write name="subscription" property="host" filter="true"/>
</td>
<td align="left">
<bean:write name="subscription" property="username" filter="true"/>
</td>
<td align="center">
<bean:write name="subscription" property="type" filter="true"/>
</td>
<td align="center">
<bean:write name="subscription" property="autoConnect"/>
</td>
<td align="center">
<app:linkSubscription page="/editSubscription.do?action=Delete">
<bean:message key="registration.deleteSubscription"/>
</app:linkSubscription>
<app:linkSubscription page="/editSubscription.do?action=Edit">
<bean:message key="registration.editSubscription"/>
</app:linkSubscription>
</td>
</tr>
</logic:iterate>The collection in an iterate tag can be any of the following: an array of objects, an Iterator, a Collection (which includes Lists, Sets and Vectors), or a Map (which includes Hashtables) whose elements will be iterated over.
You'll note that the hyperlinks to the edit and delete action for each subscription are written with another custom tag, app:linkSubscription. Writing a hyperlink to an action is not difficult, but it can be ugly, and makes an excellent case for encapsulation. If you trace through the app.tld, you will find that the source code for the linkSubscription tag lives in (come on, take a guess) LinkSubscriptionTag.java.
LinkSubscriptionTag.java
The Example application uses a subscription's host name (e.g. yahoo.com) as a primary key, which means you can only have one subscription for each host. It also means that to edit a subscription, all you need to know is the user and host. In fact, the editSubscription action is designed to create, edit, or delete a subscription if provided a user and host names in the request. The goal of LinkSubscriptionTag is then to output a block like:
<A HREF=[path]editSubscription.do?action=[action]&username=[user]&host=[host]">[action]
</A>based on input block like:
<app:linkSubscription
page="/editSubscription.do?action=Delete">Delete
</app:linkSubscription>To reduce overhead, LinkSubscriptionTag uses "subscription" as the default name (which the iterator refers to as "ID"), so that can be omitted from the tag properties. The "action" portion of the will differ, and so that is given as the page property to the tag
Here are a few annotated highlights from LinkSubscriptionTag.java:
- Create a string buffer, and ask the request for the relative path to the application
StringBuffer url = new StringBuffer(request.getContextPath());
- Snag a reference to the subscription bean (for this iteration)
subscription = (Subscription) pageContext.findAttribute(name);
- Append the username and host from the bean to the path request.
url.append("&username="); url.append(BeanUtils.filter(subscription.getUser().getUsername()));
url.append("&host=");
url.append(BeanUtils.filter(subscription.getHost()));These are the essentials, but be sure to see the full source in LinkSubscriptionTag.java for the rest of the error and logic checking that a working application needs to succeed.
Meanwhile, back on registration.jsp, there is one more link on the page. This uses yet another custom tag, the app:linkUser tag.
<app:linkUser page="/editSubscription.do?action=Create">
<bean:message key="registration.addSubscription"/>
</app:linkUser>By this time, you must be ready to flip directly to LinkUserTag.java with nary a glance at the configuration file ...
LinkUserTag.java
Since they solve the same general problem, LinkUserTag and LinkSubscriptionTag are quite a bit a like, except that LinkUserTag grabs the user bean from the session context, instead of a subscription bean from the iteration. Like the LinkSubscriptionTag, the name for the user bean (e.g. "user") is defaulted, and can be omitted from the tag; all that's needed is the page property -- the rest is automatic!
<app:linkUser page="/editSubscription.do?action=Create">
<bean:message key="registration.addSubscription"/>
</app:linkUser>When rendered, this displays a HTML hypertext link like:
<a href="/struts-example/editSubscription.do?action=Create&username=user">
Add
</a>Note that anchor links with ampersands should use the character entity & as the LinkUserTag has done here (http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2).
Let's follow that "Add" link now and see what's up with the editSubcription action anyway.
EditSubscriptionAction.java
Predictably, we find a some now-familiar mappings in struts-config.xml
<!-- Subscription form bean -->
<form-bean
name="subscriptionForm"
type="org.apache.struts.webapp.example.SubscriptionForm"
/>
<!-- Edit mail subscription -->
<action path="/editSubscription"
type="org.apache.struts.webapp.example.EditSubscriptionAction"
name="subscriptionForm"
scope="request"
validate="false"
>
<forward name="failure" path="/mainMenu.jsp"/>
<forward name="success" path="/subscription.jsp"/>
</action>When we've introduced these type of mappings before, and mentioned that the struts-config.xml was parsed when the ActionServlet was initialized. But we should make it clear that when the Struts digester parsed this file, it actually created standard Java objects, linked as properties to the controller. This means you don't have to edit Java source files just to add a bunch of "new" statements. (How cool is that?)
Following what was specified by struts-config.xml, the controller makes sure that a subscriptionForm bean exists, along with the SubscriptionAction object, and then calls the action object's perform method. The perform method first checks to see that the user is logged-in. If not, control is forwarded to the login action. EditSubscriptionAction.perform then either creates a new subscription object (if the task is Create), or searches the user's subscription hashtable for a matching hostname (if the task is Edit).
Finally, EditSubscriptionAction conforms the ActionForm bean with the database bean. There may be several subscriptions in the database, but in EditSubscriptionAction we expose the one selected (or just created) for this request to use. Once the Action form (called "subform" in the code) is created and populated from the database, the bean's action is set to either Create or Edit, and control is forwarded to our "success" form, subscription.jsp .
Note that the servlet only creates one object for each action. Each request is handled as a separate thread, and passed to the single action object instance. This means your action objects must be multi-thread safe.
But before turning to our final JSP, a word about our database model ...
User.java and Subscription.java
If you're used to working with relational databases, the links between the user and subscription objects may be confusing. A conventional relational database would create two distinct tables, one for the users and another for the subscriptions, and link them together with a user ID. The Example application implements a different model, a hierarchical database. Here a "table" of subscriptions is stored within each user object, something like the way a filing system stores documents within folders.
In addition to the usual getters and setters, the user object also has two methods for working with subscription objects. findSubscription takes a hostname and returns the subscription object for that host. getSubscriptions returns an array of all the subscriptions for the user (ready-made for the iterate tag!). Besides the fields needed to manage the SubscriptionForm data, the object also maintains a runtime link to its user object.
To create a new subscription, EditSubscriptionAction.java simply creates a new subscription object, and sets its user to the object found in the request, and then forwards control to its input form, subscription.jsp.
subscription.jsp
Saving the best for last, subscription.jsp demonstrates use of some interesting Struts custom form tags, html:options and html:checkbox.In registration.jsp, the Struts iteration tag was used to write a list of subscriptions. Another place where iterations and collections are handy is the option list for a HTML select tag. Since this is such a common situation, Struts offers a html:options (plural) tag can take an array of objects as a parameter. The tag then iterates over the members of the array (beans) to place each one inside an standard option tag. So given a block like
<html:select property="type">
<html:options
collection="serverTypes"
property="value"
labelProperty="label"
/>
</html:select>Struts outputs a block like
<select name="type">
<option value="imap" selected>IMAP Protocol</option>
<option value="pop3">POP3 Protocol</option>
</select>Here, one collection contained both the labels and the values, from properties of the same name. Options can also use a second array for the labels, if they do not match the values. Options can use a Collection, Iterator, or Map for the source of the list.
For demonstrations purposes, the serverTypes array is created at the top of this page. Usually, the html:options tag would be used to list valid items from a database maintained elsewhere. For example, if the application needed you to select a default subscription, a form might list the subscriptions in an options tag.
The LabelValueBean used to create the demonstration array is also a good example of simple but useful bean object.
A particularly tricky HTML control is the checkbox. A problem with a checkbox is that it is only sent in the request if it is checked. If it is not checked, it is not sent (i.e. null). This can be problematic when trying to validate the form's data after it has been translated to a bean. The autoconnect property for a subscription demonstrates how to handle validation of a checkbox.
SubscriptionForm.java
Struts validation is handled by the reset and validate methods of the ActionForm bean. When creating your own form beans, you should subclass ActionForm, add your own fields and their getters/setters, and implement the reset and validate methods.
Struts calls reset before populating the form, and calls validate after populating it but before the perform method of the action. Reset should assign default values to each of your form fields, usually null. But in the case of checkboxes, the default value should usually be false instead of null.
For more examples of validating forms, take another look at LoginForm.java and RegistrationForm.java.
Back in subscription.jsp, we have one more block to cover. Although the same basic form can be used to created, edit, or delete a subscription, people might expect the buttons to be labeled differently in each case. subscription.jsp accommodates by using a logic tag to output a different set of buttons for each case. This doesn't really change the way subscription.jsp works, but it does make things less confusing for the user.
<logic:equal
name="subscriptionForm"
property="action"
scope="request"
value="Create">
<html:submit>
<bean:message key="button.save"/>
</html:submit>
</logic:equal>In the case of a request to delete a subscription, the submit button is labeled "Confirm", since this view is meant to give the user a last chance to cancel, before sending that task along to SaveSubscriptionAction.java.
The actual action property is placed into the form as a hidden field, and SaveSubscriptionAction checks that property to execute the appropriate task.
SaveSubscriptionAction.java
Our final stop has the job of finishing what EditSubscriptionAction.java and subscription.jsp started. After the usual logic and error checking, SaveSubscriptionAction either deletes or updates the subscription object being handled by this request, and cleans up the bean, just to be tidy. By now, you should be very comfortable reading through the source on your own, to pickup the finer points.
This concludes our tour. To review, you may wish to trace the path a new user takes when they register with the application for the first time You should also read over each of the .java and JSP files carefully, since we only covered the high points here.
Summary
- Struts uses a single controller servlet to route HTTP requests.
- The requests are routed to action objects according to path (or URI).
- Each request is handled as a separate thread
- There is only one object for each action (URI), so your action objects must be multi-thread safe.
- The configuration of action objects are loaded from a XML resource file, rather than hardcoded.
- Action objects can respond to the request, or ask the controller to forward the request to another object or to another page, such as an input form.
- A library of custom tags works with the rest of the framework to enhance use of JavaServer Pages.
- The Struts form tag can work closely with an action objects via a Struts ActionFormBean to retain the state of a data-entry form, and validate the data entered.
- ActionForm beans can be automatically created by the JSP form or controller servlet.
- Struts supports a message resource for loading constants strings. Alternate message resources can be provided to internationalize an application.
-- Ted Husted, 25 December 2000 <<EMAIL_ADDRESS>>.


This section describes in more detail how to use JxLite.
Unmarshalling of XML into Java objects is performed by an instance of the JxLite Unmarshaller interface. An unmarshaller encapsulates the rules for converting an XML element into an instance of a Java interface.
You obtain an unmarshaller by calling the static JxLite.UnmarshallerFor method. This method takes a single parameter, which is the Java interface into which XML data is to be marshalled. E.g.
The type passed to UnmarshallerFor must be an interface. This interface must meet the following conditions:
Once created, you use an unmarshaller by calling its unmarshal method. This takes a single parameter which is either an org.w3c.dom.Element or an org.w3c.dom.Document:
or
By specifying an element rather than a document you can use JxLite to process just the parts of an XML document that are of interest.
The unmarshal method may be called multiple times and is thread-safe.
JxLite allows you to specify - to a limited extent - the number of nodes that an XPath expression may return. Usually this is implicit in a method's return type. If a method returns an array, List<T>, Collection<T> or Iterable<T> then by default it is assumed that the associated XPath expression may return zero or more nodes. (If the expression returns zero nodes then an empty collection of the appropriate type is returned). For any other object type it is assumed that the expression may return zero or one node. If two or more nodes are returned then JxLite throws an exception when trying to unmarshal the document. If the method returns a primitive type (e.g. int) then the expression must return exactly one node. This is summarised in the following table, where N is the number of nodes returned by the XPath expression:
| Return Type | Return Value | ||
|---|---|---|---|
| N = 0 | N = 1 | N > 1 | |
| Array, List<T>, Collection<T> or Iterable<T> | Array, List, Collection or Iterable containing N elements | ||
| Other Object Type | null | Object instance | Throws JxLiteException |
| Primitive Type (e.g. int) | Throws JxLiteException | Primitive value | Throws JxLiteException |
This behaviour can be modified by adding a @Required annotation to a method:
This will cause an exception to be thrown if the XPath expression does not return at least one node.
Any further constraints on the multiplicity of returned values must be coded explicitly. E.g.:
For methods whose return type isn't some sort of collection the 'default default' return value is null. This is the value returned when the associated XPath expression returns no nodes (unless the return type is a primitive type, in which case we can't return null so an exception is thrown instead). The default return value can be changed using one of the following annotations:
E.g.
The examples we've seen so far haven't used XML namespaces. (Or, to be strictly accurate, everything has been in the global namespace). In order for an XPath expression to refer to elements or attributes in other namespaces those namespaces must be associated with a prefix. JxLite provides the @NamespaceList annotation for this.
Consider the following XML:
We can unmarshal documents like this into the following Java interface:
Note that XPath expressions do not support default namespaces. Therefore we have to provide an explicit prefix for the http://jxlite/names namespace even though there is no corresponding prefix in the XML itself.
Previous TOC Next


The Baby Yoda Funko Pop is here and you can pre-order right now
by Tabitha BakerThe Baby Yoda Funko Pop is here and you can pre-order right now
The internet's beloved meme will soon sit at your desk
(Image credit: Future)
The baby Yoda Funko Pop is here to make your days just that little bit cuter, and you can pre-order right now from Walmart. While it doesn't ship until May 2020, you can sleep safe in the knowledge that with each passing moment you're one step closer to having your very own baby Yoda. The Funko Pop comes in two sizes; the standard figure size and an impressive 10" version for true fans of The Mandalorian.
Though it's not actually baby Yoda, the internet has imploded after this tiny little alien started gazing into our souls with those big black eyes on The Mandalorian. The Disney Plus show has stormed its way into meme culture and back again, and the baby Yoda Funko Pop was an inevitable contribution to our lives.
If you can't wait that long, you can take your first steps into a new world of cuteness just by pre-ordering the baby Yoda Funko Pop today for $8. That's the price of the smaller version, but you can also pick up the 10" figure for $29.96.
Still not seen The Mandalorian? Where have you been? You'll have to catch up quick but thankfully we've got all the latest Disney Plus news and prices you could ever need. You can even get started right now with a free trial.
Pre-order your Baby Yoda Funko Pop today
Still need to start The Mandalorian? Get involved with all the Disney Plus subscription information you need to jump straight into the action. Or, simply go back to the roots and watch all the Star Wars movies in order to prepare for the big day you unwrap your very own baby Yoda.


Measure Lion Article Extractor Performance
Body Stats
Number of examined articles:
{{.BodyExamined}}
Number of correct articles:
{{.BodyCorrect}}
Number of incorrect articles:
{{.BodyIncorrect}}
Accuracy:
{{printf "%.2f" .BodyAccuracy}}
Average precision:
{{printf "%.2f" .BodyAveragePrecision}}
Average recall:
{{printf "%.2f" .BodyAverageRecall}}
Precision threshold:
{{printf "%.2f" .BodyPrecisionThreshold}}
Recall threshold:
{{printf "%.2f" .BodyRecallThreshold}}
Body - Incorrect Records
Title Stats
Number of examined articles:
{{.TitleExamined}}
Number of correct articles:
{{.TitleCorrect}}
Number of incorrect articles:
{{.TitleIncorrect}}
Accuracy:
{{printf "%.2f" .TitleAccuracy}}
Title - Incorrect Records
Image Stats
Number of examined articles:
{{.ImageExamined}}
Number of qualified articles:
{{.ImageQualified}}
Number of correct articles:
{{.ImageCorrect}}
Number of incorrect articles:
{{.ImageIncorrect}}
Accuracy:
{{printf "%.2f" .ImageAccuracy}}
Image - Incorrect Records


Write an HTTP server that receives only POST requests and converts incoming POST body characters to upper-case and returns it to the client.
Your server should listen on the port provided by the first argument to your program.
While you're not restricted to using the streaming capabilities of the request
and response
objects, it will be much easier if you do.
There are a number of different packages in npm that you can use to "transform" stream data as it's passing through. For this exercise the through2-map
package offers the simplest API.
through2-map
allows you to create a transform stream using only a single function that takes a chunk of data and returns a chunk of data. It's designed to work much like Array#map()
but for streams:
var map = require('through2-map')
inStream.pipe(map(function (chunk) {
return chunk.toString().split('').reverse().join('')
})).pipe(outStream)
In the above example, the incoming data from inStream
is converted to a String (if it isn't already), the characters are reversed and the result is passed through to outStream
. So we've made a chunk character reverser! Remember though that the chunk size is determined up-stream and you have little control over it for incoming data.
To install through2-map
type:
$ npm install through2-map
If you don't have an Internet connection, simply make a node_modules
directory and copy the entire directory for the module you want to use from inside the learnyounode installation directory:
Documentation for through2-map has been installed along with learnyounode on your system and you can read them by pointing your browser here:


Technical Platform
Engineering details
Choices
-
Cloud
- we are deploying the product on RCMP’s Microsoft Azure AKS. The service can also be deployed on Google GKE or Amazon EKS.
-
JavaScript
- JavaScript is a programming language that web browsers use to build web pages.
-
React
- React is a JavaScript library created by Facebook.
- It contains resources and tools for building fast, robust, and network sensitive web applications.
-
GraphQL API
- GraphQL is the interface between the web app and the databases
-
Microservices
- Microservices are a software architectural style that structures an application as a collection of separate services.
-
Kubernetes
- Kubernetes is an open-source platform for running microservices together.
Gains from these choices
-
Security
- Using GraphQL allows us to prevent attackers are not able to use data to hack the database (for example, by using a SQL injection attack).
- Using Kubernetes makes it easy to harden the service against attacks by enforcing a single entrypoint into the service.
-
Code maintainability
- A central tenent of React is the practice of writing your web application in separate blocks called components. This entails grouping together all the code and styling needed to create a UI element (for example, the phase banner).
- This makes it easy to understand and test this part of the code on its own, and also makes it easy to reuse this code at multiple locations.
- following a microservice approach allows us to break the overall service into pieces that are highly maintainable and testable, loosely coupled, and independently deployable.
-
System visibility
- Kubernetes makes it easy to centralize logging and get a view into how well the system is running.
-
System reliability
- Using React and GraphQL allows us to minimize the amount of network traffic required to use the application.
- The reliability guarentees from Microsoft together with Kubernetes’ robust architecture gives us confidence that the system will have high availability.
-
Accessibility
- Building our application out of React components has allowed us to ensure and test for basic accessibility requirements from the start of the project (for example, keyboard navigation and screen reader usage) and to work towards at least WCAG 2.1AA conformance.
-
Bilingualism
- We have used a React library called
lingui
to make the application bilingual from the start of the project. - This allows us to test and refine the experience in French as easily as we can that in English.
- We have used a React library called
Stack/Architecture diagram
DevOps
We use GitOps. That essentially means GitHub is our “single source of truth” for our application.
When a dev makes a pull request to github and that PR is approved and merged, this triggers the pipeline (a .yaml file) in Azure. The pipeline runs a series of npm commands (lints the code, checks translations, compiles), builds a container of the respective repo area and pushes the container(s) to ACR (Azure Container Registry). We then have a program called Flux running in our AKS (Azure Kubernetes Service) cluster that watches the registry and pulls new images into the cluster.
More detailed Azure DevOps Pipeline doc: Azure Pipeline
User facing gains
-
Trust factors
- An RCMP domain name and the RCMP logo prominently displayed
- Reassuring language used throughout
-
Performance
We performed load testing to determine how the application behaves when multiple users access it simutaneously. We want to ensure that the application will perform well under its expected workload. We perform two load tests, one to test how long it takes users to initially fetch the web app, and the other one to test how long it takes for the user’s data to be submitted to the RCMP server. To do our load testing we used the k6 load testing tool.
Test Users / sec Average user wait fetch web page 100 / second 149 milliseconds submit data 120 / second 55 milliseconds See the frontend or api utilities for more details.
Is 100 users/second enough?
- According to CAFC’s recording, they received more than 150,000 calls from around the world every year and receives approximately 1,200 e‑mails every day about suspected fraud[1].
- Testing workload: 100x60x60x24x365=3,090,528,000 (numbers/annual)
- Report fraud number: 150,000+1200x365= 588,000 (numbers/annual)
- 3,090,528,000/588,000= 5,256 times
Since testing workload is 5,256 times more than currently actually report fraud number, this implies the application will behave well when multiple users access it simutaneously.
- What did we do to achieve an app that is this fast?
- We use google cloud and Azure kubernetes, which two main factors make the app run much faster than the traditional app.
- Vulnerability Scanning?
Security Implications
- Things we have done to make it more secure.


Toggle navigation
GOOD CARS
About
Services
Contact
Search a Car
Select Car Type:
Convertible
Crossover
Luxury
Hybrids
Minivan
Pickup Truck
SUV
Sports Car
Wagon
Coupe
Sedan
Select Lowest Year:
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
Select MPG:
< 10
10-20
20-30
30-40
40+
Select Features:
3rd Rear Seat
4WD/AWD
Automatic Transmission
Auxiliary Audio Input
Blu-ray Video System
Cruise Control
DVD Video System
Front Seat Heaters
Leather Seats
Manual Transmission
Navigation System
Rear View Camera
Remote Start
Smart Key
Sunroof(s)
Tow Hitch
Select Cost Range:
1000-2000
2000-3000
3000-4000
+5000


Experience World-Class Healthcare Services.
Today, the medical field is witnessing a host of multi-specialty hospitals mushrooming all over the country. In the windfall of the various state-of-the-art hospitals, personalized care often takes a disappointing backseat. This is where R.k Hospital comes into the picture making a much needed difference.


Impact - Ani Hakobyan
How have I impacted others?
How have I impacted the achievement of my team’s objectives?
How have I impacted the achievement of the organization’s objectives?
Summary of performance and potential
- the behaviours you demonstrated whilst performing your role
- the overall achievement of your objectives
- areas of strength and development needs
- potential for continued growth and contribution to your organization


There’s the new cool world of project management - agile, scrumbling, cool. There’s the old sluggish way of project management using stuff like gantt diagrams. Let’s stick to the old world and come up with a gantt diagram.
The gant diagram itself is no big deal. Just some horizontal lines referring to dates. Somewhat more interesting is to populate a raw data frame in a way that allows for convenient plotting.
Say we start with a basic dataframe (from a CSV file) that contains the following columns:
library(tidyverse)
## Warning: package 'dplyr' was built under R version 3.5.1
gant_data_raw <- read_csv2("https://data-se.netlify.com/download/gantt.txt")
head(gant_data_raw)
## # A tibble: 6 x 6
## Section Task Previous_Event Status Start_Date Duration
## <chr> <chr> <chr> <chr> <date> <int>
## 1 Inhalte Neue Inhalte ent… <NA> open 2019-03-01 6
## 2 Inhalte Inhalte weiteren… Neue Inhalte entwi… open NA 6
## 3 Inhalte Anpassungen Inhalte weiterentw… open NA 3
## 4 Apps Apps konzipieren Anpassungen open NA 3
## 5 Apps Apps programmier… Apps konzipieren open NA 3
## 6 Apps Feedback-Tools k… Apps programmieren open NA 3
Of importance are only Task, Previous_Evnet and Duration. In addition, we need an overall start date (“2019-03-01” in this case). Each subsequent task is assumed to follow neatly its predecessing event.
Our job is to compute the start date and end date of task given that we know the initial start date and the durations. As said, this procedure is based on the assumption that there is a frictionless and gapless sequence of tasks.
Consider this function to populate the data:
library(lubridate)
##
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
##
## date
prepare_gant_data <- function(gantdf = gantdf){
# Given one intial project start date and the tasks duratations,
# this function computes the start and end dates of each task
# input: raw data (csv)
# output: populated/prepared gantt data suitable for plotting
# add some more columns to the data frame
gantdf$End_Date <- parse_date("")
gantdf$ID <- 1:nrow(gantdf)
# initialize the data population: Compute first end date
gantdf$End_Date[1] <- gantdf$Start_Date[1] + months(gantdf$Duration[1])
# now start loop for each successive element
for (i in 2:(nrow(gantdf))) {
# for each task, we need to find its start date
# the start date is the *end date* of the event defined as its "ancestor"
# in other words, the start date is the end date of the respective "previous_event"
previous_event <- gantdf$Previous_Event[i]
previous_event_pos_vec <- match(gantdf$Task, previous_event)
NonNAindex <- which(!is.na(previous_event_pos_vec))
previous_event_pos <- min(NonNAindex)
gantdf$Start_Date[i] <- gantdf$End_Date[previous_event_pos]
gantdf$End_Date[i] <- gantdf$Start_Date[i] + months(gantdf$Duration[i])
}
return(gantdf)
}
Run it:
gantdf <- prepare_gant_data(gantdf = gant_data_raw)
That’s the workhorse.
Now let’s plot. Before that, it comes handy to compute some comfort variables:
project_start <- gantdf$Start_Date[1]
project_end <- max(gantdf$End_Date)
project_duration <- interval(project_start, project_end)
project_duration_months <- project_duration %/% months(1)
## Note: method with signature 'Timespan#Timespan' chosen for function '%/%',
## target signature 'Interval#Period'.
## "Interval#ANY", "ANY#Period" would also be valid
Here’s the actual plot:
my_breaks = seq(as.Date(project_start), as.Date(project_start+years(3)), by="1 year")
gantdf %>%
#mutate(Task = factor(Task)) %>%
ggplot() +
aes(y = reorder(Task, -ID), yend = reorder(Task, -ID),
x = Start_Date, xend = End_Date,
color = factor(Section)) +
geom_segment(size = 3) +
theme_bw() +
scale_x_date(date_labels = "%Y-%m", breaks = my_breaks, limits = c(project_start, project_start+years(3)) ) +
labs(caption = paste0("Dauer [Monate]: ", project_duration_months),
x = "Zeit",
y = "Arbeitspakete",
color = "") +
theme(legend.position = "bottom")
Note that the data population (prepare gantt data) funtion assumes that a previous task does happen earlier in time. That’s because the data frame is populated row by row. We cannot access a later row because the start and end dates would still be empty.


Project name: Routes App
Big Idea: A travel app that will allow users to get to their desired destination while discovering additional locations along the related to their chosen interests. Select what kind of service your looking for, and let your journey begin!
Company: Routes
Project Timeframe: May – June 2018
Responsibilities: Research, Branding, Prototyping, & Testing
Platforms: Mobile Application
Design Tools: Figma, InVisionApp,
UX Methods Used:
Competitive Analysis, Style Tiles, User flows, Wireframes, Rapid Prototyping
Team Members: Brent Schneider, Kimberly Radford, and Abby Brown
Have any questions? You may contact me via my email address<EMAIL_ADDRESS>or find me on Twitter and LinkedIn, where I'd be happy to answer any questions.


Honeybees are important to human life.
They pollinate crops and produce several items:
honey, propolis, royal jelly, and wax.
Approximately 80% of the earth’s food chain is tied to the honeybees’
pollination efforts.
Health products and medicines are made from what honeybees’ produce.
Cotton, pollinated by bees, is used for clothing, home furnishings, etc.
Cattle and livestock depend on alfalfa and oats, which are pollinated by
honeybees. Honeybees contribute positively to the economic health of a society.
Pollination reduces food-scarcity and increases GDP (gross domestic product).


Public Member Functions | |
| SmartMenuItem (String text, Bitmap icon) | |
| void | setText (String text) |
| String | getText () |
| void | setIcon (Bitmap icon) |
| Bitmap | getIcon () |
| int | getX () |
| int | getY () |
| boolean | onItemSelected () |
Protected Member Functions | |
| void | setPosition (int x, int y) |
| void | setX (int mX) |
| void | setY (int mY) |
Private Attributes | |
| String | mText |
| Bitmap | mIcon |
| int | mX = 0 |
| int | mY = 0 |
Definition at line 655 of file SmartMenuOverlayView.java.
| com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.SmartMenuItem | ( | String | text, | |
| Bitmap | icon | |||
| ) |
| text | Text displayed | |
| icon | Bitmap displayed into the circle |
Definition at line 665 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mText, and com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setIcon().
| Bitmap com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getIcon | ( | ) |
Definition at line 694 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mIcon.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuCircleView.drawBranch().
| String com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getText | ( | ) |
Definition at line 680 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mText.
| int com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getX | ( | ) |
Definition at line 717 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mX.
| int com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getY | ( | ) |
Definition at line 731 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mY.
| boolean com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.onItemSelected | ( | ) |
This method must be overrided to add an action to the item
Definition at line 739 of file SmartMenuOverlayView.java.
| void com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setIcon | ( | Bitmap | icon | ) |
| icon |
Definition at line 687 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mIcon.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.SmartMenuItem().
| void com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setPosition | ( | int | x, | |
| int | y | |||
| ) | [protected] |
| x | ||
| y |
Definition at line 702 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setX(), and com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setY().
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuCircleView.drawBranch().
| void com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setText | ( | String | text | ) |
| text |
Definition at line 673 of file SmartMenuOverlayView.java.
References com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mText.
| void com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setX | ( | int | mX | ) | [protected] |
| mX |
Definition at line 710 of file SmartMenuOverlayView.java.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setPosition().
| void com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setY | ( | int | mY | ) | [protected] |
| mY |
Definition at line 724 of file SmartMenuOverlayView.java.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setPosition().
Bitmap com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mIcon [private] |
Definition at line 657 of file SmartMenuOverlayView.java.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getIcon(), and com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.setIcon().
String com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mText [private] |
int com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mX = 0 [private] |
Definition at line 659 of file SmartMenuOverlayView.java.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getX().
int com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.mY = 0 [private] |
Definition at line 659 of file SmartMenuOverlayView.java.
Referenced by com.uperto.smartmenu.SmartMenuOverlayView.SmartMenuItem.getY().


SRMS
Logout
Classes
Add Class
Manage Class
Students
Add Students
Manage Students
Results
Manage Results
Subjects
Add Subject
Manage Subjects
Register
Admin
Add Result
{% for row in rows %}
{% endfor %}
Add result
Student Name
Roll Number
Student Class
Subject
marks
{% for row in row2 %}
{{row["student_name"]}}
{{row["roll_no"]}}
{{row["student_class_name"]}}
{{ row["subject_name"]}}
{{ row["marks"]}}
{% endfor %}


TABLE OF INTERACTIONS WITH
OMEPRAZOLE
See also: proton pump inhibitors
From the French ANSM drug interactions document of September 2016, p. 168
OMEPRAZOLE RxNorm: 7646 ATC: A02BC01 A02BD05 A02BD01 |
DIGOXIN RxNorm: 3407 ATC: C01AA05 |
Moderate increase of the digoxinemia due to increase of its absorption by the omeprazole |
Precaution for use Clinical monitoring, EKG, and monitoring of the digoxinemia, particularly with an older patient. |
OMEPRAZOLE RxNorm: 7646 ATC: A02BC01 A02BD05 A02BD01 |
TACROLIMUS RxNorm: 42316 ATC: D11AH01 L04AD02 |
Increase of the blood concentrations of the tacrolimus |
Precaution for use Blood concentration dosage of the tacrolimus, testing of the renal function and adjustment of the dosage during the administration of the substances together and after it is stopped. |


An object that represents Omniture media settings.
Properties can be set on the Ti.Omniture.MediaSettings object in two ways:
createMediaSettings
method.createMediaSettings
method.Indicates if segment info should be automatically generated for milestones generated or not. Defaults to false.
Indicates if segment info should be automatically generated for offset milestones or not, the default is false.
The length of the media item in seconds.
The name or ID of the channel.
The name or ID of the media item.
The name of the media player.
The ID of the media player.
A comma-delimited list of intervals (as a percentage) for sending tracking data.
A comma-delimited list of intervals (in seconds) for sending tracking data.
The interval at which tracking data should be sent, the default is 0.
The number of second prior to the end of the media that it should be considered complete, the default is 1.
Indicates if the media item is an ad or not.
The position within the pod where the ad is played.
The CMP or encrypted CPM (prefixed with a "~") for the media item.
The name or ID of the media item that the ad is embedded in.
The position in the primary content the ad was played.


Provide an ontology identifier, especially a "Data representation model" entity, to see it presented as a web form.
Example forms:


#import <NTTextStyleBuilder.h>
Class Methods | |
| (NTTextStyleBuilder *) | + swigCreatePolymorphicInstance:swigOwnCObject: |
A builder class for TextStyle.
| - (NTTextStyle *) buildStyle |
Builds a new instance of the TextStyle object using previously set parameters.
Reimplemented from NTLabelStyleBuilder.
| - (NSString *) getFontName |
Returns the font name for the text label.
| - (int) getFontSize |
Returns the font size for the text label.
| - (NTColor *) getStrokeColor |
Returns the stroke color for the text label.
| - (float) getStrokeWidth |
Returns the stroke width for the text label.
| - (NSString *) getTextField |
Returns the text field variable. If not empty, this variable is used to read actual text string from object meta info.
| - (id) init |
Constructs a TextStyleBuilder object with all parameters set to defaults.
Reimplemented from NTLabelStyleBuilder.
| - (void) setFontName: | (NSString*) | fontName |
Sets the font name for the text label.
| fontName | The new platform dependent font name for the text label. |
| - (void) setFontSize: | (int) | size |
Sets the font size for the text label.
| size | The new font size for the text label in points. |
| - (void) setStrokeColor: | (NTColor*) | strokeColor |
Sets the stroke color for the text label.
| strokeColor | The new stroke color for the text label. |
| - (void) setStrokeWidth: | (float) | strokeWidth |
Sets the stroke width for the text label.
| strokeWidth | The new stroke width for the text label in screen density independent pixels. |
| - (void) setTextField: | (NSString*) | field |
Sets the text field variable. If not empty, this variable is used to read actual text string from object meta info.
| field | The text field to use for displaying text from metainfo. |
| + (NTTextStyleBuilder *) swigCreatePolymorphicInstance: | (void*) | cPtr | |
| swigOwnCObject: | (BOOL) | cMemoryOwn | |
Creates a polymorphic instance of the given native object. This is used internally by the SDK.
| cPtr | The native pointer of the instance. |
| cMemoryOwn | The ownership flag. |
Reimplemented from NTLabelStyleBuilder.
| - (NSString *) swigGetClassName |
Returns the actual class name of this object. This is used internally by the SDK.
Reimplemented from NTLabelStyleBuilder.
| - (void *) swigGetDirectorObject |
Returns the pointer to the connected director object. This is used internally by the SDK.
Reimplemented from NTLabelStyleBuilder.


Jonathan Sharman
About
Games
Projects
Research
Disentangle
Four Colors
Unnatural Selection
Hex Snake
Soroban Simulator


Treasure Hunter Gumiel:
Seriously, I don't care which exit, I just want out of here. I NEED out of here. PLEASE.
"Then, follow me."
"OK but wait a moment while I prepare."


Sample text with a Link in it!
Checkout example with boostrap and jQuery to enable a better looking switch here.


groups pass at least one test
Best submissions ordered by the number of teacher tests passed
Best submissions ordered by the number of teacher tests passed and ellapsed time
Best submissions ordered by the number of teacher tests passed and coverage
Links only visible to teachers
|
Group |
Last Submission Date |
Indicators |
|
|
|
|
|
|
|
14/14
|
|
|


Upload and translate a file
Translate this one for me
My URNs
Add to the list
URN list
Click on a urn below to launch the viewer (one-line model)
Download Offline Model
Off-Line svf List
Click on a svf below to launch the viewer (off-line model)


"x" "1" "LATER,DW, PELROY,RA, STEWART,DL, MCFALL,T, BOOTH,GM, LEE,ML,TEDJAMULIA,M AND CASTLE,RN, MICROBIAL MUTAGENICITY OF ISOMERIC TWO-, THREE-, ANDFOUR-RING AMINO POLYCYCLIC AROMATIC HYDROCARBONS, ENVIRON. M __ UTAGEN.6(4):497-515, 1984"


Sorry, but this game runs on JavaScript and requires using a keyboard to enjoy fully.
If you'd like to learn about my experience making Pozo, you can read about it at https://www.ianjmacintosh.com/articles/mistakes-i-made-building-my-first-react-app/.


How with you I long to be
-fade not into other shadows?
Make a dream of life as dream at night
for when I awaken you are not there
Make life a dream so when I wake
I need not dream to have you
dream to lose, to steal, to find
When only I awaken having lost something
some impression which hardly compels me to
Jump up
Wake up
out of bed into cold morning climb
sometimes I race to sleep so that I can deceive myself
Can’t thou see my heart ache
-feel my darkest fear?
what is empathy towards other people cannot touch the
waves across this water that need one single frequency
one amplitude to harmonize them.

Move with me like autumn day light plays and dances with the colors
the enriching of the leaves
So, show me colors
So, pass like seasons and only fortify them
collaborate to signify their happening
so one season follows from another-
when there is no need to look back
no need for sorrow until the last day
For when aligned right, each day happens
only so to be a platform of and for the next step
on a great move forward


65%
of all storage sold is for file-based use cases
per IDC, 2012
commit 0483210d09f291dfef304d620a12f3d22550d56d
Author: bswartz<EMAIL_ADDRESS>Date: Thu Aug 8 07:30:20 2013 -0700
Initial commit
Use Cases
Self-service share management
Replace homegrown systems
Onboard traditional workloads
CI/CD - Clone database shares for parallel testing
Underpin Cinder with Manila created shares?
Key concepts
-
Share (an instance of a shared file system)
- Size
- Protocol (NFS, CIFS, …)
-
Share access rules and security services
- IP, User/SID, Cert based
- Kerberos/Active Directory/LDAP
-
Share Types
- Support for backend driver specific extra specs
-
Snapshots
- Read-only copy
- New writable shares can be created from snapshot
-
Backend
- Provider of shares
- Multiple backend capable
-
Driver
- Vendor or technology-specific implementation
Architecture
-
manila-api
- REST API through WSGI application
-
manila-scheduler
- Makes provisioning decisions for share requests
-
manila-share
- Manager process + one process per backend
- Wraps driver for storage subsystem
Manila is not in the data path
What's new in Kilo
-
New driver/networking modes
-
New drivers
-
Level of access for shares (RO/RW)
-
Public/Private shares
-
Private share types
-
Pool-aware scheduler support
-
Horizon plug-in
New Kilo Driver modes
-
Single SVM
-
Flat network multiple SVMs
- SVMs setup by Manila with single flat network
- All SVM IPs come from the same subnet
-
Segmented network multiple SVMs
- SVMs setup by Manila with segemented networking
- Network segmentation: VLAN, VXLAN, GRE, STT, etc.
Drivers
-
Juno
- Generic driver
- NetApp Clustered Data Ontap
- EMC VNX
- Red Hat Glusterfs
-
Kilo
- EMC Isilon
- Ganesha
- HDS
- HDFS
- IBM GPFS/Ganesha
- HP 3Par
- Huawei OceanStor V3
- Oracle ZFS
Automation
Manila Puppet Module
manila::backend::netapp { 'myBackend':
netapp_login => 'clusterAdmin',
netapp_password => 'password',
netapp_server_hostname => 'netapp.mycorp.com',
netapp_transport_type => 'https',
}
https://github.com/stackforge/puppet-manila
Futures/Dev discussion
-
Manage/Unmanage
-
Replication
-
Automated mounts
-
CephFS driver
-
Backup
How to get started
vagrant-devstack-manila
$ git clone https://github.com/tlichten/vagrant-devstack-manila
$ cd vagrant-devstack-manila
$ vagrant up
Packages for RDO, OpenSUSE, Ubuntu
IRC on Freenode
#openstack-manila
#openstack-meeting-alt at 15:00 UTC on Thursdays


Captain America
Captain America is a superhero appearing in American comic books published by Marvel Comics. Created by cartoonists Joe Simon and Jack Kirby.
Doctor Strange
Doctor Strange is a 2016 American superhero film based on the Marvel Comics character of the same name. Produced by Marvel Studios.
Thor
Thor is a 2011 American superhero film based on the Marvel Comics character of the same name. Produced by Marvel Studios and distributed by Paramount Pictures.


Notes pick up is a website which is expanding its reach to all the colleges and universities. The notes section provides the notes in a proper manner and is categorized based on the universities. However, if a particular college is not listed, then we are sorry for the inconvenience. We are trying our best to cover all the colleges in the shortest time possible.
Definitely you can still have access to the notes. To access and further download the content of your choice: Select 'Others' from the drop-down list box from the tab titled 'College'. Manually enter the specific course title. Therein, you would be provided with the study materials required.
The study materials are meticulously handcrafted by experts in their respective fields and later cross-verified. We keep on updating the materials when required. So don't worry. We won't let you down.
 If you are looking forward to working with us, we respect your decision. You can submit your CV on our given Email address<EMAIL_ADDRESS>We shall get in touch with you as soon as possible.
Notes Pickup encourages contributions from its learners and wholeheartedly accepts the valuable suggestions thus made. Users are recommended to suggest changes in the content, via<EMAIL_ADDRESS>Our expert team will look through the suggested edits and make necessary changes within a short span of time.
Notes Pickup provides top quality notes, developed by a group of experts. However, user feedback is highly appreciated and customers are permitted to report any sort of misleading information found on the website. It is expected to be sent through<EMAIL_ADDRESS>This must be done so that our expert group can analyse the same and make essential corrections.
We have worked hard for this website for your experience to be smooth and relying.
We update our website from time to time in order to nullify any possible technical issues. However, if you still face any trouble you may contact via<EMAIL_ADDRESS>or call us at<PHONE_NUMBER>. We will be happy to resolve any possible situations.
If you have any problems accessing the notes, please check your connection and refresh your browser.
If the problem persists despite having a good internet connection, you can reach us via<EMAIL_ADDRESS>We'll be available to assist you.


This still needs fixing.
Click the "Mentorship" to see the second semi-functional mentor screen.
Otherwise, go ahead and click on the "Log Out" button below.
Mentorship
Log Out


SwiftPrometheus, Prometheus client for Swift
A prometheus client for Swift supporting counters, gauges, histograms, summaries and info.
Usage
For examples, see main.swift
Counter
Counters go up, and reset when the process restarts.
let counter = Prometheus.shared.createCounter(forType: Int.self, named: "my_counter")
counter.inc() // Increment by 1
counter.inc(12) // Increment by given value
Gauge
Gauges can go up and down
let gauge = Prometheus.shared.createGauge(forType: Int.self, named: "my_gauge")
gauge.inc() // Increment by 1
gauge.dec(19) // Decrement by given value
gauge.set(12) // Set to a given value
Histogram
Histograms track the size and number of events in buckets. This allows for aggregatable calculation of quantiles.
let histogram = Prometheus.shared.createHistogram(forType: Double.self, named: "my_histogram")
histogram.observe(4.7) // Observe the given value
Summary
Summaries track the size and number of events
let summary = Prometheus.shared.createSummary(forType: Double.self, named: "my_summary")
summary.observe(4.7) // Observe the given value
Info
Info tracks key-value information, usually about a whole target.
struct MyInfoStruct: MetricLabels {
let value: String
init() {
self.value = "abc"
}
init(_ v: String) {
self.value = v
}
}
let info = Prometheus.shared.createInfo(named: "my_info", helpText: "Just some info", labelType: MyInfoStruct.self)
info.info(MyInfoStruct("def"))
Labels
All metric types support adding labels, allowing for grouping of related metrics.
Example with a counter:
struct RouteLabels: MetricLabels {
var route: String = "*"
}
let counter = Prometheus.shared.createCounter(forType: Int.self, named: "my_counter", helpText: "Just a counter", withLabelType: RouteLabels.self)
counter.inc(12, .init(route: "/"))
Exporting
To keep SwiftPrometheus as clean and leight weitght as possible, there is no way of exporting metrics to Prometheus. All you can do is get a formatted string that Prometheus can use, so you can integrate it in your own Serverside Swift application
This could look something like this:
router.get("/metrics") { request -> String in
return Prometheus.shared.getMetrics()
}
Here, I used Vapor syntax, but this will work with any web framework, since it’s just returning a plain String.
Contributing
All contributions are most welcome!
If you think of some crazy cool new feature that should be included, please create an issue. Or, if you want to implement it yourself, fork this repo and submit a PR!
If you find a bug or have issues, please create an issue explaining your problems. Please include as much information as possible, so it’s easier for me to reproduce (Framework, OS, Swift version, terminal output, etc.)


After graduating from the Connecticut School of Broadcasting back in 2015, Cory began his media career as a reporter for a local news outlet in Wilmington, North Carolina. After becoming an accomplished writer, he seized his first opportunity to jump head first into radio, his true passion, and never looked back.
Working as a creative director, voice talent, producer and news host, Cory currently represents several local radio stations, and works with clients ranging from local businesses to national agencies and companies such as Live Nation, Sears, Hardee's, Blue Bell Creameries and many more.


GlobalMouseX ( )
Returns the absolute x position of the mouse on the display.
Note: See also
GlobalMouseY
for absolute Y position and
GetGlobalMouse
to get both
Example:


Feast Your Eyes on 13 Glorious Character Posters From Star Wars: The Rise of Skywalker
by Quinn KeaneyWe still have a bit of a wait until Star Wars: The Rise of Skywalker explodes into theaters, so in the meantime, Disney is keeping us entertained by dropping solid peeks at the conclusion to the new trilogy. In addition to a handful of thrilling trailers, Disney shared 13 character posters on Wednesday that are truly out of this world (sorry, but it's true).
The posters feature core characters like Rey, Finn, and Poe Dameron, as well as newcomer Naomi Ackie as Jannah and the great Billy Dee Williams reprising his role as Lando. Keep scrolling to get an up-close look at the photos to see if you can spot any Easter eggs or telling details before The Rise of Skywalker premieres on Dec. 20.


menu
Home
Why Us
Services
Portfolio
Approach
Blogs
Contact Us
Home
Why Us
Services
Portfolio
Approach
Blogs
Contact Us
Portfolio
Development & Design
Some of our clients to whom we have provided development services.
Corridor funds
LendCypher
Northeast Building Supplies
The 1947
Career buddy
Rolamix
Banistmo
Furrily
Refer doc
Zync Tech
Timejam
Open source projects
we love making things open source. here are some of our projects.
Scaleman
Scaleman is a utility that allows the users of the digital ocean to autoscale droplets and attach it to load balancers.
visit project >>
AsciiBinder Search
A small plugin developed to help the projects using asciibinder to implement search functionality in their site.
visit project >>
Let's build something awesome together.
Contact us


INFORMATION
Male
Plot 14, Block 7, OGHC,
Ota, Ogun State.
(+234)<PHONE_NUMBER>
<EMAIL_ADDRESS>www.linkedin.com/in/olayimika-a6a31baa6
EDUCATION
B.Sc. Computer Science 2014 - 2018
Second Class Upper
Covenant University, Ota, Ogun.
Secondary Certificate Exam 2008 - 2014
The Ambassador’s College, Ogun.
TRAININGS & MEMBERSHIPS
Certificate of Participation Feb, 2018
Life beyond Campus Workshop
Future Unity Glanvills Pensions
LEADERSHIP & ACHIEVEMENTS
Public Relations Officer Apr, 2018
National Association of Computer Science Students
Covenant University
Google Africa Scholar Jul, 2018
Android Programming
Andela Learning Community
Operations Academy Trainee Apr, 2018
Nielsen
SKILLS
Intermediate in the use of Microsoft Office
Efficient problem-solving ability
Strong communication skills
Advanced critical thinking
Intermediate in leadership and people management
Referees are available on request
WORK EXPERIENCE
Personal Assistant to the Executive Director and Teaching Assistant Dec 2018 – Present
The Ambassador’s College, Ota
- Part of the team that organized TUMA; a Mathematics competition for grades 5 and 6 pupils with over 1000 in attendance.
- Utilized Google Sheets to analyse data from student competitors for the concluded TUMA 2019 thereby increasing efficiency by 20%
- Graded scripts and personalized lesson reviews for students
- Organized Mathematics classes for Grade 12 students in the evenings in preparation for their O’ level exams.
- Manage the Director’s schedule and act as a liaison between students, staff, parents and the Director.
Software Development Trainee Jul – Sep 2018
APPZONE GROUP
- Developed a core banking application using ASP.NET MVC following a given business requirements document.
- Learnt about accounting entries, ledgers, trial balances, balance sheets, balancing accounting books.
Tech Intern Jan – Jul 2017
LAGOS STATE MINISTRY OF SCIENCE AND TECHNOLOGY (ICT CENTER)
- Created student information portals and model ministry sites using Bootstrap, AngularJS, MongoDB, NodeJS and Express
- Inputted and analysed information gotten from all audited ministries, departments and agencies using Microsoft Excel. Also, learnt the basics of using Python for analysing datasets
- Gained knowledge in networking and troubleshooting and used the knowledge to configure access points, build network models and troubleshoot faulty systems within the office
- Learnt how to configure a server using the interface and manage wiring in the server room. Also, installed and configured SharePoint 2013 on SQL Server 2012 using a virtual machine


Crush
The username and/or password you specified are not correct.
Submit
Don't have an account?
Create Account


When in a Code Completion lookup, press &shortcut:QuickJavaDoc; to show documentation for a lookup item, including class constructors.
So doing, if a class has more than one constructor, the links are shown:
Following a link shows documentation for the selected constructor.


The seed to initialise the state of the generator.
The seed to initialise the sequence number of the generator.
The sequence number of the generator.
The internal state of the generator.
Advances the internal state of the generator delta
steps. Delta can be
negative to reverse.
This is calculated in a very similar way to the square and multiply method for taking the power of a number. As you may expect, it is calculated in log(delta) time.
This is the source of randomness for all other random methods.
Produces a uniformly distributed 32-bit unsigned integer as a bigint.
Although the produced number is 32 bits; the implementation requires that the state of the generator be a 64 bit unsigned integer. Since the js Number datatype cannot reliably handle integers that large, we use the BigInt class for the calculation.
Produces a uniformly distributed integer, r, with 0 ≤ r < bound.
To produce a uniformly distributed integer in the range [low, high):
const i = low + rand.randint(high - low)
The lower bound for the number.
Generates an approximately uniformly distributed number, r, with 0 ≤ r < 1.
The number r.
Generated using TypeDoc
A PRNG class. Provides two main methods:
random
- Produces a "continuous" standard uniform distribution.randint
- Produces a discrete uniform distribution.For more details, check the individual methods.


BC Mapping Source
This structure represents the following BC mapping definition:
cimi.entity.Person maps to Basic:


How I spent my Saturday in Madrid
And technically Sunday. Unfortunately I couldn't make it to Italy for Clemen's and Marta's wedding, so this is what happened instead:
El Escorial - this isn't a problem we tried, but this is a guy I met and climbed with. He's Galician, apparently, and sounds different than people from Madrid. Nice guy, good climber! (Thanks Cercanias, Juan, Yolande and Erin!)
Lendakris Muertos - actual footage of the event, thanks to a co-worker I got to see a Basque hardcore punk band in Madrid (they sing in Castellano, if you're curious). Very cool. Almost got in a fight too. (I don't like being passive aggressively pushed, so I passive aggressively stand my ground.) While it's not the kind of thing I check out every week it was fun and I can see why they're popular. (Thanks Gustabo!)
Cosmosis - not actual footage (obviously) and it wasn't so day-glow, more like being in a regular club (which it was). He's actually playing the guitar live, which is cool. I danced til about 7am (well it felt like 6am since it was the night we went to daylight savings), which is pretty good considering I'd sobered up after the beer consumed at the Lendakris Muertes show. (Thanks José-Miguel!)
Not bad for a schedule that was basically improvised. Since I was supposed to be in Italy I didn't have tickets for the L.M. show and then someone cancelled, luckily for me. Right up until the day I thought I would not be able to get tickets, and I had no idea about the Trance thing - I was actually thinking of seeing a German DJ/Producer (T. Raumschmiere) at another club, if I could stay awake long enough (ha!).
PS> I'm tired.
About this entry
You"re currently reading "How I spent my Saturday in Madrid," an entry on a crick in the net
- Published:
- 04.01.08 / 12pm
- Category:
- Circular File, Gravity


No credit card required. Premium plan includes a 14-day free trial. Never worry again about tracking too many events.
Powerful insights for growing teams.
Analytics infrastructure for your company.


@WebServlet("/movies")
@DeclareRoles({"foo","bar","kaz"})
@ServletSecurity(@HttpConstraint(rolesAllowed = "foo"))
@BasicAuthenticationMechanismDefinition
public class MovieServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
public void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
String webName = null;
if (request.getUserPrincipal() != null) {
webName = request.getUserPrincipal().getName();
}
response.getWriter().write(
" Welcome to Movie servlet

\n" +
"web username: " + webName + "

\n" +
"web user has role \"foo\": " + request.isUserInRole("foo") + "
\n" +
"web user has role \"bar\": " + request.isUserInRole("bar") + "
\n" +
"web user has role \"kaz\": " + request.isUserInRole("kaz") + "

");
}
}
Jakarta Security with a custom identity store
TomEE has its own independent Jakarta Security implementation https://eclipse-ee4j.github.io/security-api/ .
|
Jakarta Security defines a standard for creating secure Jakarta EE applications in modern application paradigms. It defines an overarching (end-user targeted) Security API for Jakarta EE Applications. Jakarta Security builds on the lower level Security SPIs defined by Jakarta Authentication and Jakarta Authorization, which are both not end-end targeted. |
As the specification requires, TomEE supports by default JDBC and JDAP identity stores. It also has a default support for Tomcat’s 'tomcat-users.xml' (See security-tomcat-user-identitystore example).
This example will show how you can leverage your own identity store to authenticate users. This is very often required for integrating your systems.
Implement a simple servlet
This movie servlet, is a very simple example that defines a BasicAuthenticationMechanism, some roles and security constraints.
IMPORTANT:
In TomEE, Jakarta Security is wired in all layers, you can use
-
jakarta.ws.rs.core.SecurityContext#getUserPrincipal
andisUserInRole
to get the User Principal and check if the user has a given role -
jakarta.security.enterprise.SecurityContext#getCallerPrincipal
andisCallerInRole
to get the Caller Principal (notice the difference in terms of naming) and check if a caller has a given role -
jakarta.servlet.http.HttpServletRequest#getUserPrincipal
andisUserInRole
-
jakarta.ejb.SessionContext#getCallerPrincipal
andisCallerInRole
-
the
Subject
from thePolicyContext
but this is less used
A lot of different APIs to retrieve the principal and check whereas it has a given role. It’s all wired in and consistent in TomEE. No special configuration is needed.
Create your own IdentityStore implementation
For the sake of keeping this example as simple as possible, the TestIdentityStore
is very simple.
It recognizes only 2 users and only one of them has the right roles to call the servlet.
@ApplicationScoped
public class TestIdentityStore implements IdentityStore {
public CredentialValidationResult validate(Credential credential) {
if (!(credential instanceof UsernamePasswordCredential)) {
return INVALID_RESULT;
}
final UsernamePasswordCredential usernamePasswordCredential = (UsernamePasswordCredential) credential;
if (usernamePasswordCredential.compareTo("jon", "doe")) {
return new CredentialValidationResult("jon", new HashSet<>(asList("foo", "bar")));
}
if (usernamePasswordCredential.compareTo("iron", "man")) {
return new CredentialValidationResult("iron", new HashSet<>(Collections.singletonList("avengers")));
}
return INVALID_RESULT;
}
}
There is nothing else to configure or do. The identity store must implement the IdentityStore interface. It must be a CDI bean and then TomEE will pick it up automatically and delegate user authentication.
Running
Were we to run the above Main class or Test Case we’d see output like the following:
....
INFOS: Starting ProtocolHandler ["http-nio-54313"]
juin 24, 2021 2:58:42 PM sun.reflect.DelegatingMethodAccessorImpl invoke
INFOS: Server startup in [4703] milliseconds
juin 24, 2021 2:58:42 PM sun.reflect.DelegatingMethodAccessorImpl invoke
INFOS: Full bootstrap in [7638] milliseconds
Calling MovieServlet without any credentials provided.
juin 24, 2021 2:58:43 PM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFOS: statusCode=[401] contentType=[text/html]
juin 24, 2021 2:58:43 PM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFOS: <!doctype html><title>HTTP Status 401 – Unauthorized</title>
HTTP Status 401 – Unauthorized

Type Status Report

Description The request has not been applied because it lacks valid authentication credentials for the target resource.

Apache Tomcat (TomEE)/9.0.52 (8.0.9-SNAPSHOT)

Calling MovieServlet with a valid user and valid permissions.
Calling MovieServlet with the wrong credentials.
juin 24, 2021 2:58:44 PM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFOS: statusCode=[401] contentType=[text/html]
juin 24, 2021 2:58:44 PM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFOS: <!doctype html><title>HTTP Status 401 – Unauthorized</title>
HTTP Status 401 – Unauthorized

Type Status Report

Description The request has not been applied because it lacks valid authentication credentials for the target resource.

Apache Tomcat (TomEE)/9.0.52 (8.0.9-SNAPSHOT)

Calling MovieServlet with a valid user but without required permissions.
juin 24, 2021 2:58:44 PM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFOS: statusCode=[403] contentType=[text/html]
juin 24, 2021 2:58:44 PM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
INFOS: <!doctype html><title>HTTP Status 403 – Forbidden</title>
HTTP Status 403 – Forbidden

Type Status Report

Message Access to the requested resource has been denied

Description The server understood the request but refuses to authorize it.

Apache Tomcat (TomEE)/9.0.52 (8.0.9-SNAPSHOT)


--- layout: post title: no title date: '2016-10-04T00:30:22+02:00' categories: - Storyboards picture_url: https://film-Storyboards.tumblr.com/post/151324125771 ---


S
ome
B
est
B
ody
B
uilders
Health First
Home
Schedule
Daily Schedule
Holidays
What We Do
Aerobics
Body Building
Yoga
Contact Us
Best Body Builders
Events


JavaScript & jQuery
Chapter 6: Events
1
HTML Event Handler Attributes (Do Not Use)
event-attributes.html
event-attributes.js
2
DOM Event Handler Example
event-handler.html
event-handler.js
3
Event Listener Example
event-listener.html
event-listener.js
4
Example of Using Parameters on an Event Listener
event-listener-with-parameters.html
event-listener-with-parameters.js
5
Fallback for Using Event Listeners in IE8
event-listener-with-ie-fallback.html
event-listener-with-ie-fallback.js
6
Event Information with Fallback for IE8
event-listener-with-event-object.html
event-listener-with-event-object.js
7
Event Delegation Example
event-delegation.html
event-delegation.js
8
Load Event
load.html
load.js
9
Focus and Blur
focus-blur.html
focus-blur.js
10
Click Event
click.html
click.js
11
Determining Position
position.html
position.js
12
Keypress Event
keypress.html
keypress.js
13
Form Example
form.html
form.js
14
Mutation Example
mutation.html
mutation.js
15
HTML5 Events
html5-events.html
html5-events.js
16
Example
example.html
example.js
Extra
Event Flow
event-flow.html
event-flow.js