About your own Javaweb Project FAQ Summary ____web

Source: Internet
Author: User

1. How do you achieve internationalization of your project?

Java recommended use of xx.properties configuration files, such as lan_zh_cn.properties inside your program in all Chinese prompts, lan_fr.properties inside you plan the annual supply and demand of all the French prompts (and above all Chinese hint one by one corresponding And then implement the call yourself in the program, which is the user's cue to read the corresponding profile when selecting a different language.

2.Ajax differs from jquery.

Ajax is typically used where there is no refresh of the page to update data. jquery is a collection of JavaScript that can be understood as classes and functions written in JavaScript. Ajax is also written in JavaScript, by passing the value to the background processing and then returning the data and displaying it, which eliminates the refresh of the page.

the difference between 3.Hibernate and Ibatis.

Hibernate and Ibatis are persistent layer frameworks, the difference being that Ibatis can configure their own SQL statements for queries, and through their own configuration of SQL, Ibatis is more efficient than the SQL generated by hibernate. In other words, you use HQL queries on hibernate to automatically generate SQL Hibernate, and Ibatis is your own configuration.

4. How to solve the problem of cookies security.

In the process of the IFRAME came in front of the add a sentence:
Header (' p3p:cp= "cura ADMa DEVa Psao psdo our bus UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR" ")

5. How to assign permissions is achieved.

In the servlet to get the user's encapsulation object, and then extract the current user's permissions and database permissions match, if the administrator in the requesting domain, such as Administrator: Request.setattribute ("Grade", "Mgr"); Ordinary member Request.setattribute ("Grade", "common"); then in the JSP, according to the "grade" in the request domain value to determine whether or not to modify the function is presented to the user suggested that the Add Delete button with a DIV layer installed. In the servlet, you get the encapsulated object of the Logged-in user, and then extract the current user's permissions and the permissions in the database, if the administrator is in the request domain, such as administrator: Request.setattribute ("Grade", "Mgr"), ordinary member Request.setattribute ("Grade", "common");
Then in the JSP, according to the "grade" value in the request domain to judge whether or not the function is presented to the user
It is recommended to use a DIV layer to install the Add-deletion button.

6. The working mechanism of the factory model.

Factory mode: The factory pattern is a pattern that is often used, a class implemented according to the factory pattern can generate an instance of a class in a group of classes based on the data provided, usually with a common abstract parent class and implementing the same method, but these methods operate differently for different data. You first need to define a base class that implements the methods in the base class in different ways. Then you need to define a factory class where the factory class can generate different instances of subclasses based on conditions. When an instance of a subclass is obtained, the developer can call the method in the base class without having to consider which instance of the subclass is returned.

7.Js How to write a method to replace a character in a string such as B in str= "ABCD" with H.

var a= "/A/B/C/D";
Alert (A.replace (/\//g, '));

8. How to delete multiple duplicate data in a database.

Select Ditinct *into #tmp from Mailrecord
drop table Mailrecord
SELECT * Into Mailrecord from #tmp
drop table #tmp

9.js is useful in the project.

JavaScript is a client-side scripting language that is based on object and event-driven and has relative security. It is also a kind of scripting language widely used in client Web development, which is often used to add dynamic functions to HTML Web pages, such as responding to user's various operations.

10. Briefly describe the work flow of SSH.


--More about Yourself Javaweb Project FAQ Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.