첫번째 프로젝트에서는 프로젝트 생성하고 layout을 변경했으니

두번째 프로젝트에서는 Toylist를 보여주는 것을 한다.


Excercise 에서 Todo 를 확인한다.

만들던 프로젝트에서 쭉 해도 되고

Excercise를 수정해도 된다.

만들던 프로젝트에는 Todo가 표시되지 않으니 알아서 선택.


MainActivity 에 ToDo1

    // TODO (1) Declare a TextView variable called mToysListTextView
    private TextView mToysListTextView;


activity_main.xml 에 ToDo2 tv_toy_names 추가

before

 after

 <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!"
    android:padding="16dp"
    android:textSize="20sp" />

 <TextView
    android:id="@+id/tv_toy_names"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="16dp"
    android:textSize="20sp" />


MainActivity 에 ToDo3

onCreate method 에서 Textview와 mToysListTextView 연결


// TODO (3) Use findViewById to get a reference to the TextView from the layout

mToysListTextView = (TextView) findViewById(R.id.tv_toy_names);


// TODO (4) Use the static ToyBox.getToyNames method and store the names in a String array

String[] toyNames = ToyBox.getToyNames();


그런데 Excercise에서 작업을 하면 문제가 없으나

기존 프로젝트에서 작업하는 경우에는 ToyBox class가 없으므로 Error가 난다.

ToyBox라는 class를 만들거나 복사해 온다.

package com.example.nobang.favoritetoys;

public final class ToyBox {

    public static String[] getToyNames() {
        return new String[] {
                "Red Toy Wagon",
                "Chemistry Set",
               
                "Squirt Guns",
                "Miniature Replica Animals Stuffed with Beads that you swore to your parents would be worth lots of money one day",
                "Creepy Gremlin Doll",
                "Neodymium-Magnet Toy"
        };
    }


에러가 없으면 다음 Todo

// TODO (5) Loop through each toy and append the name to the TextView (add \n for spacing)

for (String toyName : toyNames) {
    mToysListTextView.append(toyName + "\n\n\n");
}


ToyBox class에 있는 장난감이름들을 불러와서

TextView에 일렬로 쭉(for문으로) 붙이는 거다.



todo 3을 진행하지 않으면 mToysListTextView가 초기화되어있지 않기 떄문에 아래와 같이 에러가 난다.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nobang.favoritetoys/com.example.nobang.favoritetoys.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.append(java.lang.CharSequence)' on a null object reference
 

MainActivity

- solution 프로젝트에는 TODO가 COMPLETED로 되어있음.

- todo를 진행했으면 COMPLETED로 바꿔주는 것이 좋음.

결과

"\n\n\n"으로 줄바꿈이 됨.


728x90

안드로이드 빌드를 했을 때

'Your project path contains non-ASCII characters' 같은 에러가 나오며 안될 때가 있다.


Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.
Open File
 

Open File을 누르면 build.gradle 파일이 열리는데

프로젝트의 경로가 영어가 아닐 때 발생하는 에러다.

(project path is not english. ex. Korean)


gradle.properties 파일에  com.android.build.gradle.overridePathCheck=true 를 추가 한다.


그리고는 try again 하면 된다.

728x90

T01.01-Exercise-CreateLayout 프로젝트를 열면

맨 아래 TODO 탭을 클릭해 보면 다음과 같이 보인다.

먼저

layout > activity_main.xml 을 수정한다

TODO(1)부터 순서대로 고쳐가면 되기 때문에


exercise code

solution code 

 

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--TODO (1) Change the ConstraintLayout to a FrameLayout.
Note that you don't need to use the fully qualified name for FrameLayout. Replace
"android.support.constraint.ConstraintLayout" with "FrameLayout"-->
<!--TODO (6) Remove the line that declares the id, we don't need it-->
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent">

<!--TODO (2) Remove all attributes with the word constraint in them-->
<!--TODO (3) Remove the default text-->
<!--TODO (4) Give the TextView 16dp of padding-->
<!--TODO (5) Set the text size to 20sp-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="@+id/activity_main"
app:layout_constraintLeft_toLeftOf="@+id/activity_main"
app:layout_constraintRight_toRightOf="@+id/activity_main"
app:layout_constraintTop_toTopOf="@+id/activity_main" />

</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--COMPLETED (1) Change the ConstraintLayout to a FrameLayout-->
<!--COMPLETED (6) Remove the line that declares the id, we don't need it-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"
android:layout_height="match_parent">

<!--COMPLETED (2) Remove all attributes with the word constraint in them-->
<!--COMPLETED (3) Remove the default text-->
<!--COMPLETED (4) Give the TextView 16dp of padding-->
<!--COMPLETED (5) Set the text size to 20sp-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:textSize="20sp" />
</FrameLayout>

 

주석으로 된 TODO를 완료하면 COMPLETED로 바꿔주면 확인이 된다.


build.gradle 파일

: constraint-layout을 사용하지 않으므로 모듈을 사용한다는 정의는 제거(제거안해도 되지만 깔끔하게)

exercise

