java - org.apache.jasper.JasperException: An exception occurred processing JSP page /editinfo.jsp -


i have jsp code trying edit information user web page. new jsp programming , i'm experiencing errors. here code:

<%@page import="databasetransactions.userphotosdatacontext"%> <%@page import="java.sql.resultset"%> <%@page contenttype="text/html" pageencoding="utf-8"%> <%             if (session.getattribute("id") == null) {                 response.sendredirect(request.getcontextpath() + "/sign-in.jsp");             }              int userid = integer.parseint(session.getattribute("id").tostring());             resultset userinfo = userphotosdatacontext.getuserprofileinfo(userid); %> <!doctype html> <html>     <head>         <meta http-equiv="content-type" content="text/html; charset=utf-8">         <title>edit information</title>         <meta name="viewport" content="width=device-width, initial-scale=1.0">          <!-- bootstrap -->         <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">         <link href="styles.css" rel="stylesheet">     </head>      <body class="bodybg">         <jsp:include page="/navigation.jsp"/>         <% userinfo.next();%>          <div class="boxouter" style="margin-top:50px;">             <h3 class="muted">edit information</h3>             <!--- more code here---->                  <br><br>                 <form id="update-form" method="" action="">                     <table style="margin:auto">                         <tr>                             <!--username-->                             <td>                                 <label>username <span id="uname-error" class="form-error"></span></label>                                 <input type="text" title="use @ least 6 characters"                                        name="username" id="uname"                                        value="<%=userinfo.getstring("username")%>"                                        placeholder="username" disabled="true">                             </td>                              <!--email-->                             <td>                                 <label>email <span id="email-error" class="form-error"></span></label>                                 <input type="text"                                        name="email" id="email"                                        value="<%=userinfo.getstring("email")%>"                                        placeholder="email" disabled="true">                             </td>                         </tr>                          <!--- more code here---->                      </table>                      <center/>                     <button class="btn btn-info" onclick="enablefields();" id="enablebtn" style="visibility:visible">edit information</button>                      <a id="savelink" href="#" style="color:white;">                         <button class="btn btn-info" id="savebtn" type="submit" style="visibility:hidden">save</button>                     </a>                      <a href="#" style="color:white">                         <button class="btn btn-info" id="deactivatebtn" style="visibility:visible">deactivate account</button>                     </a>                 </form>             </div>         </div>           <br><br>          <!--- more code here---->      <script type="text/javascript">         function setvalues() {             if ("<%=userinfo.getstring("gender")%>" == "male")             $('select option:contains("male")').prop('selected',true);              else if ("<%=userinfo.getstring("gender")%>" == "female")             $('select option:contains("female")').prop('selected',true);         }          window.onload = setvalues;      </script>      <script type="text/javascript" src="<%=request.getcontextpath()%>/js/jquery.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/bootstrap.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/bootstrap.min.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/bootstrap-modal.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/bootstrap-popover.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/bootstrap-modalmanager.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/editinfo.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/holder.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/logout.js"></script>     <script type="text/javascript" src="<%=request.getcontextpath()%>/js/bootstrap-dropdown.js"></script> </body> </html> 

when run it, error:

org.apache.jasper.jasperexception: exception occurred processing jsp page /editinfo.jsp @ line 61

line 61 is:

value="<%=userinfo.getstring("email")%>"

i remove line , works fine (but need value). when keep line 61 , try remove this:

value="<%=userinfo.getstring("username")%>"

which @ line 52 of page, still doesn't work.

i replace line 52 line 61 , works.

i these errors:

javax.servlet.servletexception: java.sql.sqlexception: column 'email' not found. java.sql.sqlexception: column 'email' not found.

but i'm 100% sure database has email column. also, when try other columns of database, gives same error. works if "username" column. please me. how fix this?

the expression tags means <%= ....... >

has take semicolon (;) @ end of expression.

value='<%= userinfo.getstring("email") ; %>' 

i hope work ,please try this.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -