디시인사이드 갤러리

갤러리 이슈박스, 최근방문 갤러리

갤러리 본문 영역

좆뉴비.ㅜㅜ 형들한테 질문좀 할게요.

염불땐쓰갤로그로 이동합니다. 2011.08.25 01:11:37
조회 79 추천 0 댓글 3

java 소스

==================================================================================================================
import java.util.ArrayList;
import java.util.HashMap;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


import common.Constants;
import common.component.IComponent;
import common.util.HttpUtil;


import db.Dao;


public class CompanyInfoSearch implements IComponent{


 private String forward유알엘 = null;
 
 public CompanyInfoSearch(){}
 
 public CompanyInfoSearch(String forwar유알엘l){
  this.forward유알엘 = forward유알엘;
 }
 
 public String doComponent(HttpServletRequest req, HttpServletResponse res)throws Exception {
  
  HttpSession session = null;
  String cpId   = null;


  
  try{
            System.out.println("");
   session = req.getSession();
   cpId = (String)session.getAttribute(Constants.LOGIN_ID);
   
   if(cpId == null || cpId.length() == 0){
    
    req.setAttribute("url", this.forward유알엘);
    return Constants.HOMEPAGE_LOGIN_PAGE;
   
   }
   
   long rownum     = 0;
   int rowCount    = 10;
   int navigatorCount   = 10;
   int currentPage    = 1;
   
    HashMap<String, Object> parameter = new HashMap<String, Object>();
    
    parameter.put("cpId",   cpId);
    parameter.put("searchItem",  HttpUtil.getParameter(req, "companyInfoSearchItem"));
    parameter.put("searchKeyword",  HttpUtil.getParameter(req, "companyInfoSearchKeyword"));
    parameter.put("typeOfBusiness", req.getParameterValues("typeOfBusiness"));
    parameter.put("companyType",  req.getParameterValues("companyType"));
    parameter.put("establishDate",  req.getParameterValues("establishDate"));
    parameter.put("employeeCnt",  req.getParameterValues("employeeCnt"));
    parameter.put("rowCount",    rowCount);
    parameter.put("currentPage",  HttpUtil.getParameter(req, "companyInfoCurrentPage"));
  
    Integer maxNoInteger = (Integer)Dao.selectForObject("cp.companyInfoTableSelectForMaxNo", parameter);
    int maxNo = maxNoInteger.intValue();
    
    if(HttpUtil.getParameterIntValue(req, "companyInfoRownum") == 0)
     
     parameter.put("rownum", maxNo);
    else
     parameter.put("rownum", HttpUtil.getParameterIntValue(req, "companyInfoRownum"));
    
    ArrayList<HashMap<String, Object>> companyInfoList = (ArrayList<HashMap<String, Object>>)Dao.selectForList("cp.companyInfoTableSelectForBoard", parameter);   
    
    req.setAttribute("companyInfoList",       companyInfoList);
    req.setAttribute("companyInfoMaxNo",      maxNo);
    req.setAttribute("companyInfoCurrentPage",  HttpUtil.getParameterIntValue(req, "companyInfoCurrentPage"));
    req.setAttribute("companyInfoSearchItem",  parameter.get("searchItem"));
    req.setAttribute("companyInfoSearchKeyword", parameter.get("searchKeyword"));
    req.setAttribute("typeOfBusiness",     req.getParameterValues("typeOfBusiness"));
    req.setAttribute("companyType",     req.getParameterValues("companyType"));
    req.setAttribute("establishDate",     req.getParameterValues("establishDate"));
    req.setAttribute("employeeCnt",     req.getParameterValues("employeeCnt"));
   
  } catch(Exception ex){
   throw ex;
  }
  
  return this.forward유알엘l;
 }
 
}
==================================================================================================================

jsp 소스
==================================================================================================================