 solution

 

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'

defaultConfig {
applicationId "com.android.example.favoritetoys"
minSdkVersion 10
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.0'

// TODO (7) Remove the ConstraintLayout dependency
// as we aren't using it for these simple projects
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
}
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'

defaultConfig {
applicationId "com.android.example.favoritetoys"
minSdkVersion 10
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.0'
}

 


TODO를 모두 처리하고 App Build를 하면

다음과 같이 프로젝트 화면이 나온다. 별다른 특이점은 없다.

기본 layout을 framelayout으로 바꾼 것 뿐


Project Setup으로 나오는 것은 string.xml 에 app_name이 그리 되어있어서 임.


728x90
$ adb push app-debug.apk /data/local/tmp/com.beanandyu.myapplication

com.android.ddmlib.AdbCommandRejectedException: device unauthorized.

This adb server's $ADB_VENDOR_KEYS is not set

Try 'adb kill-server' if that seems wrong.

Otherwise check for a confirmation dialog on your device.

Error while Installing APK



위의 에러는 Android Device에서 USB Debugging을 허용하지 않았을 때에 발생한다.

해결방법은
Android device의 usb 연결을 뺏다가 다시 연결하면 pop up menu가 뜨면서
usb debugging 허용을 물어본다.

이 때, YES 를 선택하면 된다.

--
최초 debuggin 모드 설정 방법

- Settings 앱을 엽니다.
(Android 8.0 이상에만 해당) System을 선택합니다.
-아래로 스크롤하여 About phone을 선택합니다.
-아래로 스크롤하여 Build number를 7번 탭합니다.
-이전 화면으로 돌아가서 아래쪽의 Developer options를 찾습니다.
 Developer options 화면 상단에서 옵션 켜기와 끄기를 전환할 수 있습니다(그림 1). 이 기능을 계속 켜두고 싶을 수도 있습니다. 꺼진 경우에는, 기기와 개발용 컴퓨터 간에 통신이 필요없는 옵션을 제외한 대부분의 옵션이 비활성화됩니다.

그 다음 아래로 약간 스크롤하여 USB debugging을 활성화해야 합니다. 이렇게 하면 기기가 USB를 통해 연결될 때 Android Studio와 기타 SDK 도구들이 이 기기를 인식할 수 있기 때문에 개발자가 디버거와 기타 도구를 사용할 수 있습니다.

참고 : 개발자모드 활성
https://developer.android.com/studio/debug/dev-options?hl=ko

참고 : 위치서비스
https://developer.android.com/guide/topics/location/strategies#MockData

참고 : 에뮬레이터에 기본위치 설정
https://developer.android.com/studio/run/emulator#console




728x90

KAKAO Navi를 이용한 Application을 만드는 준비편


참조 : https://developers.kakao.com/docs/android/kakaonavi-api


카카오내비 앱을 호출하여 목적지까지 길안내를 할 예정인데

설정할 것듯이 좀 있다.


-- KAKAO Developer 에서 앱추가를 하여 application_key를 생성해야 한다.

-- open ssl 설치 필요

http://code.google.com/p/openssl-for-windows/downloads/list 접속
자신에 윈도우 비트에 맞는 최신버전 zip 파일 다운로드 (예: openssl-0.9.8k_X64.zip )
압축해제

openssl-0.9.8k_X64 폴더를 C:\로 이동

path설정: 내컴퓨터 오른쪽 버튼 > 속성 > 고급 시스템 설정 > 환경변수

 - JAVA_HOME

