报500错误提示jsp没有找到int类型什么的

求大佬帮我看看这是什么问题。

四月 30, 2019 2:06:38 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/New] threw exception [javax.el.PropertyNotFoundException: Property 'uid' not found on type java.lang.Integer] with root cause
javax.el.PropertyNotFoundException: Property 'uid' not found on type java.lang.Integer
    at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:291)
    at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:243)
    at javax.el.BeanELResolver.property(BeanELResolver.java:378)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:97)
    at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104)
    at org.apache.el.parser.AstValue.getValue(AstValue.java:184)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
    at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:950)
    at org.apache.jsp.user.userinfo_jsp._jspService(userinfo_jsp.java:154)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:472)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:319)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)


3个回答

感觉是uid这个参数在转换的时候类型不正确导致的错误,检查下代码看看。

qq_43764144
qq_43764144 好的,谢谢
大约一年之前 回复

类型定义有误,不是int包装类型

qq_43764144
qq_43764144 我找找,谢谢
大约一年之前 回复

整形是没有uid这个属性的

你看下,哪里写错了,应该是实体类.uid,而不是实体类的属性.uid

weixin_45000109
宜蓁李
大约一年之前 回复
weixin_45000109
宜蓁李
大约一年之前 回复
qq_43764144
qq_43764144 行,我找找看,谢谢
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
jsp页面向后台提交的数据如何转换类型

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <%@ include file="/common/global.jsp"%> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>查询列表</title> <script> //添加 function toAdd(){ window.location='${path}/mj_car_statusManagerController/toAdd.do'; } //删除 function toRemove(){ var ids=getSelectedRowsIds('Mj_car_statusManagerList'); if(ids){ top.showConfirmDiaglog('提示','删除数据不可恢复,确定要删除吗?',function(){ //关闭事件 refleshData('Mj_car_statusManagerList'); },function(){ //确认事件 $.post('${path}/mj_car_statusManagerController/deleteById.do?ids='+ids,function(data){ var json=$.parseJSON(data); if(json.success){ top.showArtDiaglog('提示','删除成功',function(){ //关闭事件 refleshData('Mj_car_statusManagerList'); },function(){ //确定事件 top.closeDialog(); }); }else{ top.showArtDiaglog('提示','删除失败',function(){ //关闭事件 },function(){ //确定事件 top.closeDialog(); }); } }); }); }else{ top.showArtDiaglog('提示','请选择一条数据进行操作',null,function(){ top.closeDialog(); }); } } //编辑 function toEdit(){ var selected=getSelectedRowsArr('Mj_car_statusManagerList'); if(selected.length>0&&selected.length<2){ window.location='${path}/mj_car_statusManagerController/editById.do?id='+selected; }else{ //提示信息 top.showArtDiaglog('提示','请选择一条数据进行操作',null,function(){ top.closeDialog(); }); } } //查看 function toInfo(){ var selected=getSelectedRowsArr('Mj_car_statusManagerList'); if(selected.length>0&&selected.length<2){ window.location='${path}/mj_car_statusManagerController/findById.do?id='+selected; }else{ top.showArtDiaglog('提示','请选择一条数据进行操作',null,function(){ top.closeDialog(); }); } } //设置查询参数 function postQueryParams(params) { var queryParams = $("#searchForm").serializeObject(); queryParams.limit=params.limit; queryParams.offset=params.offset; return queryParams; } //查询列表 function queryList(){ $('#Mj_car_statusManagerList').bootstrapTable('refresh'); } function dataChange(){ var data; var carState=$('#carStatus').val(); if(carState=="正常"){ data=1; }else{ data=0; } queryList(); } function editById(id){ window.location='${path}/mj_car_statusManagerController/editById.do?id='+id; } //根据id删除 function deleteById(id){ top.showConfirmDiaglog('提示','删除数据不可恢复,确定要删除吗?',function(){ //关闭事件 refleshData('Mj_car_statusManagerList'); },function(){ //确认事件 $.post('${path}/mj_car_statusManagerController/deleteById.do?ids='+id,function(data){ var json=$.parseJSON(data); if(json.success){ top.showArtDiaglog('提示','删除成功',function(){ //关闭事件 refleshData('Mj_car_statusManagerList'); },function(){ //确定事件 top.closeDialog(); }); }else{ top.showArtDiaglog('提示','删除失败',function(){ //关闭事件 },function(){ //确定事件 top.closeDialog(); }); } }); }); } //根据id查看 function viewById(id){ window.location='${path}/mj_car_statusManagerController/findById.do?id='+id; } //操作工具栏 function operatorFormatter(value, row, index) { var operator=""; <shiro:hasPermission name="Mj_car_statusManager:edit"> operator+='<button class="btn btn-warning btn-round btn-xs" onclick="editById(\''+row.id+'\');"><i class="glyphicon glyphicon-pencil"></i> 修改</button>&nbsp;&nbsp;'; </shiro:hasPermission> <shiro:hasPermission name="Mj_car_statusManager:info"> operator+='<button class="btn btn-success btn-round btn-xs" onclick="viewById(\''+row.id+'\')"><i class="glyphicon glyphicon-list-alt"></i>详情</button>&nbsp;&nbsp;'; </shiro:hasPermission> <shiro:hasPermission name="Mj_car_statusManager:remove"> operator+='<button class="btn btn-danger btn-round btn-xs" onclick="deleteById(\''+row.id+'\')"><i class="glyphicon glyphicon-trash"></i>删除</button>'; </shiro:hasPermission> return operator; } //状态 function statusFormatters(value,row,index){ if(value=='0'){ return '<span>异常</span>'; }else if(value=='1'){ return '<span>正常</span>'; }else{ return ""; } } </script> </head> <body> <div class="place"> <span>位置:</span> <ul class="placeul"> <li><a href="#">首页</a></li> <li><a href="#">数据表</a></li> <li><a href="#">基本内容</a></li> </ul> </div> <div class="rightinfo"> <div> <form id="searchForm" name="searchForm" method="post"> <label>车辆状态描述:</label><input type="text" id="carStatus" name="carStatus" class="txtSearch">&nbsp; <input type="button" id="carStatus" class="btn btn-info btn-round" value="查询" onclick="dataChange()">&nbsp;&nbsp; <input type="button" class="btn btn-warning btn-round" value="重置" onclick="$('#searchForm')[0].reset();"> </form> </div> <div id="toolbar" class="btn-group"> <shiro:hasPermission name="Mj_car_statusManager:add"> <button class="btn btn-info btn-round" onclick="toAdd();"> <i class="glyphicon glyphicon-plus"></i>添加 </button> </shiro:hasPermission> <shiro:hasPermission name="Mj_car_statusManager:edit"> <button class="btn btn-warning btn-round" onclick="toEdit();"> <i class="glyphicon glyphicon-pencil"></i> 修改 </button> </shiro:hasPermission> <shiro:hasPermission name="Mj_car_statusManager:info"> <button class="btn btn-success btn-round" onclick="toInfo()"> <i class="glyphicon glyphicon-list-alt"></i>详情 </button> </shiro:hasPermission> <shiro:hasPermission name="Mj_car_statusManager:remove"> <button class="btn btn-danger btn-round" onclick="toRemove()"> <i class="glyphicon glyphicon-trash"></i>删除 </button> </shiro:hasPermission> </div> <table id="Mj_car_statusManagerList" data-toggle="table" data-url="${path}/mj_car_statusManagerController/list.do" data-pagination="true" data-side-pagination="server" data-cache="false" data-query-params="postQueryParams" data-page-list="[10, 15, 20, 30, 50,100]" data-method="post" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-toolbar="#toolbar" data-click-to-select="true" data-single-select="false" data-striped="true" data-content-type="application/x-www-form-urlencoded"> <thead> <tr> <th data-field="" data-checkbox="true"></th> <th data-field="carName">车辆名称概述</th> <th data-field="carStatus" data-formatter="statusFormatters">车辆状态描述</th> <th data-field="operator" data-formatter="operatorFormatter">操作</th> </tr> </thead> </table> </div> </body> </html> 我想做一个查询,但是前台是显示文字:正常,异常,,,数据库存的是0,1代号, 问题是我现在提交的文字后台数据库也提取不了啊,如何做转换

