Java method similar to nl2br in PHP

June 25th, 2009One Comment  |  

Below Java method will work same as PHP function nl2br

public static String nl2br( String text){
return text.replaceAll("\n","<br />");
}

I was going through error log and saw this error in error log file. To solve this problem, In /etc/httpd/conf.d you will see a file entitled welcome.conf

It looks like this:

<LocationMatch “^/+$”>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

Change it to this:

<LocationMatch “^/+$”>
Options Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

Just remove the hyppen(-) before the Indexes, that’s it. I hope this will solve your problem.

In file /etc/ssh/sshd_config,
use

ListenAddress 192.168.0.1

to make sshd listen to only that address.