 - OPENSSL_HOME


커맨드창 open : 윈도우키 +R -> cmd 엔터

release_key_alias : myTestApp

release_keystore_path : C:\Users\내컴퓨터\.android\debug.keystore

keytool -exportcert -alias <release_key_alias> -keystore <release_keystore_path> | openssl sha1 -binary | openssl base64


keytool -exportcert -alias myTestApp -keystore C:\Users\내컴퓨터\.android\debug.keystore | openssl sha1 -binary | openssl base64

위 명령을 실행시키면

키저장소 비밀번호를 입력하라고 나오고

입력하면 해쉬키가 생성된다.

이것을 kakao developer의 해당 어플내 플랫폼을 클릭하면

키해쉬에 붙여넣고 저장.


위에서 생성한 것은 개발용이므로 배포할 때에는 release용으로 생성하여 추가하면 된다.




1. kakao_strings.xml 추가

app\src\main\res\values\kakao_strings.xml

내용

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="kakao_app_key">카카오 api에서 생성한 app_key</string>
</resources>


2. Gradle Scripts

gredle.properties

KAKAO_SDK_GROUP=com.kakao.sdk
KAKAO_SDK_VERSION=1.15.1


build.gradle(Project:app이름)에 추가

subprojects {
repositories {
mavenCentral()
maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }
}
}


build.gradle(Module:app)에 추가 - 필요한 kakao 서비스 추가

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha08'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'

// 카카오 로그인 sdk를 사용하기 위해 필요.
compile group: 'com.kakao.sdk', name: 'usermgmt', version: KAKAO_SDK_VERSION
//compile group: 'com.kakao.sdk', name: 'usermgmt', version: 1.15.1

// 카카오내비 sdk를 사용하기 위해 필요.
compile group: 'com.kakao.sdk', name: 'kakaonavi', version: KAKAO_SDK_VERSION
//compile group: 'com.kakao.sdk', name: 'kakaonavi', version: 1.15.1

}

 


준비는 끝남.

이후로는 Kakao developer의 가이드 대로 manifest.xml 추가 및 activity 추가해서 만들면 됨.


728x90

전자정부 프레임워크는 기본으로 회원전용 서비스이다.

로그인을 해야만 사용할 수 있는데 blog처럼 누구나 와서 읽을 수 있는 서비스를 하려고 하면 좀 복잡하다.


간단하게 *.do 형태로 호출되는 서비스와

*.bog 로 호출되는 서비스를 나누어서 *.blog에서는 로그인 체크를 안하면 된다.


추가방법.

web.xml 에 추가 : 기존에 action 이라는 servlet이 있으므로 그 밑에 추가

    <servlet>
        <servlet-name>blog</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/config/blog/springmvc/blog*.xml</param-value>
        </init-param>
        /
    </servlet>
    <servlet-mapping>
        <servlet-name>blog</servlet-name>
        <url-pattern>*.blog</url-pattern>
    </servlet-mapping>  


blog_servlet.xml 추가 : web.xml 에 정의된 경로에 추가


이것은 egov-com-servlet.xml 을 copy 한 것이고

기본 package 경로를 수정한다.

    <context:component-scan base-package="사용할package명.blog">
        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
    </context:component-scan> 

Java Source로 Controller, Service, Repository 등을 생성한다.

(일단은 Contoller만 만들어서 되는지 확인하자)

@Controller
public class BlogController {


    private ApplicationContext applicationContext;

    private static final Logger LOGGER = LoggerFactory.getLogger(BlogController.class);

    private Map<Integer, IncludedCompInfoVO> map;

    public void afterPropertiesSet() throws Exception {}

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
       
        LOGGER.info("BlogController setApplicationContext method has called!");
    }

    @RequestMapping("/index.blog")
    public String index(ModelMap model) {
        return "blog/BlogMain";
    }
 


index.blog 가 호출될 때 보여줄 jsp Page를 만든다

WEB-INF/jsp/blog/BlogMain.jsp

WEB-INF 밑에 index.jsp 에서

<jsp:forward page="/index.do"/> 를 호출하게 되어 있으므로

<jsp:forward page="/index.blog"/>로 바꾸어 준다.


728x90

전자정부 프레임워크로 프로젝트를 만들 때

1. 빈 프로젝트 에서 공통 컴포넌트들을 추가한다.

2. Template 프로젝트를 생성한 후 필요한 공통컴포넌트를 추가한다.

3. AllinOne 프로젝트를 생성한다.


2번의 경우에서 필요한 컴포넌트 추가하면 에러가 많이난다.

