java.lang.OutOfMemoryError: PermGen space

이클립스의 톱켓에 다음과 같은 옵션을 추가 한다.


-XX:PermSize=256m -XX:MaxPermSize=256m


이클립스에서

servers 탭의 해당하는 tomcat 선택 후 -> F3 -> Overview - General Information 하단의 Open launch configuration 클릭 후

Edit Configuration 창의 Arguments 탭을 선택 후 VM arguments: 입력란의 마지막 라인에

-XX:PermSize=256m -XX:MaxPermSize=256m


2015/10/08 16:31 2015/10/08 16:31
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/694

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/694

workspace의 .settings디렉토리의 org.eclipse.wst.common.project.facet.core.xml

<?xml version="1.0" encoding="UTF-8"?>

<faceted-project>

  <runtime name="Apache Tomcat v7.0"/>

  <fixed facet="wst.jsdt.web"/>

  <installed facet="java" version="1.7"/>

  <installed facet="jst.web" version="3.0"/>

  <installed facet="wst.jsdt.web" version="1.0"/>

</faceted-project>
--확인 --

web.xml 파일 확인

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

version="2.5">


<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">


2015/10/07 10:19 2015/10/07 10:19
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/693

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/693

c# webbro

C# RSS Icon ATOM Icon 2015/07/18 00:48 visualp
private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e){
       if (e.Url.AbsoluteUri == wb.Url.AbsoluteUri) {

       }
}

ajax 용 웹페이지 파싱할 때위처럼 구현하면 여러번 사이트 로딩 되는 현상을 방지 할 수 있다.
2015/07/18 00:48 2015/07/18 00:48
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/692

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/692

[원문]:http://lintut.com/install-mariadb-on-centos/


MariaDB 10.0 is the development version of MariaDB. It is built on the MariaDB 5.5 series with backported features from MySQL 5.6 and entirely new features not found anywhere else.
For CentOS, RedHat, and Fedora, it is highly recommended to install from a repository using YUM. This page walks you through the simple steps.

Adding the MariaDB YUM Repository

We highly recommended to use custom MariaDB YUM repository to install. Create a repo file under/etc/yum.repos.d/MariaDB.repo, Copy and paste following line under MariaDB repository:

Add repository on Centos 6.5 32-bit

# vi /etc/yum.repos.d/MariaDB.repo

and paste following line:

# MariaDB 10.0 CentOS repository list - created 2014-03-12 12:46 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Add repository on Centos 6.5 64-bit

# vi /etc/yum.repos.d/MariaDB.repo

and paste following line:

# MariaDB 10.0 CentOS repository list - created 2014-03-12 12:47 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Add MariaDB 10 repository on CentOS 6.4 -32-bit

Add MariaDB 10.0 repository on CentOS 6.4 -32-bit

The example file above includes a gpgkey line to automatically fetch the GPG key we use to sign the repositories. This key enables yum and rpm to verify the integrity of the packages it downloads.

Installing MariaDB 10.0 with YUM

With the repo file in place you can now install MariaDB like so:

# yum install MariaDB-server MariaDB-client -y

Starting MariaDB

After complite installation process, start MariaDB width following command:

# service mysql start

or

# /etc/init.d/mysql start

Set MariaDB to start on boot:

# chkconfig mysql on

Secure MariaDB after installation

  • Set (Change) root password
  • Remove anonymous users
  • Disallow root login remotely
  • Remove test database and access to it
  • Reload privilege tables

To secure MariaDB installation enter following command:

#  mysql_secure_installation

Example output:

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password: ENTER YOUR PASSWORD
Re-enter new password: REPEAT YOUR PASSWORD
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

Restart MariaDB:

# service mysql restart

Try to connect to MariaDB:

# mysql -u root -p
Connect to MariaDB 10.0

Connect to MariaDB 10.0

That’s it. For questions please use comments.

2015/06/26 16:31 2015/06/26 16:31
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/691

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/691

[원문]
http://viralpatel.net/blogs/spring-mvc-multi-row-submit-java-list/

[정리]

ArrayList 형태의 DTO 또는 VO 객체를 생성후

그 beens 객체를 jstl foreach로 반복 해주면 됨 .


2015/06/22 10:59 2015/06/22 10:59
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/690

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/690

<원문>http://nimba.tistory.com/m/post/457

    @RequestMapping(value = "/servicelogo/{path1}/{file_name:.+}", method = RequestMethod.GET, produces = "application/octet-stream")
    @ResponseBody
    public FileSystemResource getPublicFile2(
            @PathVariable("file_name") String fileName,
            @PathVariable("path1") String path1,
            HttpServletResponse response) throws Exception {
        Map<String, Object> condition = new HashMap<String, Object>();
        if(path1.equals("front")) {
            condition.put("front_logo_img", fileName);
        } else if(path1.equals("print")) {
            condition.put("print_logo_img", fileName);   
        } else {
            condition.put("front_logo_img", fileName);
        }
       
        String serverFileName = Admin2Service.getServiceLogoFileName(condition);
        logger.debug("serverFileName= "+serverFileName);
       
        if(serverFileName == null || serverFileName.length()==0 || serverFileName.equals("")) serverFileName = "temp.jpg";
       
        String uploadDir = "/upload/serviceLogo";
        File f = new File(messageBundle.getMessage("file.uploadPath") + uploadDir + "/" + serverFileName);
       
        response.setContentType("application/octet-stream");
        return new FileSystemResource(f);
    }

2015/06/18 17:05 2015/06/18 17:05
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/689

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/689

<?php $thour=17 ?>
<script>
 
var dateObj = new Date();
var month = dateObj.getUTCMonth() + 1; //months from 1-12
var day  = dateObj.getUTCDate();
var year = dateObj.getUTCFullYear();
var hour = dateObj.getHours();
var minute = dateObj.getMinutes();
var second = dateObj.getSeconds();

