Luis Cardenas

Greenhorn
+ Follow
since Oct 26, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Luis Cardenas

You mean this?
139 ROW IS 118
2 years ago
JSP
Curious I didn't see it that way... Well my problem is when I click on my buttons the null exception appears,
I have 2, and none of them work
2 years ago
JSP
Hello there fellows,
I've been doing a JSP about a teacher, that needs to log in, and when he does and his acc is verified in a database (db4net) he stays in the JSP,
the problem is all of the data gets returned to the JSP from the database (name, last name, cellphone, sex etc.) then I made a Combo Box where it
shows the different subjects he teaches.... in this case it shows "Math 5" and "Advanced Math" .... the thing is when I try to like select a subject and run
it with a button to get it "out.print" it shows me this annoying error of "java.lang.NullPointerException", so then I worried and tried to do a simple Combo Box
and also the "java.lang.NullPointerException" error came, but anyways here's my code (sorry for spanish code, tried to
translate it a bit). I put it in color red, hope you can help new to programming

2 years ago
JSP
Hello boys and girls,
I have a jsp page that pops to me this error (I know it is about my JOptionPane)

HTTP Status 500 - Internal Server Error

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
root cause

java.lang.NullPointerException
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs.

GlassFish Server Open Source Edition 4.1.1


and the following is my code, let me know what I am doing wrong, a part form being born

<%@page import="BEAN.LoginBEAN"%>
<%@page import="DAO.LoginDAO"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
   <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>JSP Page</title>
   </head>
   <body>
       <form ACTION="Entraste.jsp" METHOD="POST">
           <h1>Iniciar Sesion</h1>
           USUARIO <input type="text" name="txtUsu" value="Ingresar Usuario">
           PASSWORD <input type="password" name="txtPas" value="">
           <input type="submit" name="btnClickPapa" value="Entrar">
       </form>
           <%
               String usuario = request.getParameter("txtUsu");
               String password = request.getParameter("txtPas");
               if(usuario.equals(null) || password.equals(null))
               {
                   %><font color="red">¡Usuario o Contraseña vacios!</font><%
               }
               else
               {
                   %><font color="red">¡Usuario o Contraseña incorrectos!</font><%
               }
               LoginBEAN hola = new LoginBEAN(usuario, password);
               LoginDAO bola = new LoginDAO();
           %>
   </body>
</html>
2 years ago
JSP

Dave Tolls wrote:OK.
So the next step is to read the data you want to display for that log in.
Have you got Java code that works with that?

That would (IMO) involve having a class model that represents the data.



Yeah but that is in a new JSP, like my Login.jsp, I log in with a username that I have, for example
Username: 'a10001'
Password: 'heythere'

and In my new jsp, let's say Info.jsp, I don't know how to import the username I logged in ('a10001'), so that I can do
a "select 'bla bla bla' from student, logger where usernameStudent = 'a10001') something like that, like I don't know how to use
the same variable that I correctly matched the login
2 years ago
Hey guys, idk how to personally reply hahaha

Dave Tolls - I can log in, I put my username and password and it does verify and that, I have that good to go

Campbell Ritchie - Thanks man I think I am going to learn a lot from the big guys!

Knute Snortum - the SQL I got it good, I need help frist trying to, when I log in it shows my grades and classes I have for that student that logged in
2 years ago
Hey guys I am new to this place,
I have 2 simple questions (Java Newbee here) I have a database named school.
1. What I want to do is when I enter a certain username and password it shows me my grades (Like math, history bla bla) and which
classes I'm in according to my current grade (6th grade, 7th grade) my database is connected and that and If the username and password is
in the db I can enter the next page, but how can I show those values? The same thing goes with teacher that he enters with a username and
password and he, according to his class can put up grades to his students (only the ones that are in that class)

PS: I already did the foreign key thingy and they are already related

2. My second question is the same thing for grades, but with class attendance

Hope you guys can help this newbee!
2 years ago