« Home « Chủ đề quản lý web

Chủ đề : quản lý web


Có 80+ tài liệu thuộc chủ đề "quản lý web"

Bắt đầu với IBM Websphere smash - p 4

tailieu.vn

12 Chapter 1 Installing the IBM WebSphere sMash CLI. rollback Reverts the effects of the last resolve or update.. search Finds and prints all matching modules in the reposi- tory.. As you can see, there are a bunch of available commands. For example, if we use zero help search , we get the results shown in Listing 1.10.. Listing 1.10...

Bắt đầu với IBM Websphere smash - p 5

tailieu.vn

Figure 2.8 Create a sample application. Figure 2.9 List of sample applications. ptg created, you can poke around and take a look at the sample, edit it, and run it as is discussed later. Project and choose a WebSphere sMash application. then click the Next button (see Figure 2.10).. Next, you’ll be prompted to type in a project name, and...

Bắt đầu với IBM Websphere smash - p 6

tailieu.vn

In the previous chapter, you learned how to create a simple WebSphere sMash application using one of the Tools options. That application demonstrated simple file serving in a WebSphere sMash environment. To create a more complex application, we need to understand the structure of a typical WebSphere sMash application. In this chapter, we look at how to use conventions in...

Bắt đầu với IBM Websphere smash - p 7

tailieu.vn

After you have added the zero.resource module as a dependency to your application, you must resolve your application. From the command line, after editing your ivy.xml, you must execute. from your application’s root directory. The resolve command attempts to find the zero.resource module in your local repository. When you run zero update , the command finds the appropriate zero.resource module...

Bắt đầu với IBM Websphere smash - p 8

tailieu.vn

Listing 3.9 Java Event Handler. So far, we’ve covered the basics of creating a simple RESTful service. Groovy script elements are surrounded by “<. and “%>” and expression elements by “<%=”. and “%>. In the public directory, create a file named groovy.gt . We’ll start by simply dis-. ptg Listing 3.10 Calling the GET Method. After we have turned the...

Bắt đầu với IBM Websphere smash - p 9

tailieu.vn

In the previous chapter, we talked about favoring convention over configuration. This chapter describes exactly how to do that in the WebSphere sMash envi- ronment. This chapter gives you the “tools” and the know-how to configure the WebSphere sMash environment and your applications.. Configuration in WebSphere sMash can be roughly categorized as affecting either the application or the environment, as...

Bắt đầu với IBM Websphere smash - p 10

tailieu.vn

To see information about your current local repository, such as its location on your local file system and which module groups are available, you can execute the following from the Web- Sphere sMash CLI directory:. To see which module group an applica- tion is using, you can execute the following command from the application’s directory:. You can see which specific...

Bắt đầu với IBM Websphere smash - p 11

tailieu.vn

82 Chapter 5 Global Context. /config/appLogDir Contains the file system path to the application’s log directory. /config/name Contains the name of the application as configured. /config/root Contains the file system path to the root directory of the application. /config/zeroHome Contains the file system path to the zero home. In addition to the standard configuration variables, you may also store application...

Bắt đầu với IBM Websphere smash - p 12

tailieu.vn

The zdelete method deletes the specified location, removing any values stored there (see Listing 5.15).. Listing 5.15 zdelete a List. GlobalContext.zdelete("/app/stringList");. GlobalContext.zdelete("/app/integerList");. in the location (see Listing 5.16).. Listing 5.16 zdelete a List Element. GlobalContext.zdelete("/app/stringList#0");. GlobalContext.zdelete("/app/integerList#1");. To test if a list is in the global context, we use the zcontains method:. The zcontains method returns a boolean value, indicating whether...

Bắt đầu với IBM Websphere smash - p 13

tailieu.vn

ptg Listing 5.42 Testing if the Global Context Contains a Particular Variable. To put a single list variable into the global context in Java, we use the zput method.. To put a list into the global context, we use the zput method:. With this code, we’ve created a list and directly created or replaced the list in the tmp zone.....

Bắt đầu với IBM Websphere smash - p 14

tailieu.vn

ptg In this case, we’ve created an empty list and posted an element to the list stored in the tmp. To retrieve variables placed in the global context, we use the zget method:. The zget method retrieves the list in the particular global context location. If a default is not provided and the location is not found, a null is...