<table width="100%" class="" cellpadding="0" cellspacing="0">
 <tr>
  <td colspan="2" height="1" style="padding:0;" bgcolor="#E9E9E9">
   <table width="770px" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <th >업      종 :</th>
    <td><input type="checkbox" name="typeOfBusiness" value="1" >서비스·교육·금융·유통 </td>
    <td><input type="checkbox" name="typeOfBusiness" value="2" />미디어·광고·문화·예술 </td>
    <td><input type="checkbox" name="typeOfBusiness" value="3" />IT·정보통신 </td>
    <td><input type="checkbox" name="typeOfBusiness" value="4" />제조·통신·화학·건설 </td>
    <td colspan="2"> </td>
   <tr>
   <tr>
    <th >기업유형 :</th>
    <td><input type="checkbox" name="companyType" value="대기업" />대기업</td>
    <td><input type="checkbox" name="companyType" value="공기업" />공기업</td>
    <td><input type="checkbox" name="companyType" value="코스닥등록" />코스닥등록</td>
    <td><input type="checkbox" name="companyType" value="외국계" />외국계</td>
    <td><input type="checkbox" name="companyType" value="일반기업" />일반기업</td>
    <td> </td>
   </tr>
   <tr>
    <th >설립년수 : </th>
    <td><input type="checkbox" name="establishDate" value="1" />5년 미만</td>
    <td><input type="checkbox" name="establishDate" value="2" />5~9년</td>
    <td><input type="checkbox" name="establishDate" value="3" />10~19년</td>
    <td><input type="checkbox" name="establishDate" value="4" />20~29년</td>
    <td><input type="checkbox" name="establishDate" value="5" />30년 이상</td>
    <td> </td>
   </tr>
   <tr>
    <th >임직원수 : </th>
    <td><input type="checkbox" name="employeeCnt" value="1" />10명 미만 </td>
    <td><input type="checkbox" name="employeeCnt" value="2" />11~19명</td>
    <td><input type="checkbox" name="employeeCnt" value="3" />20~49명</td>
    <td><input type="checkbox" name="employeeCnt" value="4" />50~99명</td>
    <td><input type="checkbox" name="employeeCnt" value="5" />100명 이상</td>
    <td>
     <a href=":search()">
      <img src="" alt="검색">
     </a>
    </td>
   </tr>
   </table>
  </td>
  </tr>
</table>

==================================================================================================================


<td><input type="checkbox" name="typeOfBusiness" value="1" >서비스·교육·금융·유통 </td>
    <td><input type="checkbox" name="typeOfBusiness" value="2" />미디어·광고·문화·예술 </td>
    <td><input type="checkbox" name="typeOfBusiness" value="3" />IT·정보통신 </td>
    <td><input type="checkbox" name="typeOfBusiness" value="4" />제조·통신·화학·건설 </td>

같은 name의 체크박스 체크한 것들을 getParameterValues로 받아와서 처리하고
다시 jsp로 체크했던 체크박스를 자동으로 체크해줘야하는데( 체크박스 체크상태 유지) jsp 에서 어떻게 받아서 처리해할지 모르겠어요.ㅜㅜ
도움좀 부탁드릴게요. ㅜㅜ



추천 비추천

0

고정닉 0

0

댓글 영역

전체 댓글 0
본문 보기

하단 갤러리 리스트 영역

왼쪽 컨텐츠 영역

갤러리 리스트 영역