이유는 컴포넌트에 동일한 서비스가 이미 있는 경우가 있기 떄문이다.

RestdeManageService를 예로 들면

egovframework.com.sym.cal.service.impl/EgovCalRestdeManageServiceImpl

egovframework.let.sym.cal.service.impl/EgovCalRestdeManageServiceImpl

두개 파일이 동일한 @RestdeManageService 로 정의되어 있다.


그러면 어떤 것을 사용해야할 지 고민이 된다.

원본에는 let안에 있는데... com으로 바꿔야하나

아무튼 이런것들이 꽤 많다.

전자정부프레임워크 담당자는 빈 Web 프로젝트부터 시작하라고 한다.

http://www.egovframe.go.kr/uss/olh/qna/QnaInqireCoUpdt.do?qaId=QA_00000000000013099&passwordConfirmAt=


그래도 템플릿에서 시작하겠다고 하면

중복되는 애들의 @Controller, @Service, @Repository 를 하나를 없애고

참조하는 import 경로도 수정한다.


let가 기본인데 com으로 바꿀 때 import 를 수정하지 않으면 casting에러가 난다.

728x90

index 화면이 열리기까지의 과정이다.


1. globals.properties에 main page 경로 정의

(/egov_portal_shop/src/main/resources/egovframework/egovProps/globals.properties)

Globals.MainPage = /cmm/main/mainPage.do


2. controller 에서 정의

requestMapping의 value 에 Globals.MainPage 값을 넣어 준다.

각종 조회한 뒤 addAttribute로 넣은뒤

jsp로 넘긴다.("main/EgovMainView")

    @RequestMapping(value = "/cmm/main/mainPage.do")
    public String getMgtMainPage(HttpServletRequest request, ModelMap model)
      throws Exception{

        // 공지사항 메인 컨텐츠 조회 시작 ---------------------------------
        //model.addAttribute("notiList", map.get("resultList"));
        // 공지사항 메인컨텐츠 조회 끝 -----------------------------------

        // 자유게시판 메인 컨텐츠 조회 시작 ---------------------------------
        model.addAttribute("bbsList", bbsMngService.selectBoardArticles(boardVO, "BBSA02").get("resultList"));
        // 자유게시판 메인컨텐츠 조회 끝 -----------------------------------

        // FAQ 메인 컨텐츠 조회 시작 ---------------------------------
        //model.addAttribute("faqList", faqManageService.selectFaqList(searchVO));
        // FAQ 메인 컨텐츠 조회 끝 -----------------------------------

        // 설문참여 메인 컨텐츠 조회 시작 -----------------------------------
        //model.addAttribute("qriList", egovQustnrRespondInfoService.selectQustnrRespondInfoManageList(qVO));
     // 설문참여 메인 컨텐츠 조회 끝 -----------------------------------


        return "main/EgovMainView";
    }


3. jsp page

jsp Page에 대한 처리 정보는 servlet.xml 에서 한다

(/egov_portal_shop/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml)

    <!-- 화면처리용 JSP 파일명의  prefix, suffix 처리에 대한 mvc 설정  -->
    <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1"
    p:viewClass="org.springframework.web.servlet.view.JstlView"
    p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"/> 

기본으로 /WEB-INF/jsp/ 에 .jsp 파일을 설정해놨다


return "main/EgovMainView" 를 하게 되면

/WEB-INF/jsp/main/EgovMainView.jsp 파일을 찾는다.

(/egov_portal_shop/src/main/webapp/WEB-INF/jsp/main/EgovMainView.jsp)


하지만 이렇게 하면

호출되는 주소창에 다음과 같이 나온다.

http://localhost:8080/egov_portal/cmm/main/mainPage.do


깔끔하게 루트로 보내려면

다음과 같은 작업을 한다.

나만의 서비스이므로 package를 새로만든다. robsoft

하지만 spring에서 component-scan에 의해 정해진 package만 사용되므로

base-package인 egovframework를 붙인다.

(/egov_portal_shop/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml)

    <!-- 패키지 내 Controller, Service, Repository 클래스의 auto detect를 위한 mvc 설정 -->
    <context:component-scan base-package="egovframework">
        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
    </context:component-scan>


그래서 egovframework.rob.shop (shop은 내가 만들 모듈 명)으로 하고 controller class를 만든다.

egovframework.rob.shop.RobMainController


여기에 mainPage로 보낼 코드를 작성한다.

