디시인사이드 갤러리

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

갤러리 본문 영역

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

염불땐쓰갤로그로 이동합니다. 2011.08.25 01:11:37
조회 75 추천 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/06/30 - -
411555 멋잇어서 프로그래밍 입문하면 힘듬? [5] 응가(121.175) 14.03.10 188 0
411554 목표 [3] 이웃집힘법사갤로그로 이동합니다. 14.03.10 103 0
411552 나대는법 [2] 이웃집힘법사갤로그로 이동합니다. 14.03.09 873 0
411551 집에서 혼자 프로그램 짜서 먹고 살려면 무슨 언어가 좋음? [6] ㄹㄹ(96.44) 14.03.09 222 0
411550 겨울왕국-태어나서 처음으로 [2] 에어로홍갤로그로 이동합니다. 14.03.09 106 0
411549 초봉 3천 밑으로 받으러간다 [3] dot(39.119) 14.03.09 777 0
411548 프갤럼들 현실 [2] 백마탄왕자^^갤로그로 이동합니다. 14.03.09 115 0
411547 프갤횽들 안드로이드 디자인 긴급 질문ㅠㅠㅠㅠ 살려줘 [2] sdfsfsd(175.193) 14.03.09 75 0
411546 자바입문한 초보인데요 자바초보(59.23) 14.03.09 118 0
411544 콜렉터란 영화 재밌냐? [3] 에어로홍갤로그로 이동합니다. 14.03.09 227 0
411542 아 학ㅇ교가기 싫다 [2] 중3(203.226) 14.03.09 88 0
411541 프로그래밍은 대가리 안되면 접어야함? [5] ㅇㅇ(121.175) 14.03.09 205 1
411540 좆됬다 프로그래밍 접을까 [4] ㅇㅇ(121.175) 14.03.09 166 0
411539 ※ 지금까지본 or 이름만 아는 애니 목록 ※ [5] 이웃집힘법사갤로그로 이동합니다. 14.03.09 338 0
411538 내 꿈이 ACM - ICPC에 출전하는 건데 ㅋㅋ 허세갑(59.23) 14.03.09 95 0
411537 아래 글 보고 생각난건데 (질문) [1] 좆병신(121.175) 14.03.09 150 0
411536 돈 버는 법 알려준다 [6] 에어로홍갤로그로 이동합니다. 14.03.09 205 0
411535 그럼 html 알면 자바 안하고 jsp 해도 됨? [3] ㅇㅇ(222.112) 14.03.09 125 1
411534 자바하고 jsp 해야되냐 jsp만 해도 되냐? [1] ㅇㅇ(222.112) 14.03.09 90 0
411533 요즘 언어 시작할때는 뭐가 좋나요?? [2] ㅇㅇ(116.123) 14.03.09 101 0
411531 난 누가 뭐래도 조금 전에 포인터 질문을 이해한 것이 자랑스럽다! 허세갑(59.23) 14.03.09 62 0
411530 다이어트 성공하면 인생이 달라진다던데 [4] 에어로홍갤로그로 이동합니다. 14.03.09 103 0
411529 너네 4d 구현같은거 할 수 잇겟음? [8] 333(27.117) 14.03.09 124 0
411527 정보보안기사는 뭐 하는 직업? 그리고 이거 맞음ㅁ? (121.175) 14.03.09 298 0
411525 아씨ㅡ발 심야자율학습 dd(39.121) 14.03.09 41 0
411522 데이터 어 라이브 이웃집힘법사갤로그로 이동합니다. 14.03.09 72 0
411521 포인터 관련 질문 아직 이해 못한 사람은 보세요 ㅋㅋㅋ 허세갑(59.23) 14.03.09 79 0
411520 돠주세요ㅜㅜ [8] 개빡(211.36) 14.03.09 104 0
411519 프로그래밍 배워서 이상한것만 하고 있다 ㅡㅡ [7] ㅁㅈㄷㄹ(134.219) 14.03.09 2982 26
411518 부싱 손해보지 않게 알아보기 ㅇㅇ(218.36) 14.03.09 68 0
411516 학생들이 많은거같아서 조언 몇가지 해주고감. [8] 123(118.37) 14.03.09 358 0
411515 진세연한테 겁탈 당하고 싶습니다 에어로홍갤로그로 이동합니다. 14.03.09 147 0
411514 [자료구조/알고리즘] 나 대가리 빠가라서 그런가 이 문제 모르겠어 [9] ㅄㅜㅜ(49.143) 14.03.09 318 0
411512 근대 왜 C언어 입문자 책에는 항상 메인함수에 int main(void) [5] 강유현갤로그로 이동합니다. 14.03.09 211 0
411510 int형을 float포인터로 저장한거에 몇명이달라붙는거냐 에휴.. [4] 3(114.201) 14.03.09 114 0
411509 고딩때 잠깐잠깐 프로그래밍하는거 어디까지가 괜찮음? [2] 이웃집힘법사갤로그로 이동합니다. 14.03.09 325 0
411508 엑셀의 신이 되고 싶다 [6] 슈슈(117.55) 14.03.09 186 0
411507 프갤 사람 없는 거 같더만 진짜 많네 [2] (121.175) 14.03.09 82 0
411506 프로그래밍 길잡이 같은 책은 없나요? 오빵~♥ [1] (121.175) 14.03.09 83 0
411505 믿을건프갤밖에..해결되면 핏자 쏩니다 [2] 믿을건프갤(203.243) 14.03.09 87 0
411504 공부할 거 존나 많네 (121.175) 14.03.09 59 0
411503 치나츄횽 덕분에 팀파운데이션서버 찾아봤는데 공짜네 불고기브라더갤로그로 이동합니다. 14.03.09 73 0
411502 새싹제거의 책 스샷을 보니.. [3] de(115.22) 14.03.09 225 0
411501 졸업하고 국비지원 학원 다니고 있음... [3] SPlCA갤로그로 이동합니다. 14.03.09 381 0
411500 형들 아까 포인터 문제 진짜 왜 이럼? [2] 허세갑(59.23) 14.03.09 86 0
411499 난 컴파일러 공부할 때 책 반만보고 밖에 던져버렸다. [4] 이웃집힘법사갤로그로 이동합니다. 14.03.09 134 0
411497 에어로홍 성님 중고책 재고/가격 문의여 [9] 호석갤로그로 이동합니다. 14.03.09 202 0
411495 나같이 컴파일러만 졸라게 파는 넘들 없음? [2] 이웃집힘법사갤로그로 이동합니다. 14.03.09 110 0
411494 돈벌기힘들ㄹ다 ◕‿◕갤로그로 이동합니다. 14.03.09 68 0
411493 책 보지마라. [9] 123(118.37) 14.03.09 193 0
뉴스 활동 중단한 ‘뉴진스’ 다니엘, 이른 새벽 박보검과 함께했다 디시트렌드 07.01
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2