갤러리 리스트
번호 제목 글쓴이 작성일 조회 추천
설문 반응이 재밌어서 자꾸만 놀리고 싶은 리액션 좋은 스타는? 운영자 25/07/28 - -
AD 휴대폰 액세서리 세일 중임! 운영자 25/07/28 - -
269042 횽들 나 프로젝트 주제 결정되가는 분위기에요 [3] +어게인갤로그로 이동합니다. 11.09.02 92 0
269041 출근~ [1] Kanon갤로그로 이동합니다. 11.09.02 32 0
269038 동영상 캡쳐가 안되네 [1] 21211(61.255) 11.09.02 70 0
269037 으아. . 운■지갤로그로 이동합니다. 11.09.02 35 0
269036 앜 오늘은 공부끝 [13] 뇌지랄갤로그로 이동합니다. 11.09.02 187 0
269034 입갤과 동시에 퇴갤 y녀6디리(218.146) 11.09.02 95 0
269032 프갤 형들아 블앤소 계정좀 빌려줘요 징징 elwlwlwk갤로그로 이동합니다. 11.09.02 53 0
269030 이 무한잉크 쩐다 부왘! [3] 분당살람갤로그로 이동합니다. 11.09.02 104 0
269029 이직한 횽들 조언좀 해줘 [4] ㄱㄱ(112.214) 11.09.02 63 0
269027 형들 이노트북괜찬은지좀봐줘~ asdf(210.107) 11.09.02 50 0
269026 getch() 사용법에 대해서 [2] 찌르매미(203.229) 11.09.02 197 0
269025 이런건 어떠냐 자동으로 인간의 욕구를 포착하는 시스템 김토끼(219.251) 11.09.02 54 0
269024 다들좋은밤 [1] 三didas갤로그로 이동합니다. 11.09.02 56 0
269023 작은 거인의 절규 // 2011 09. 02 -CCCC- [24] CCCC(121.172) 11.09.02 168 0
269021 형들 도와줘 리눅스 설치했는데 잘못해서 윈도우 날아갔어 [4] 네이버ㅋ갤로그로 이동합니다. 11.09.02 88 0
269020 스트럿츠를 누가써. 초자바디언(219.251) 11.09.02 65 0
269017 블소 후기.jpg [10] blackd갤로그로 이동합니다. 11.09.02 320 0
269016 형들 나좀 도와줘 찌르매미(203.229) 11.09.01 41 0
269015 아래 항봉무녀를 검색한후 [2] RUMO(121.175) 11.09.01 132 0
269014 엔씨가 드디어 맛이갔구나. [3] 초자바디언(219.251) 11.09.01 173 0
269013 오늘 학교에서 교수님과 취업 관련해서 이야기를 해봤는데 [1] 막장갤신학생갤로그로 이동합니다. 11.09.01 128 0
269010 우왕; 박근혜의 배다른 언니가 있었구나; ㅇ.ㅇ(61.33) 11.09.01 369 0
269008 형들 인터넷강좌 윈미플로 재생되면 [1] 카이린(110.47) 11.09.01 53 0
269007 나도 블앤소 하고싶다 [1] elwlwlwk갤로그로 이동합니다. 11.09.01 71 0
269006 공부방향 설정좀 [3] 역발산기개세갤로그로 이동합니다. 11.09.01 82 0
269004 클베 당첨된 친구가 블소 아디 빌려줌 ㅎㅎㅎ [1] blackd갤로그로 이동합니다. 11.09.01 95 0
269003 안처르수 이모군(175.114) 11.09.01 59 0
269002 우리나라 SI다이럼? 꼭 댓글점 [8] ㅇㅈㅇ갤로그로 이동합니다. 11.09.01 285 0
269001 혹시 말이야 예전에 어떤횽이 올렸던 실시간 Html 코딩 링크아는 횽? [4] 어떡해갤로그로 이동합니다. 11.09.01 50 0
268998 인디 게임 만들기 편한 언어? [11] ㅁㄴ(210.107) 11.09.01 339 0
268996 이제 운동갈시간 [3] 뇌지랄갤로그로 이동합니다. 11.09.01 84 0
268991 다이나 리눅스 한국 정복 방안 [2] 분당살람갤로그로 이동합니다. 11.09.01 88 0
268990 부왘 입체도형 [3] 뇌지랄갤로그로 이동합니다. 11.09.01 127 0
268988 플래시 액션스크립트 2.0좀물어볼께 [1] laoshanlong갤로그로 이동합니다. 11.09.01 55 0
268986 나 배열에 푹 빠져있는데 [6] 차도컴공남갤로그로 이동합니다. 11.09.01 82 0
268985 WD 하드 디스크 개객끼!!!!!!!!! [1] 거칠게갤로그로 이동합니다. 11.09.01 67 0
268983 하반기 공채 [4] (211.177) 11.09.01 168 0
268980 64비트 윈도우 7 깔았는데 아이툰즈가 안깔린다 ;ㅅ; [1] 거칠게갤로그로 이동합니다. 11.09.01 215 0
268978 배열 질문하나만 하자 [7] 차도컴공남갤로그로 이동합니다. 11.09.01 91 0
268977 지잡 of 지잡의 위엄 [6] 탐라국(121.159) 11.09.01 268 0
268976 프로그래밍 관련 블로그보면 [1] Ren7갤로그로 이동합니다. 11.09.01 122 0
268975 C 콘솔 입력 질문. [4] (211.177) 11.09.01 122 0
268974 삼성이 좆씨발 개객끼인걸 이제 알았냐?? [2] 거칠게갤로그로 이동합니다. 11.09.01 147 0
268973 삼성다니면 [1] 카이루갤로그로 이동합니다. 11.09.01 111 0
268972 그래도 한국이 쩌는건 닦달하면 뭔가가 나오기 떄문이 아닐가 [2] ㅇㅇ(61.77) 11.09.01 90 0
268970 자꾸 삼성 얘기하니까 삼성전자 간 내 친구 생각난다... [3] 분당살람갤로그로 이동합니다. 11.09.01 234 0
268967 영어실력 중급만 되도 일상생활하는데는 지장없냐??? [6] 컴돌이(180.227) 11.09.01 178 0
268966 나 배열하는데 이것좀 봐주라 C다 [5] 차도컴공남갤로그로 이동합니다. 11.09.01 102 0
268965 삼성 십샥쿠들 [2] 분당살람갤로그로 이동합니다. 11.09.01 101 0
268961 우리 모두 HP 정품 잉크를 애용합시다 [5] 분당살람갤로그로 이동합니다. 11.09.01 78 0
뉴스 결혼 발표한 ‘신화’ 이민우, 뒤늦게 알려진 ‘결별 소식’ 디시트렌드 07.31
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2