Sunday, December 13, 2015

Using Kendo UI for JSP in a simple JSP file

In this post, I would like to introduce how to use Kendo UI for JSP in simple JSP page. In this example, I use NetBeans 8.1.

First, extract the Kendo UI for JSP zip file.
Launch NetBeans 8.1, select File - New Project, then select JavaWeb, click Next.
Give the project name as you wish, then click Next.
NetBeans will ask the Application Server we're gonna use, Java EE version, etc., we can leave these configurations as is, and click Finish.

Create a new folder named resources under Web Pages node, copy the javascript and css folders (from js and styles folder respectively of extracted Kendo UI for JSP zip file) to this new folder.

Add the JAR file (kendo-taglib-2015.3.1111.jar) from wrappers\jsp\kendo-taglib folder into libraries node.
Create a new JSP file, add JSTL configuration as shown below, then add references to Kendo UI javascript and css.

Run the application, you can see the Kendo UI widgets are displayed.

Tuesday, January 13, 2015

Prevent K2 SmartForms from automatic sign-in

If you build an application using K2 SmartForms and using its runtime URL to browse the application, by default K2 SmartForms will automatically log in using current Windows user credential.

Sometimes we want to prevent this default behavior occurs and users must enter their credential manually to log in to K2 SmartForms application. To do this, we have to alter K2 SmartForms configuration in IIS.

Open IIS in K2 SmartForms server, choose Runtime website, then select Authentication.

image

Click Forms Authenticaiton and click Edit.

image

a dialog window will be opened. Observe the Login URL field, change its content to ~/Login.aspx. By default the login URL field content is _trust/Login.aspx

Click OK to save configuration. Recycle the application pool that K2 SmartForms is using, then try to browse the runtime URL, a login page will be appeared.

image

You can log in using domain credential to log in to K2 SmartForms Runtime environment.