Bắt đầu với IBM Websphere smash - p 15

tailieu.vn

For performance reasons, support for serving internationalized files is disabled in WebSphere sMash.. To enable internationalization support in your application, add the lines shown in Listing 6.1 to your zero.config file.. Listing 6.1 Adding i18n Support in zero.config. When a request comes in with content negotiation enabled, WebSphere sMash will check the Accept header for preferred languages. Failing that, the...

Bắt đầu với IBM Websphere smash - p 16

tailieu.vn

Business Logic. Figure 6.8 Updated assembly flow. Listing 6.10 /public/quiz/index.gt—Simple Redirect to Business Logic. invokeMethod("quiz.groovy go", null). Listing 6.11 /app/scripts/quiz.groovy—Business Logic Controller. if ( request.params.quiz. request.params.page = "home". request.params.page = "quiz". request.params.quiz = getQuizData(). This would be pulled from DB or config file request.params.nav. request.view = "quiz/theme/main.gt". '<?php. '<$php. '<php. '<%php. As you can see, all of our controller and...

Bắt đầu với IBM Websphere smash - p 17

tailieu.vn

def quiz = invokeMethod('quiz.groovy', 'getQuizData', null) request.view = 'XML'. request.xml.output = quiz. Default is 'linkedHashMap' request.xml.rootElement = 'quiz'. request.xml.idRefs = true render(). The type of response is always dependent on the type of request and how you should render your output.. And basically, they are right, but that’s the point. REST is based on the HTTP protocol, which is well...

Bắt đầu với IBM Websphere smash - p 18

tailieu.vn

Get the ID of car to update, this param is fixed def carId = request.params.carId[]. logger.INFO {"Update starting for: ${carId}"}. The data to update the record with could be in any param def carData = request.params.someData[]. request.status = HttpURLConnection.HTTP_NO_CONTENT. Get the ID of car to delete, this param is fixed def carId = request.params.carId[]. logger.INFO {"Delete attempted for: ${carId}"}. request.status...

Bắt đầu với IBM Websphere smash - p 19

tailieu.vn

we need to secure all REST resources. Refer to Chapter 9, “Security Model,” for more information on setting up your actual key- store and truststore values, as these are specific to your Java environment.. Now that you’ve gotten the tools to test your services, you need to document each service resource and its methods. Figure 7.1 Adding RESTDoc tooling. Wouldn’t...

Bắt đầu với IBM Websphere smash - p 20

tailieu.vn

Databases Supported in WebSphere sMash. Before we begin, we need to cover the database vendors supported in WebSphere sMash. Vendors not listed will probably work as long as they support JDBC, and you can acquire the necessary driver files required to connect to the database server. The database vendors that are supported and known to work with WebSphere sMash are...

Bắt đầu với IBM Websphere smash - p 21

tailieu.vn

By using the ZRM delegate, you can potentially save yourself hundreds of lines of boiler- plate code per resource. Adding Data to a Zero Resource Model. Alternately, you can use the predefined sample page to manually add records one by one. To perform a bulk data load, you need to create a JSON data file in the /app/model/fixtures directory of...

Bắt đầu với IBM Websphere smash - p 22

tailieu.vn

logger.INFO{"Rows updated: ". A Delete action, because we have to clean out any bad stuff sql = "DELETE FROM bookmark WHERE tags like ?";. logger.INFO{"Rows deleted: ". Creating queries by assembling SQL statements from strings fragments has many disadvantages.. The other major issue with dynamically built SQL statements based on input parameters is the classic SQL injection attack. Listing 8.23...

Bắt đầu với IBM Websphere smash - p 23

tailieu.vn

ptg case Types.BIGINT: case Types.INTEGER:. case Types.NUMERIC: case Types.SMALLINT:. case Types.TINYINT: case Types.DECIMAL:. case Types.DOUBLE: case Types.FLOAT:. case Types.BINARY: case Types.BIT:. case Types.BOOLEAN:. map.put( 'headers', headers. row.put. ptg map.put('content', content). map.put('message', "Successfully retrieved ${rowCntr}. map.put('message', "No records found"). map.put('message', "${cnt} records processed."). map.put('message', "Error during SQL processing: ${e}". WebSphere sMash DBA—The Database Administrator Application. Start by creating a new WebSphere...