81,092
社区成员
发帖
与我相关
我的任务
分享
public class TopicAction {
private TopicService topicService = null;
private Topic topic = null;
private String key = null;
private List<File> files;
public void setTopicServoce(TopicService topicService) {
this.topicService = topicService;
}
public Topic getTopic() {
return topic;
}
public void setTopic(Topic topic) {
this.topic = topic;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public List<File> getFiles() {
return files;
}
public void setFiles(List<File> files) {
this.files = files;
}
public TopicAction(){
}
public void post(){
//HttpServletRequest request = ServletActionContext.getRequest();
System.out.println(key);
topicService.pubTopic(topic, files, key);
}
}
$.ajax({
url:'forum/postTopic.action',
type:'post',
data:
{ fid:1,author:'ljg',title:'test',content:'content',key:'ko'},
async :true,
success:function(data)
{
if(data=='success'){
alert('成功!');
}
}
});