Spring Mvc 没有提取到值报500的错误

先看看我的代码吧 我是新手 所以有好多部懂的 首先是从jsp中获取 saveGb80的地址 @ResponseBody @RequestMapping(value = "saveGb80.ajax", method = RequestMethod.POST, produces = { "application/json;charset=UTF-8" }) public String saveGb80(String agb800_w) { JSONObject json = new JSONObject(); json.put("flag", wzaaService.saveGb80(agb800_w)); return json.toString(); } 然后获取他的主键 agb800_w @Transactional public String saveGb80(String agb800_w) { if(gb80Dao.queryByAgb800_w(agb800_w) > 0) { return "false"; } else { return "true"; } } 最后是这样 @param agb800_w @return public int queryByAgb800_w(String agb800_w) { Bricks bricks = new Bricks(this); bricks.eq("agb800_w", new BigDecimal(agb800_w)); return findByBricks(bricks).size(); } 结果报的500 错误 求大神为我解答 谢谢 我的js代码 是这样的 //function doSave() { if (AW.setFormErrorTip("#form1", AW.validateForm("#form1", validation_form1)) == null) { var agb80e = $("#agb80e").val(); if (parseInt(agb80e) >= 2) { AW.msg({ title : "系统提示", content : "已提交不能再次保存修改!", showClose : true, onClose : function() { }, width : 300, buttons : [ { title : "关闭", click : function(wrap) { wrap.modal("hide"); setTimeout(function() { wrap.remove(); }, 4000); } } ] }); return; } AW.post({ url : appPath + "/tjwb/wz/a/a/saveGb80.ajax", data : $("#form1").serializeAll(), success : function(data) { if(data.flag == "success") { AW.post({ url : appPath + "/tjwb/wz/a/a/saveGb80.ajax", data : $("#form1").serializeAll(), success : function(data) { if (data.flag == "success") { AW.msg({ title : "系统提示", content : "保存成功!", showClose : true, onClose : function() { wrap.remove(); AW.refreshForm("#form1", data.gb80); dosubmit(pagenumnow, data.gb94.agb800_w); }, width : 300, buttons : [ { title : "关闭", click : function(wrap) { wrap.modal("hide"); AW.refreshForm("#form1", data.gb80); dosubmit(pagenumnow, data.gb94.agb800_w); setTimeout(function() { wrap.remove(); }, 4000); } } ] }); } else { AW.msg({ title : "系统提示", content : "保存失败,请核查!", showClose : true, onClose : function() { }, width : 300, buttons : [ { title : "关闭", click : function(wrap) { wrap.modal("hide"); setTimeout(function() { wrap.remove(); }, 4000); } } ] }); } } }); }else{ AW.msg({ title : "系统提示", content : "xxxx!", showClose : true, onClose : function() { }, width : 300, buttons : [ { title : "关闭", click : function(wrap) { wrap.modal("hide"); setTimeout(function() { wrap.remove(); }, 4000); } } ] }); } } }); } } 这是一个 保存校验操作

ssm中500错误 之前还可以正常使用 突然就不行了

