Exemplo n.º 1
0
  public String topicbuilt() {
    System.out.println("--------------topicbuilt-----------");
    User u = new User();
    u = (User) this.request.getSession().getAttribute("user_");

    this.topic = new Topic();
    this.topic.setTitle(this.binfo.getTopictitle());
    this.topic.setContent(this.binfo.getTopiccontent());
    this.topic.setDate(CONSTANT.getNowTime());
    this.topic.setAuther(u.getId());
    this.topic.setAuthername(u.getUsername());
    this.topic.setLastupdate(this.topic.getDate());
    System.out.println("topic---------------" + this.topic.toString());
    try {
      bm.add(this.topic);
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }
    this.alltopiclist();
    return "built";
  }