Obtains a boolean value by comparing the obtained value with a local value.

Source: Internet
Author: User

Obtains a boolean value by comparing the obtained value with a local value.
/**
* Sets the port of the local Socks5 proxy. Default is 7777. If you set the port to a negative
* Value Smack tries the absolute value and all following until it finds an open port.
*
* @ Param localSocks5ProxyPort the port of the local Socks5 proxy to set
*/
Public static void setLocalSocks5ProxyPort (int localSocks5ProxyPort ){
SmackConfiguration. localSocks5ProxyPort = localSocks5ProxyPort;
}
In the jsp project, how does one obtain the boolean value of the front-end interface in servlet,

The frontend is actually a string type.
Therefore, the boolean type cannot be obtained directly.
But it can be converted
For example, if you use a boolean value on the front end, but the value of true is changed to true when it is passed, and false is changed to false when it is passed.

When the background is retrieved, it is still the same as the string. When the background is retrieved, let's judge.
String a = request. getXXX // obtain the value passed by the front end
Boolean B;
If (a. equals ("true") // use equals instead of =
B = true;
Else
B = false;

How does the Servlet obtain the boolean value from a boolean data jsp page on the DAO layer?

Servlet: request. setatrri.pdf ("boolean", StringObj );

JSP page: request. getAtrribute ("boolean"); or EL :$ {boolean}

Related Article

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.