디시인사이드 갤러리

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

갤러리 본문 영역

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

염불땐쓰갤로그로 이동합니다. 2011.08.25 01:11:37
조회 77 추천 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/07 - -
AD 디지털 액세서리 기간한정 세일! 운영자 25/07/11 - -
공지 프로그래밍 갤러리 이용 안내 [88] 운영자 20.09.28 45408 65
2871192 노래유튜버들은 롱런하기 힘든것같구나 헬마스터갤로그로 이동합니다. 20:52 7 0
2871191 현대차 비방글 올린 사람 아이디 rtOS인데 임베디드랑 관련있을지 모른다 [1] 발명도둑잡기(118.216) 20:52 13 0
2871190 오늘도 납골공원에 어르신들 바둑두시는구나 [4] 헬마스터갤로그로 이동합니다. 20:44 23 0
2871189 요즘시대에 스프링만으로는 살아남기 어렵지? [1] ㅇㅇ(118.235) 20:37 14 0
2871186 도로? ♥로스트미디어냥덩이♥갤로그로 이동합니다. 20:11 12 0
2871183 고졸 10년차 연봉 6500 질문받음 [3] 프갤러(14.51) 19:47 34 0
2871182 도로롱!! 이 세상을 구해조! ♥로스트미디어냥덩이♥갤로그로 이동합니다. 19:46 18 0
2871181 참 살기좋은나라 축복받은나라여 ㅋㅋㅋㅋ 뒷.통수한방(1.213) 19:39 12 0
2871180 싱글벙글 AI가 그린 코딩 고수...jpg [3] ㅇㅇ갤로그로 이동합니다. 19:25 40 0
2871179 나님 수학문제 내면 프갤에서 아무도 못맞춤 ㅇㅅㅇ ♥로스트미디어냥덩이♥갤로그로 이동합니다. 19:25 14 0
2871178 지인 우연히 마주쳤는데 돈 얼마나 범?? [2] 프갤러(124.50) 19:23 31 0
2871177 ❤✨☀⭐⚡☘♥+나님 시작합니당♥+☘⚡⭐☀✨❤ ♥로스트미디어냥덩이♥갤로그로 이동합니다. 19:22 10 0
2871175 ❤✨☀⭐⚡☘♥+나님 시작합니당♥+☘⚡⭐☀✨❤ ♥로스트미디어냥덩이♥갤로그로 이동합니다. 19:14 10 0
2871173 2재명도 이렇게 되려나 ㅋㅅㅋ ♥로스트미디어냥덩이♥갤로그로 이동합니다. 19:09 16 0
2871171 ❤✨☀⭐⚡☘♥+나님 시작합니당♥+☘⚡⭐☀✨❤ ♥로스트미디어냥덩이♥갤로그로 이동합니다. 19:04 10 0
2871170 esp32용 구형 macos 에뮬레이터 발명도둑잡기(118.235) 19:01 12 0
2871169 지금까지 구직 사이트를 한 번도 써본 적이 없음. [2] 프갤러(211.234) 18:54 47 0
2871167 큰거 온당! ♥로스트미디어냥덩이♥갤로그로 이동합니다. 18:47 25 0
2871166 인물이 싫더라도 공은 공이고 과는 과인데 진짜 미안한데 두창이는 [1] ㅆㅇㅆ(124.216) 18:46 44 2
2871164 가장 간단한 8비트 6502 브레드보드 컴퓨터 [1] 발명도둑잡기(118.235) 18:43 17 0
2871163 전라도 홍어 기생충 [1] ♥로스트미디어냥덩이♥갤로그로 이동합니다. 18:42 21 0
2871162 이번 상법개정안은 이전에 IMF랑 OECD에서 권고했던 사안인데 ㅆㅇㅆ(124.216) 18:42 27 0
2871161 걍 좌우 떠나서 찢<<그나마 뭐 할려고 하는듯 임기초 괜찮아보이는데 ㅆㅇㅆ(124.216) 18:40 34 1
2871160 애플1 브레드보드 구현 [1] 발명도둑잡기(118.235) 18:38 20 0
2871159 '주학년 & 아스카 키라라' 영상 뜸 ㄷㄷㄷ 프갤러(211.58) 18:38 13 0
2871157 앞에 부러운 커플이 있네 [2] 발명도둑잡기(118.235) 18:33 32 0
2871156 '김계란 얼굴 공개했네요ㅋㅋ 프갤러(211.58) 18:29 25 0
2871155 씹덕 학원물 청춘 애니 보고 있는데 [2] 아스카영원히사랑해갤로그로 이동합니다. 18:29 38 0
2871152 근데 확실한 건 윤보다 찢이 낫다는 거임 [4] 아스카영원히사랑해갤로그로 이동합니다. 18:17 58 0
2871150 GPT 시발년 개빡세노 ㅋㅋ [1] ←Backspace갤로그로 이동합니다. 18:15 44 0
2871149 오늘하루도 코딩을 열심히하였다 ㅆㅇㅆ(124.216) 18:14 15 0
2871143 코드구조를 잘짜는 수련? 은 어떻게해야할까요 [1] 프갤러(125.240) 17:57 33 0
2871142 Building a breadboard MSX computer 발명도둑잡기(118.235) 17:56 11 0
2871141 A Simple-as-Possible 8-bit Breadboard Co 발명도둑잡기(118.235) 17:54 11 0
2871139 6년전에 썼던 한페이지 짜리 코딩 msnr갤로그로 이동합니다. 17:53 36 0
2871136 여자친구랑 배드민톤 치고싶다 발명도둑잡기(118.235) 17:41 20 0
2871135 세계 바둑 순위 발명도둑잡기(118.235) 17:40 15 0
2871132 물 속에서 꺼낸 충격의 물고기 발명도둑잡기(118.235) 17:33 13 0
2871131 결국 웹앱개발이 도태되고 임베디드가 승리하는군 네오커헠(211.235) 17:32 27 0
2871129 방 치웠더니 등이 아프구나 발명도둑잡기(118.235) 17:30 10 0
2871128 내 나이 46살, 30대 여성과 사귀고싶다 발명도둑잡기(110.70) 17:26 18 0
2871126 바이브코딩이 ㅈㄴ 열받는 이유 프갤러(115.138) 16:29 56 0
2871125 제조업 MFC 쓰는 이유 [4] 피자2021(58.235) 16:24 50 0
2871124 2재명 좌파정부 여가부장관 후보 부정비리갑질 의혹 연이어 터져 특검 필요 ♥로스트미디어냥덩이♥갤로그로 이동합니다. 16:23 19 0
2871123 흠.. 그런겅강.. 기계적 리듬으로 안됭 ♥로스트미디어냥덩이♥갤로그로 이동합니다. 16:20 15 0
2871122 [IT산업] AI 개발자가 가능하다면 설계는 어떻게 될까?.. [2] +abcd3421갤로그로 이동합니다. 16:17 33 0
2871120 왜 장비제어 프로그램은 다 MFC인가요? [3] 노력하는자갤로그로 이동합니다. 15:50 56 0
2871119 의외의 방법으로 피부상태 되살린달글 ㅇㅇㅇㅇ(124.198) 15:49 16 0
2871117 인생 망했다 [1] 피자2021(58.235) 15:03 32 1
뉴스 ‘슈퍼 루키’ 조째즈, 오늘(11일) 신곡 ‘한잔의 노래’ 발매! 디시트렌드 07.11
갤러리 내부 검색
제목+내용게시물 정렬 옵션

오른쪽 컨텐츠 영역

실시간 베스트

1/8

뉴스

디시미디어

디시이슈

1/2