这是错误 Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.user.dao.UserDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotationsjavax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} 这是配置 <context:component-scan base-package="com"/> <!-- spring mvc 注解及类型转换 --> <mvc:annotation-driven conversion-service="conversionService"/> <bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean"> </bean> <!-- spring mvc 视图解析器 --> <!-- 定义跳转的文件的前后缀 ,视图模式配置 --> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <!-- 自动给后面action的方法return的字符串加上前缀和后缀,变成一个 可用的url地址 --> <property name="prefix" value="/WEB-INF/pages/"/> <property name="suffix" value=".jsp"></property> </bean> <!-- 文件上传需要配置此解析器 找类的快捷键为:ctrl+shift+t 查看本类方法:ctrl+o,假如想继续看父类方法继续ctrl+o --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <!-- 默认编码 --> <property name="defaultEncoding" value="utf-8"/> <!-- 文件大小最大值 --> <property name="maxUploadSize" value="10485760000"/> <!-- 内存中的最大值 --> <property name="maxInMemorySize" value="40960"/> </bean> 这是mybatis的配置 <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"></property> <property name="configLocation" value="classpath:mybatis-config.xml"></property> <!-- 自动扫描mapping.xml文件 --> <property name="mapperLocations" > <list><value>classpath:mapper/*.xml</value></list> </property> </bean> <!-- Mapper接口所在包,Spring会自动查找其下的Mapper --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="com.**.dao "/> </bean> </beans> 这是dao @Repository public interface UserDao { public User findUserByUserNameAndPassword(@Param("userName") String userName, @Param("password") String password); public int addUser(User user); } 这是service 接口没贴出来 就两个方法 @Service public class UserServiceImpl implements UserService { @Resource private UserDao userDao; public User login(String userName, String password) { return userDao.findUserByUserNameAndPassword(userName, password); } public Integer register(User user) { return userDao.addUser(user); } 这是controller @Scope(value="prototype") @RequestMapping("/user") @Controller public class UserController { @Resource private UserService userService; @RequestMapping("toLogin") public String toLogin(){ System.out.println("1111111111"); return "user/login"; } 这是web.xml <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>dispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring-mvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcherServlet</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> tomcat可以运行 到首页放问toLogin.do就出错 不知道什么原因 跪求解答

jsp页面出错,eclipse提示最后一个大括号这里报红叉。

<% ArrayList<Idr_request_type> request_type_list = (ArrayList)request.getAttribute("request_type_list"); if(request_type_list.size() != 0){ for(int i = 0; i < request_type_list.size(); i++){ Idr_request_type requestType = request_type_list.get(i); if(rs(0) = req_REQTYPE) %> <option value= "<%=requestType.getRequest_Type()%>" selected><%=requestType.getRequest_Type_Desc() %> </option> <% else %> <option value= "<%=requestType.getRequest_Type()%>"><%=requestType.getRequest_Type_Desc() %> </option> <% } } %>

ssm框架怎样从后段获取model类型数据返回到jsp页面弹窗显示?

``` public String deleteNewslabel(int id,Model model){ try { service.deleteNewslabel(id); }catch (DataIntegrityViolationException e) { model.addAttribute("message", "存在子栏目,无法删除!"); } return "/desktop/news/queryNewslabel.do"; } ``` 这是后台页面,因为删除的数据是外键,设置的是无法删除,将提示保存message中,请问如何在jsp页面中弹窗提示无法删除? 下面是前台代码 ``` <td class="td07"><a href="${pageContext.request.contextPath }/desktop/news/deleteNewslabel.do?id=${data.id }" onclick="return shanchu()" >删除</a></td> ```

查询数据库浏览器报出500错误:stackOverFlowError

我在做mybatis+spring+shardbatis进行分库分表,当我查询所有记录时,在浏览器里报500错误,异常信息如下: java.lang.StackOverflowError java.util.concurrent.AbstractExecutorService.<init>(AbstractExecutorService.java:71) java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1302) java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1195) org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:116) org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115) org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:85) org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:169) org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:223) org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:179) org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699) org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:633) org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:484) org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:142) org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115) org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:85) org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:169) org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:223) org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:179) org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699) org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:633) org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:484) org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:142) org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115) org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:85) org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:169) org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDataSource(PooledConnection.java:223) org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:179) org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699) org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:633) org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:484) org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:142) org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115) org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126) org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:85)......(后面还有很多重复的); TestController.java里的内容如下: ``` @Autowired private TestService service; @RequestMapping("/query") public ModelAndView query() { ModelAndView mv = new ModelAndView(); List<Test> result = new ArrayList<Test>(); for(int i = 1;i<=4;i++) { Map<String, Object> param = ImmutableMap.<String, Object> of("a", i); List<Test> res = service.queryAll(param); result.addAll(res); } System.out.println(result); mv.addObject("tests",result); mv.setViewName("test"); return mv; } ``` TestMapper.java内容如下: ``` @DbShard(dbKey = "ds", rule = "$a$ % 2")//ds0,ds1(shard0,shard1) @TableShard(tablePattern = "test", rule = "leftPad($a$ % 4, 3)")//补足3位(000,001,002,003) @Repository public interface TestMapper { public void save(@DbShardWith(props = "a") @TableShardWith(props = "a") Test test); public List<Test> query(@DbShardWith(props = "a") @TableShardWith(props = "a") Map<String, Object> param); public void update(@DbShardWith(props = "a") @TableShardWith(props = "a") Map<String, Object> param); public List<Test> queryAll(@DbShardWith(props = "a") @TableShardWith(props = "a") Map<String, Object> param); } ``` jsp里没什么,index里有请求controller的跳转,test.jsp显示所有记录 PS:最后我想是不是与数据源的配置有关,但感觉又不是,因为在main函数里测试是好的(附上数据源),还有VM options我也设置了,也没用: ``` <!--设置数据源ds0,ds1--> <bean id="ds0" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="${jdbc.url0}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <property name="maxActive" value="30"/> <property name="maxIdle" value="10"/> <property name="maxWait" value="6000"/> <property name="defaultAutoCommit" value="true"/> <property name="testOnBorrow" value="true"/> <property name="validationQuery" value="select 1"/> <property name="validationInterval" value="60000"/> </bean> <bean id="ds1" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="${jdbc.url1}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <property name="maxActive" value="30"/> <property name="maxIdle" value="10"/> <property name="maxWait" value="6000"/> <property name="defaultAutoCommit" value="true"/> <property name="testOnBorrow" value="true"/> <property name="validationQuery" value="select 1"/> <property name="validationInterval" value="60000"/> </bean> <bean id="dataSource" class="org.lysu.shard.ds.ShardDataSource"> <property name="targetDataSources"> <map key-type="java.lang.String"> <entry key="ds_0" value-ref="ds0"/> <entry key="ds_1" value-ref="ds1"/> </map> </property> <property name="defaultTargetDataSource" ref="ds0"/> </bean> ``` ``` vm options: -Xms256m -Xmx512m -XX:PermSize=128M -XX:MaxNewSize=256m -XX:MaxPermSize=256m ```

求助大家,请问下面的错误提示是不是说明我的String转Int出错了,错在哪里?

注:其中pid变量是从另一个页面传过来的整数 <td><a href="categoryaddchild.jsp?pid=<%=c.getId()%>">添加</a></td> -------------------------------------------------------------------------------- type Exception report message An exception occurred processing JSP page /admin/categoryaddchild.jsp at line 6 description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /admin/categoryaddchild.jsp at line 6 3: <% 4: 5: request.setCharacterEncoding("GBK"); 6: int pid = Integer.parseInt(request.getParameter("pid")); 7: 8: 9: String action = request.getParameter("action"); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) root cause java.lang.NumberFormatException: For input string: "pid" java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) java.lang.Integer.parseInt(Integer.java:492) java.lang.Integer.parseInt(Integer.java:527) org.apache.jsp.admin.categoryaddchild_jsp._jspService(categoryaddchild_jsp.java:69) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

jsp中使用javaBean,运行显示值无效The value is invalid

错误提示:The value for the useBean class attribute com.jan.seven.Student is invalid 我是在src里建了一个包com.jan.seven Student类 package com.jan.seven; public class Student { private String name; private int age; public Student() { }; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } } 编译后包在WebRoot\WEB-INF\classes目录下 .class文件在WebRoot\WEB-INF\classes\com\jan\seven下 useBean.jsp文件在项目\WebRoot目录下 <%@ page language="java" import="com.jan.seven.Student" contentType="text/ html;pageEncoding=gb2312" %> <html> <body><font size=4> <jsp:useBean id="student" class="com.jan.seven.Student" scope="page" /> <% student.setAge(20); student.setName("杏"); %> <p>名字是: <% out.println(student.getName());%></p> <p>年龄是: <% out.println(student.getAge());%></p> </font> </body> </html> 错误/WebRoot/useBean.jsp(行:5,列:0)useBean类属性com.jan.seven.Student的值是无效的。

用eclipse编写jsp为什么调用方法错误

<%@page contentType="text/html;charset=GB2312"%> <%@page import="java.util.*"%> <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> </head> <BODY bgcolor=yellow> <FONT size=3> <%! TreeSet <String> dictionary = new TreeSet <String>(); public void addWord(String s){ String word[]=s.split (" "); for(int i=0;i<word.length;i++){ dictionary.add(word[i]); } } %> <% String str=request.getParameter("word"); addWord(str); Iterator<String>te=dictionary.iterator(); while(te.hasNext()){ String word=te.next(); out.print(" "+word); } %> </FONT> </BODY> </html> 就是上面的 new TreeSet <String>();总是提示错误也不知道是什么原因 代码简单也是照着书上打的 有大牛愿意看看指导一下看看问题出在哪里吗?

JSP真分页问题,点击下一页没有反应

点击下一页之后没有任何反应。。。而且跳转到某一页功能也不能实现 <%@ page contentType="text/html" pageEncoding="UTF-8"%> <%@ page import="java.sql.*" %> <html> <head><title>My JSP 'emp_list.jsp' starting page</title> </head> <body> <%! public static final String URL = "emp_list.jsp"; public static final String DBDRIVER = "com.mysql.jdbc.Driver"; public static final String DBURL = "jdbc:mysql://localhost:3306/mldn"; public static final String DBUSER = "root"; public static final String DBPASS = "root"; %> <% Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; %> <% int currentPage = 1; //当前所在页,默认为1 int lineSize = 3; //每次显示的记录数 int allRecorders = 0; //表示全部的记录 int pageSize = 1; //表示全部的页数(尾页) int [] lsData = {1,3,5,7,9}; %> <% try { String cPage = request.getParameter("cp"); if (cPage==null){ cPage="1"; } String lSize = request.getParameter("ls"); if (lSize==null){ lSize = "3"; } currentPage = Integer.parseInt(cPage); lineSize = Integer.parseInt(lSize); }catch(Exception e){ System.out.println("错误1"); } %> <% try { Class.forName(DBDRIVER); conn = DriverManager.getConnection(DBURL,DBUSER,DBPASS); String sql = "select COUNT(empno) from emp"; pstmt = conn.prepareStatement(sql); rs = pstmt.executeQuery(); if (rs.next()){ allRecorders = rs.getInt(1); } //System.out.println(allRecorders); pageSize = (allRecorders + lineSize -1) / lineSize; //System.out.println(pageSize); }catch(Exception e){ System.out.println("错误2"); } %> <script language="javascript"> function go(num){ document.getElementById("cp").value = num; document.spform.submit(); } </script> <h1 align="center">雇员列表</h1> <form align="center" name="spform" action="<%=URL%>" method="post"> <input type="button" value="首页" onclick="go(1)" <%=currentPage==1?"DISABLED":""%>> <input type="button" value="上一页" onclick="go(<%=currentPage-1%>)" <%=currentPage==1?"DISABLED":""%>> <input type="button" value="下一页" onclick="go(<%=currentPage+1%>)" <%=currentPage==pageSize?"DISABLED":""%>> <input type="button" value="尾页" onclick="go(<%=pageSize%>)" <%=currentPage==pageSize?"DISABLED":""%>> 跳转到第 <select id="tzcp" onchange="go1(this.value)"> <% for (int x=1; x<=pageSize; x++){ %> <option value="<%=x%>" <%=x==currentPage?"SELECTED":""%>><%=x%></option> <% } %> </select>页 每页显示 <select name="ls" onchange="go(1)"> <% for (int x=0; x<lsData.length; x++){ %> <option value="<%=lsData[x]%>" <%=lsData[x]==lineSize?"SELECTED":""%>><%=lsData[x]%></option> <% } %> </select>条 <input type="hidden" id="cp" value="1"/> </form> <table border="1" width="100%"> <tr> <td>编号</td> <td>姓名</td> <td>工作</td> <td>日期</td> <td>工资</td> </tr> <% try { String sql2 = "select * from emp limit "+ (currentPage - 1) * lineSize + "," + currentPage * lineSize; pstmt = conn.prepareStatement(sql2); rs = pstmt.executeQuery(); while(rs.next()){ int no = rs.getInt(1); String name = rs.getString(2); String job = rs.getString(3); Date date = rs.getDate(4); float sal = rs.getFloat(5); %> <tr> <td><%=no %></td> <td><%=name %></td> <td><%=job %></td> <td><%=date %></td> <td><%=sal %></td> </tr> <% } }catch(Exception e){ System.out.println("错误3"); }finally{ try{ rs.close(); pstmt.close(); conn.close(); }catch(Exception e){ System.out.println("错误4"); } } %> </table> </body> </html>

jsp中模糊查询,后台没有出错,为什么实现不了?

点击查找只是刷新页面,后台没有问题,但是又实现不了 具体代码: <% request.setCharacterEncoding("utf-8"); %> <%! private static final String DBDRIVER ="org.gjt.mm.mysql.Driver"; private static final String DBURL ="jdbc:mysql://localhost:3306/tushu"; private static final String DBUSER = "root"; private static final String DBPASSWORD ="admin"; %> <% Connection conn =null; PreparedStatement pstmt =null; ResultSet rs =null; %> <% int pageCount = 5;//每页显示行数 int rowCount = 0;//总记录数 int currentPage = 1;//当前页码 int sumPageCount = 0;//总的页数 int currentRow = 1; %> <% String word=null; String strPage = request.getParameter("page"); if(word!=null){ word=new String(request.getParameter("key").getBytes("ISO-8859-1"),"utf-8"); word = request.getParameter("key"); } if(strPage==null){ currentPage = 1; }else{ currentPage = Integer.parseInt(strPage); } %> <% try{ Class.forName(DBDRIVER); conn = DriverManager.getConnection(DBURL, DBUSER, DBPASSWORD); String sql = null; if(word==null){ sql = "select b_ID,b_Name,b_Author,b_Translator,chub,b_Price,b_Quantity from bookinfo"; pstmt = conn.prepareStatement(sql); }else{ sql = "select b_ID,b_Name,b_Author,b_Translator,chub,b_Price,b_Quantity from bookinfo where"+" b_Name like '%''+word+''%'"+" or b_Author like '%''+word+''%'"; pstmt.setString(1,"%"+word+"%"); pstmt.setString(2,"%"+word+"%"); } rs = pstmt.executeQuery(); rs.last(); rowCount = rs.getRow(); if(rowCount % pageCount == 0){ sumPageCount = rowCount/pageCount; }else{ sumPageCount = rowCount/pageCount + 1; } currentRow = (currentPage-1)*pageCount+1; rs.absolute(currentRow); %> <div id="layout"> <form action="welcome.jsp" method="get" id="form1" name="form1"> <h2>输入要查询的内容:</h2> <input type="text" name="key" id="key" value="<%=word==null ? "" :word %>"/> <input type="submit" name="button" value="找找看" /> </form> <hr color=#0000cc/> <h1>共检索到:<%=rowCount %>个记录,分<%=sumPageCount %>页显示,现在显示的是第<%=currentPage %>页</h1> <hr color=#0000cc/> <table id="tb-list" width=100% height = 34% border=1 align="center" cellpadding=0 bordercolor=#cc00ff cellspace=2> <tr bgcolor=pink><th>编号</th><th>名称</th><th>作者</th><th>译者</th><th>出版社</th><th>价格(¥)</th><th>副本数</th><th>修改图书</th><th>删除图书</th></tr> <% for(int i=0; i<pageCount; i++){ int b_ID=rs.getInt(1); String b_Name=rs.getString(2); String b_Author=rs.getString(3); String b_Translator=rs.getString(4); String chub=rs.getString(5); float b_Price=rs.getFloat(6); int b_Quantity=rs.getInt(7); %> <tr bgcolor=#AFEEEE> <td><%= b_ID %></td> <td><%= b_Name %></td> <td><%= b_Author %></td> <td><%= b_Translator %></td> <td><%= chub %></td> <td><%= b_Price %></td> <td><%= b_Quantity %></td> <td class="td-center"> <a href ="updatabook.jsp?id=<%=b_ID %>">修改图书</a></td> <td><a href ="delbookctl.jsp?id=<%=b_ID %>" onclick="return window.confirm('确认要删除吗?')">删除图书</a> </td> </tr> <% if(!rs.next()){ break; } } %> </table> <div id="a_page"> <!-- 如果当前页大于1,则显示上一页 --> <% if(currentPage < sumPageCount){ if(word!=null){ %> <a href="welcome.jsp?page=<%=currentPage+1%>&key=<%=word %>">下一页</a> <% }else{ %> <a href="welcome.jsp?page=<%=currentPage+1%>">下一页</a> <% } } %> <% if(currentPage >1){ if(word!=null){ %> <a href="welcome.jsp?page=<%=currentPage-1%>&key=<%=word %>">上一页</a> <% }else{ %> <a href="welcome.jsp?page=<%=currentPage-1%>">下一页</a> <% } } %> </div> </div> <% }catch(Exception e){ System.out.println(e); }finally{ rs.close(); pstmt.close(); conn.close(); } %>

没找到问题在哪!!大神帮忙看一下代码(JSP使用JSTL的c:forEach标签显示数据怎么不管用

``` <form name="myform" method="post" action="newstypeservlet?op=batchDelete"> <table border="1"> <tr> <th>编号</th> <th>类型名</th> <th>编辑</th> <th>删除</th> </tr> <c:forEach items="${requestScope.newsTypeList }" var="newsType" varStatus="status"> <tr style="background-color: ${status.index%2==0?'red':'green' } "> <td> <input type="checkbox" name="ids" value="${newsType.id }"/> ${newsType.id } </td> <td>${newsType.typeName }</td> <td><a href="newstypeservlet?op=toEdit&id=${newsType.id }">编辑</a></td> <td><a href="newstypeservlet?op=delete&id=${newsType.id }">删除</a></td> </tr> </c:forEach> <tr> <td colspan="4" > <input type="button" value="批量删除" onclick="checkSelected()"/> </td> </tr> </table> </form> ``` Servlet里的代码: ``` protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // System.out.println("进入sevlet"); request.setCharacterEncoding("UTF-8");// 解决Post提交时的乱码问题 String op = request.getParameter("op");// 注意:此处的JSP页面不放在根目录下,Servlet就无法接收到页面传来的数据,因为web.xml配置信息无法覆盖 if ("add".equals(op)) { addNewsType(request, response); } else if ("list".equals(op)) { listNewsType(request, response); } else if ("batchDelete".equals(op)) { batchDelete(request, response); } else if ("delete".equals(op)) { deleteById(request, response); } } // 新闻列表 private void listNewsType(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { NewsTypeService newsTypeService = new NewsTypeService(); List<NewsType> newsTypeList = newsTypeService.findAll(); request.setAttribute("newsTypeList", newsTypeList); request.getRequestDispatcher("../listNewsType.jsp").forward(request, response); } private void deleteById(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { PrintWriter out = response.getWriter(); String idStr = request.getParameter("id"); if (idStr == null || "".equals(idStr)) { out.write("<script>alert('密码不能为空');history.back();</script>"); return; } int id = Integer.parseInt(idStr); NewsTypeService newsTypeService = new NewsTypeService(); newsTypeService.delete(id); // 删除数据后,返回列表 listNewsType(request, response); } private void batchDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String[] ids = request.getParameterValues("ids"); NewsTypeService newsTypeService = new NewsTypeService(); newsTypeService.batchDelete(ids); // 删除数据后,返回列表 listNewsType(request, response); } ``` service代码: ``` public class NewsTypeService { public int save(NewsType newsType) { return new NewsTypeDao().save(newsType); } public int batchDelete(String[] ids) { return new NewsTypeDao().batchDelete(ids); } public List<NewsType> findAll() { return new NewsTypeDao().findAll(); } public int delete(int id) { return new NewsTypeDao().delete(id); } ``` DAO里的代码 ``` public class NewsTypeDao { DBUtil dbUtil = new DBUtil(); // 保存新闻类型 public int save(NewsType newsType) { String sql = "insert into newstype(typeName) values (?)"; Object[] params = { newsType.getTypeName() }; return dbUtil.executeUpdate(sql, params); // executeUpdate的返回值是一个整数,指示受影响的行数(即更新计数) } public List<NewsType> findAll() { List<NewsType> newsTypeList = new ArrayList<NewsType>(); String sql = "select * from newstype"; ResultSet rs = dbUtil.executeQuery(sql, null); try { while (rs.next()) { NewsType newsType = new NewsType(rs.getInt("id"), rs.getString("typeName")); newsTypeList.add(newsType); } } catch (SQLException e) { e.printStackTrace(); return newsTypeList; } finally { dbUtil.closeAll(); } return newsTypeList; } /** * 批量删除 * * @param ids * 指定的ID集合 * @return */ public int batchDelete(String[] ids) { // TODO Auto-generated method stub String sql = "delete from newstype where id in(?)"; Object[] params = { ArrayUtil.array2String(ids, ",") }; return dbUtil.executeUpdate(sql, params); } /** * 根据Id进行删除 * * @param id * @return */ public int delete(int id) { String sql = "delete from newsType where id=?"; Object[] params = { id }; return dbUtil.executeUpdate(sql, params); } ## # }谢谢大神**** ```

jsp上传文件页面报无法解析的编译问题

index.jsp <%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> <html> <head> <title>带进度条的文件上传</title> <meta http-equiv="Content-Type" content="text/html; charset=GB18030"> <link href="CSS/style.css" rel="stylesheet"> <script language="javascript" src="JS/AjaxRequest.js"></script> <script language="javascript"> //此处需要加&nocache="+new Date().getTime(),否则将出现进度不更新的情况 function getProgress(){ var loader=new net.AjaxRequest("showProgress.jsp?nocache="+new Date().getTime(),deal_p,onerror,"GET"); } function onerror(){ alert("上传文件出错!"); } function deal_p(){ var h=this.req.responseText; h=h.replace(/\s/g,""); //去除字符串中的Unicode空白符 document.getElementById("progressPercent").style.display=""; //显示百分比 progressPercent.innerHTML=h+"%"; //显示完成的百分比 document.getElementById("progressBar").style.display="block"; //显示进度条 document.getElementById("imgProgress").width=h*(255/100); //显示完成的进度 } function deal(form){ form.submit(); //提交表单 timer=window.setInterval("getProgress()",500); //每隔500毫秒获取一次上传进度 } </script> </head> <body> <form name="form1" enctype="multipart/form-data" method="post" action="UpLoad?action=uploadFile"> <table width="500" height="289" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bg.jpg"> <tr> <td width="61" rowspan="2">&nbsp;</td> <td width="439" align="center"> <table width="80%" height="190" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center">&nbsp;</td> </tr> <tr> <td height="34" style="color:#FFFFFF">请选择上传的文件:</td> </tr> <tr> <td height="42"><input name="file" type="file" size="42"></td> </tr> <tr> <td height="50" style="color:#FFFFFF"> 注:文件大小请控制在50M以内。</td> </tr> <tr> <td height="29" align="center" style="color:#FFFFFF"><div id="progressBar" class="prog_border" align="left"><img src="images/progressBar.jpg" width="0" height="13" id="imgProgress"></div>  <span id="progressPercent" style="width:40px;display:none">0%</span></td> </tr> <tr> <td height="29" align="center"><img src="images/shangchuan.gif" width="61" height="23" onClick="deal(form1)"> <img src="images/chongzhi.gif" width="61" height="23" onClick="form1.reset();">&nbsp; </td></tr> </table> </td> </tr> </table> </form> </body> </html> upload.java package com.wgh.servlet; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.*; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; /** * * @author administrator */ public class UpLoad extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if ("uploadFile".equals(action)) { this.uploadFile(request, response); // 上传文件 } } public void uploadFile(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=GBK"); request.setCharacterEncoding("GBK"); HttpSession session = request.getSession(); session.setAttribute("progressBar", 0); // 定义指定上传进度的Session变量 String error = ""; int maxSize = 50 * 1024 * 1024; // 单个上传文件大小的上限 DiskFileItemFactory factory = new DiskFileItemFactory(); // 基于磁盘文件项目创建一个工厂对象 ServletFileUpload upload = new ServletFileUpload(factory); // 创建一个新的文件上传对象 try { List items = upload.parseRequest(request);// 解析上传请求 Iterator itr = items.iterator();// 枚举方法 while (itr.hasNext()) { FileItem item = (FileItem) itr.next(); // 获取FileItem对象 if (!item.isFormField()) {// 判断是否为文件域 if (item.getName() != null && !item.getName().equals("")) {// 判断是否选择了文件 long upFileSize = item.getSize(); // 上传文件的大小 String fileName = item.getName(); // 获取文件名 // System.out.println("上传文件的大小:" + item.getSize()); if (upFileSize > maxSize) { error = "您上传的文件太大,请选择不超过50M的文件"; break; } // 此时文件暂存在服务器的内存中 File tempFile = new File(fileName);// 构造临时对象 // String savePath=tempFile.getName(); // //返回上传文件在客户端的完整路径名称 // request.setAttribute("filename", savePath); File file = new File(request.getRealPath("/upload"), tempFile.getName()); // 获取根目录对应的真实物理路径 InputStream is = item.getInputStream(); int buffer = 1024; // 定义缓冲区的大小 int length = 0; byte[] b = new byte[buffer]; double percent = 0; FileOutputStream fos = new FileOutputStream(file); while ((length = is.read(b)) != -1) { percent += length / (double) upFileSize * 100D; // 计算上传文件的百分比 fos.write(b, 0, length); // 向文件输出流写读取的数据 session.setAttribute("progressBar", Math .round(percent)); // 将上传百分比保存到Session中 } fos.close(); Thread.sleep(1000); // 线程休眠1秒 } else { error = "没有选择上传文件!"; } } } } catch (Exception e) { e.printStackTrace(); error = "上传文件出现错误:" + e.getMessage(); } if (!"".equals(error)) { request.setAttribute("error", error); request.getRequestDispatcher("error.jsp") .forward(request, response); } else { request.setAttribute("result", "文件上传成功!"); request.getRequestDispatcher("upFile_deal.jsp").forward(request, response); } } } 问题 java.lang.Error: 无法解析的编译问题: 无法解析导入 org.apache.commons.fileupload.disk 无法解析导入 org.apache.commons.fileupload.servlet DiskFileItemFactory 无法解析为类型 DiskFileItemFactory 无法解析为类型 ServletFileUpload 无法解析为类型 ServletFileUpload 无法解析为类型 com.wgh.servlet.UpLoad.<init>(UpLoad.java:15) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.lang.reflect.Constructor.newInstance(Constructor.java:423) java.lang.Class.newInstance(Class.java:442) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:610) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1777) java.lang.Thread.run(Thread.java:745) 求救

JSP中System 无法解析的问题

就是用System.out.println()输出到控制台的时候,System下面出现红线。如果定义String也会出现无法解析 String

JSP代码运行报错,can't be resolved

这是我的代码: ``` <%@ page contentType="text/html;charset=GB2312" %> <%@ page import="java.util.*"%> <HTML><BODY> <%! Vector v=new Vector(); ServletContext application; synchronized void sendMessage(String s){ application=getServletContext(); v.add(s); application.setAttribute("Mess",v); } %> <% String name=request.getParameter("peopleName"); String title=request.getParameter("Title"); String messages=request.getParameter("messages"); if(name==null){ name="guest"+(int)(Math.random()*10000); } if(title==null){ title="无标题"; } if(messages==null){ messages="无信息"; String time=new Date().toString(); String s="#"+name+"#"+title+"#"+time+"#"+messages+"#"; sendMessage(s); out.print("您的信息已经提交!"); %> <A href="submit.jsp">返回 <A href="showMessage,jsp">查看留言板 </BODY></HTML> ``` 在浏览器中用localhost:8080打开后报错,虽然有错误提示,但我不太清楚该怎么改,以下是错误信息: ``` An error occurred at line: 4 in the jsp file: /messagePane.jsp Vector cannot be resolved to a type 1: <%@ page contentType="text/html;charset=GB2312" %> 2: <%@ page import="java.ytil.*"%> 3: <HTML><BODY> 4: <%! Vector v=new Vector(); 5: ServletContext application; 6: synchronized void sendMessage(String s){ 7: application=getServletContext(); ``` ``` An error occurred at line: 8 in the jsp file: /messagePane.jsp v cannot be resolved An error occurred at line: 9 in the jsp file: /messagePane.jsp v cannot be resolved to a variable 5: ServletContext application; 6: synchronized void sendMessage(String s){ 7: application=getServletContext(); 8: v.add(s); 9: application.setAttribute("Mess",v); 10: } 11: %> ``` ``` An error occurred at line: 23 in the jsp file: /messagePane.jsp Date cannot be resolved to a type 20: } 21: if(messages==null){ 22: messages="无信息"; 23: String time=new Date().toString(); 24: String s="#"+name+"#"+title+"#"+time+"#"+messages+"#"; 25: sendMessage(s); 26: out.print("您的信息已经提交!"); ``` 感觉从语法上并没有什么错,错误提示也都是can't be resolved,到底是哪里出了问题呢?

EL表达式 JSP 页面显示数据问题

``` <c:forEach items="${sessionScope.billlist}" var="bill" varStatus="status"> <tr> <td>${bill.price}*${bill.count}*${bill.rebate}</td> </tr> </c:forEach> ``` 表达式是double*int*double型的,得到的数是类似于5.3999999999999995,想要的效果是保留两位小数,或者怎么把int改为double型

jsp 连接 mysql 查询 报错500

源代码: <%@ page contentType="text/html; charset=GB2312"%> <%@ page import="java.util.*,java.sql.*"%> <% request.setCharacterEncoding("GB2312"); //链接数据库程序 Class.forName("org.gjt.mm.mysql.Driver"); //Connection conn = DriverManager.getConnection( -------SQL桥 // "jdbc:odbc:bookshoplk", "sa", ""); Connection connect = DriverManager .getConnection("jdbc:mysql://localhost:3306/bookshop?user=root&password=root&useUnicode=true&characterEncoding=GBK"); //Statement stmt = conn.createStatement( ---------- SQL的连接 // ResultSet.TYPE_SCROLL_INSENSITIVE, // ResultSet.CONCUR_READ_ONLY); Statement stmt = connect.createStatement(); ResultSet rs = null; //rs结果集 String s_where = (String) session.getAttribute("s_where"); String s_bookid = ""; String s_bookname = ""; String s_author = ""; String s_publisher = ""; String s_price = ""; int i_totalnum = 0;//书籍数量 rs = stmt //String sql=“SELECT * FROM `show`” .executeQuery("select count(distinct bookid) from'book left join publisher on book.publisherid=publisher.publisherid where bookid is not null " + s_where); rs.next(); i_totalnum = rs.getInt(1); %> <% if (i_totalnum != 0) {//显示的是查询结果 %> <table border=1> <tr> <td width=30%>书号</td> <td width=30%>书名</td> <td width=10%>作者</td> <td width=15%>出版社</td> <td width=30%>价格</td> </tr> <% rs = stmt .executeQuery("select * from book left join publisher on book.publisherid=publisher.publisherid where bookid is not null " + s_where + " order by bookid "); for (int i = 0; i <= i_totalnum; i++) { if (!rs.isLast()) { rs.next(); s_bookid = rs.getString("bookid"); s_bookname = rs.getString("bookname"); s_author = rs.getString("author"); s_price = rs.getString("price"); s_publisher = rs.getString("name"); %> <tr> <td><%=s_bookid%></td> <td><%=s_bookname%></td> <td><%=s_author%></td> <td><%=s_publisher%></td> <td><%=s_price%></td> </tr> <% } } %> </table> <% } else { String temp = "没有您要找的书,请重新搜索!返回。"; temp = java.net.URLEncoder.encode(temp.toString(), "gbk"); response.sendRedirect("error.jsp?error=" + temp); //显示,为查询到结果 %> <!-- --- <table> <tr> <td> <img src="../img/sorry.jpeg" /> </td> </tr> <tr> <td> 没有您要找的书,请 <a href="search.jsp">重新搜索</a> </td> </tr> </table> --> <% } %> 错误提; type Exception report message An exception occurred processing JSP page /cust/booklist.jsp at line 25 description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /cust/booklist.jsp at line 25 22: String s_price = ""; 23: int i_totalnum = 0;//�鼮���� 24: rs = stmt //String sql=��SELECT * FROM `show`�� 25: .executeQuery("select count(distinct bookid) from'book left join publisher on book.publisherid=publisher.publisherid where bookid is not null " 26: + s_where); 27: rs.next(); 28: i_totalnum = rs.getInt(1); Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:567) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:454) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause javax.servlet.ServletException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''book left join publisher on book.publisherid=publisher.publisherid where booki' at line 1 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:837) org.apache.jsp.cust.booklist_jsp._jspService(booklist_jsp.java:220) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''book left join publisher on book.publisherid=publisher.publisherid where booki' at line 1 com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723) com.mysql.jdbc.Connection.execSQL(Connection.java:3277) com.mysql.jdbc.Connection.execSQL(Connection.java:3206) com.mysql.jdbc.Statement.executeQuery(Statement.java:1232) org.apache.jsp.cust.booklist_jsp._jspService(booklist_jsp.java:117) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) note The full stack trace of the root cause is available in the Apache Tomcat/8.0.20 logs.

JSP运行到executeupdate()就停了,不报错,数据库也没更新

public String handleString(String s){ try{ byte bb[]=s.getBytes("GBK"); s=new String(bb); } catch(Exception ee){ System.out.println(ee); } return s; } . . . con=DriverManager.getConnection(uri,user,password1); String insertCondition="INSERT INTO user VALUES(?,?,?,?,?)"; sql=con.prepareStatement(insertCondition); System.out.println("1"); if(boo){ sql.setString(1,handleString(logname)); sql.setString(2,handleString(password)); sql.setString(3,handleString(phone)); sql.setString(4,handleString(address)); sql.setString(5,handleString(realname)); } System.out.println("1.5"); int m=sql.executeUpdate(); System.out.println("2"); con.commit(); ![图片说明](https://img-ask.csdn.net/upload/201506/24/1435116285_622696.png)

利用SERVLET跳转到JSP页面时显示乱码

单独打开SERVLET或者JSP,网页显示全部正常,在SERVLET里输出数据也显示正常,可是一转到JSP就全部乱码了。不仅是数据,只要是JSP里的中文就都成了? ``` package SERVLET; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import JDBC.S; import JDBC.SDao; @WebServlet("/ShowSServlet") public class ShowSServlet extends HttpServlet { private static final long serialVersionUID = 1L; public ShowSServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.getWriter().append("Served at: ").append(request.getContextPath()); request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); String currentpage=request.getParameter("currentpage"); if(null==currentpage || "".equals(currentpage)){ currentpage="1"; } List<S> list=SDao.selectPage(Integer.parseInt(currentpage)); int totalcount=SDao.selectS().size(); int row=5; int totalpage=(totalcount%row==0)?(totalcount/row):(totalcount/row+1); for(S l:list){ System.out.println(l.getSname()); } request.setAttribute("currentpage", currentpage); request.setAttribute("totalcount", totalcount); request.setAttribute("row", row); request.setAttribute("totalpage", totalpage); request.setAttribute("list", list); request.getRequestDispatcher("ShowS.jsp").forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } } ``` ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!DOCTYPE html> <html> <head> <!-- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> --> <title>信息一览</title> <style> table { border:thin solid black; border-collapse:collapse; width:60%; text-align:center; } th { border:thin solid black; } td { border:thin solid black; } </style> <script type="text/javascript"> function gotos(page){ location.href="ShowSServlet?currentpage="+page; } function gotod(sno){ location.href="DeleteSServlet?sno="+sno; } </script> </head> <body> <table align="center" > <tr> <th>学号</th> <th>姓名</th> <th>年龄</th> <th>院系</th> <th>操作</th> </tr> <c:forEach var="l" items="${list }"> <tr> <td>${l.sno }</td> <td>${l.sname }</td> <td>${l.age }</td> <td>${l.depart }</td> <td><a href="javascript:gotod(${l.sno })">删除</a></td> </tr> </c:forEach> </table> <center> <c:choose> <c:when test="${currentpage==1 }">首页&nbsp&nbsp上一页</c:when> <c:otherwise> <a href="javascript:gotos(1)">首页</a> <a href="javascript:gotos(${currentpage-1 })">上一页</a> </c:otherwise> </c:choose> <c:choose> <c:when test="${currentpage==totalpage }">下一页&nbsp&nbsp末页</c:when> <c:otherwise> <a href="javascript:gotos(${currentpage+1 })">下一页</a> <a href="javascript:gotos(${totalpage })">末页</a> </c:otherwise> </c:choose></br> 共有${totalcount }条记录,每页显示${row }条记录,当前为第${currentpage }页 </center> </body> </html> ``` ![图片说明](https://img-ask.csdn.net/upload/201612/30/1483063322_263678.png) ![图片说明](https://img-ask.csdn.net/upload/201612/30/1483063332_740186.png) ![图片说明](https://img-ask.csdn.net/upload/201612/30/1483063340_428375.png)

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