소스는 원래 있던 소스를 그대로 가져왔다.

    /**
     * 메인 페이지 조회
     * @return 메인페이지 정보 Map [key : 항목명]
     *
     * @param request
     * @param model
     * @exception Exception Exception
     */
    @RequestMapping(value = "/mainPage.do")
    public String getMgtMainPage(HttpServletRequest request, ModelMap model)
      throws Exception{

        // 공지사항 메인 컨텐츠 조회 시작 ---------------------------------
        model.addAttribute("notiList", map.get("resultList"));


        // 공지사항 메인컨텐츠 조회 끝 -----------------------------------

        // 자유게시판 메인 컨텐츠 조회 시작 ---------------------------------
        model.addAttribute("bbsList", bbsMngService.selectBoardArticles(boardVO, "BBSA02").get("resultList"));
        // 자유게시판 메인컨텐츠 조회 끝 -----------------------------------

        // FAQ 메인 컨텐츠 조회 시작 ---------------------------------
        model.addAttribute("faqList", faqManageService.selectFaqList(searchVO));
        // FAQ 메인 컨텐츠 조회 끝 -----------------------------------

        // 설문참여 메인 컨텐츠 조회 시작 -----------------------------------
        model.addAttribute("qriList", egovQustnrRespondInfoService.selectQustnrRespondInfoManageList(qVO));
     // 설문참여 메인 컨텐츠 조회 끝 -----------------------------------


        return "main/RobMainView";
    }
 


그 다음 jsp Page

prefix로 /WEB-INF/jsp 가 붙으므로 경로는 다음과 같다.

파일명에도 뒤에 .jsp가 붙는다.

/egov_portal/src/main/webapp/WEB-INF/jsp/main/RobMainView.jsp 

마찬가지로 내용은 원본인 EgovMainView.jsp와 동일하게 했다.


그리고 호출할 때 index.jap파일도 수정해야 한다.

/egov_portal_shop/src/main/webapp/index.jsp

기본으로 index.jsp를 찾게 되고 거기에서 mainPage.do로 forwarding을 한다.

/cmm/main/mainPage.do를 그냥 mainPage.do 로 바꾼다.

원본 : <script type="text/javaScript">document.location.href="<c:url value='/cmm/main/mainPage.do'/>"</script>

수정본 : <script type="text/javaScript">document.location.href="<c:url value='/mainPage.do'/>"</script>


이러면 바로

http://localhost:8080/egov_portal/ 을 하면 바로 mainPage.do로 보인다.

728x90

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)


[net.sf.log4jdbc.DriverSpy] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.


여러 원인이 있다.

1. tomcat의 실제 lib 결로에 mysql jar 파일을 넣으라고도 하고

2. 여러 프로젝트로 인해 꼬였으니 clean 후 다시 배포하라고도 하는데


나의 경우에는 2번인 듯 하다.

똑같은 Project 소스를 이름만 다르게 했는데..

하나를 close project 한뒤에

clean 하고 다시 배포했더니 된다. ㅡ.ㅡ


728x90

전자정부 프레임워크 All in one 에서

web_allinone.xml 을 수정했는데

갑자기 에러가 난다.

cvc-complex-type.2.3: Element 'web-app' cannot have character [children], because the type's content type is element-only.    web_allinone.xml    /allinone/src/main/webapp/WEB-INF    line 5    XML Problem


저 부분은 건드린 것이 없는데...

<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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"> 


1개의 element만 사용할 수 있다고 하는데

자세히 보면 xsi:schemaLocation에 두 개가 정의되어 있다.

그중에 xmlns:web에 똑같은 내용이 있어서

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd를 제거하니 오류가 없어진다.

<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"> 



728x90
BLOG main image
"그게 뭐 어쨌다는 거냐?" 늘 누가 나에게 나에대한 말을할 때면 이말을 기억해라. by nobang

카테고리

nobang이야기 (1933)
Life With Gopro (7)
Life With Mini (79)
Diary (971)
너 그거 아니(do you know) (162)
난 그래 (159)
Study (290)
속지말자 (10)
Project (34)
Poem (15)
Song (0)
Photo (113)
낙서장 (45)
일정 (0)
C.A.P.i (2)
PodCast (0)
nobang (27)
고한친구들 (4)
recieve (0)
History (0)
android_app (2)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

Total :
Today : Yesterday :