//var end = new Date('13 Apr 2016 13:30:00');
var end  = new Date(year,month-1,day,<?php echo $thour?>,0,0 );

var _second = 1000;
var _minute = _second * 60;
var _hour = _minute * 60;
var _day = _hour *24;
var timer;

function showRemaining()
{
    var now = new Date();
    var distance = end - now;
    if (distance < 0 ) {
       // handle expiry here..
    clearInterval( timer ); // stop the timer from continuing ..
    location.reload();
  
       //alert('Expired'); // alert a message that the timer has expired..
    }
    var days = Math.floor(distance / _day);
    var hours = Math.floor( (distance % _day ) / _hour );
    var minutes = Math.floor( (distance % _hour) / _minute );
    var seconds = Math.floor( (distance % _minute) / _second );
    var milliseconds = parseInt(distance % _second /10);

/*
    var countdownElement = document.getElementById('timer');
 
 countdownElement.innerHTML = days  + 'd ' +
                                 hours + 'h ' +
                                 minutes + 'm ' +
                                 seconds + 's ' +
                                 milliseconds + 'ms';
*/
 
 if(hours<10){
  hours = "0" + hours;
 }
 if(minutes<10){
  minutes = "0" + minutes;
 }
 if(seconds<10){
  seconds = "0" + seconds;
 }
 
 if(milliseconds<10){
  milliseconds = "0"+milliseconds;
 }

 var thour = document.getElementById('thour');
 var tminute = document.getElementById('tminute');
 var tsecond = document.getElementById('tsecond');
 var tms = document.getElementById('tms');
 
 thour.innerHTML = hours;
 tminute.innerHTML=minutes;
 tsecond.innerHTML=seconds;
 tms.innerHTML=milliseconds;
 
}

timer = setInterval(showRemaining, 10);

</script>


<div id="timer">
 <span id="thour"></span>
 <span class="sp">:</span>
 <span id="tminute"></span>
 <span class="sp">:</span>
 <span id="tsecond"></span>
 <span class="sp">:</span>
 <span id="tms"></span>
</div>

2015/06/15 15:36 2015/06/15 15:36
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/688

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/688

CENTOS 6.6 에 NGINX1.8 설치 해서  java 환경 세팅중
502 BAD GATEWay error 가 발생 한다.다음 2 명령어로 깔끔하게 해결 할 수 있다.

나와 같은 에러가 CentOS/RHEL 계열 OS에서 발생한다면 다음 두개의 명령으로 말끔히 해결!

setsebool -P httpd_can_network_connect 1

 

더욱더 견고하게! fix하고 싶다면...

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

2015/05/20 19:59 2015/05/20 19:59
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/687

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/687

vsftpd 설정 cent 6.6

PHP RSS Icon ATOM Icon 2015/05/14 20:48 visualp
원문 [http://junhyung2.blogspot.kr/2015/02/centos-vsftpd.html]
 

centos에 vsftpd 설치하기

윈도우에서 리눅스에 파일을 업로드하기 위해서는 리눅스 서버에 ftp를 설치해야 합니다. 그래서 이번에는 파일을 업로드하기 위해서 vsftpd를 설치하도록 하겠습니다. vsftpd는 많은 리눅스 개발 단체에서 기본 ftp 데몬으로 사용하고 있을 정도로 활용성과 보안면에서 뛰어난 데몬이라고 합니다. 
 
vsftpd는 centos 6.6에서 설치했습니다.
 
1. vsftpd 설치하기
 
# yum install -y vsftpd
 
2. vsftpd.conf 설정하기
 
# vi /etc/vsftpd/vsftpd.conf
 
밑에 해당하는 줄을 찾아서 다음과 같이 변경합니다.
 
anonymous_enable=NO  //익명 접속 가능 여부
local_enable=YES  // 로컬 계정 사용자의 접속 허용 여부
write_enable=YES  // write 명령어 허용 여부
local_umask=022  // 로컬 계정 사용자용 umask
xferlog_enable=YES  // 파일 전송 로그 기록 여부
connect_from_port_20=YES  // 20번 포트로 접속 허용 여부
xferlog_file=/var/log/xferlog  // 파일 전송 로그 파일명
xferlog_std_format=YES  // xferlog 표준 포맷으로 로그를 남길지 여부
chroot_local_user=YES  // 사용자의 홈 디렉토리를 변경 제한을 위한 설정
listen=YES  // standalone으로 운영하려면 YES
pam_service_name=vsftpd  // PAM 파일명을 지정
userlist_enable=YES
tcp_wrappers=YES
 
3. 방화벽에 포트 추가
 
# vi /etc/sysconfig/iptables
 
밑의 줄을 추가합니다.
 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 20:21 -j ACCEPT
 
4. 데몬 재시작 및 chkconfig에 등록
 
# /etc/init.d/iptables restart
# /etc/init.d/vsftpd start
# chkconfig vsftpd on
2015/05/14 20:48 2015/05/14 20:48
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/686

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/686

jobs 명령어, 리눅스

Linux RSS Icon ATOM Icon 2015/05/09 17:25 visualp
jobs 명령어, 리눅스

shell> ctrl + z 

- 현재 보던 창이 닫힌다.

 

shell> jobs 

- 작업중인 목록이 보인다.


shell> fg

- 가장 최근에 편집한 파일이 열린다.

 

shell> fg [n]

- jobs 명령을 내렸을 때 보였던 작업번호를 치면, 해당 작업이 수행된다.

 

shell> kill %n

- n번 작업 삭제

2015/05/09 17:25 2015/05/09 17:25
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/685

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/685