Justin Muir

Greenhorn
+ Follow
since Jul 01, 2010
Merit badge: grant badges
For More
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 Justin Muir

Thanks for the reply, i see i need to configure the F5 device actually.
13 years ago
Thanks for your reply, but i am actually not sure, no-one seems to know and i only just heard about this F5 a couple days ago, i have tried reading through the docs for it but haven't found anything about it...

I have made some changes to the httpd.conf and now its giving the error when i try start apache - cannot open shared object file: No such file or directory

Syntax error on line 142 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/mod_jk.so into server:
13 years ago
I did see a post about this, but wasn't answered. I have 2 servers each with tomcat 5.0.28 on them, I am trying to set up a cluster but when i do as the instructions say in tomcat clustering references, the server which has the apache on it, you can't log onto the browser gives error 503 couldn't connect on port 80.

So i am not sure if there is something preventing it from working on the F5 device? I have been at this co. for 3 months and nobody seems to know anything about this so i have to figure it all out myself.

Please if anyone knows anything or why this might not be working please help!

Thanks!
13 years ago
Thanks, it is correct though. I had it just as that because i was using another class as a test
13 years ago
JSP
Thanks man, but i got it working now.

Onto the next problems now haha... I'm new to the Web dev. side and actually haven't worked with Java for quite a while so just getting the hang of things
13 years ago
JSP

Rahul Nair wrote:You may validate the form using java script, so that the user will not provide the empty string in the Search Box.


Yes but i mean when i run the project, or load it, it gets that there is no text in the box and then sits forever trying to load the page. I am assuming this is because
it is finding everything with just a white space?

Not sure though
13 years ago
JSP
Thanks, that loads without an error,

But now i think what is happening is that it is searching for EVERYTHING in the database i think because it searches for " ".

Please help me to just bring up the jsp and then only search when they enter text. Not when it just loads that it searches
13 years ago
JSP
Hi

I have a JSP that has just a search box on it and should get results from MySQL Database (So not sure if this should be here, but i think)
The problem is that when it loads for the 1st time obviously it passes the queryText to the java class as a null value then give NullPointerException.
My code in the class for getting the queryText is

But i had the page open from an earlier run and i entered text to search on, and it DID display from the database...
I then have a CreateQuery() method.
The 1st line is
And here it gives a NPE if i leave out the check above to see if
So i don't know how to split the words, but also if i check if the field is blank it gives a NPE on startup??
By the way i send it to the class from the jsp like this: search.setQueryText(queryText);

Hope i've made sense!!

And please any help Thanks!
13 years ago
JSP

Bear Bibeault wrote:Welcome to the Ranch.

For me, step 1 would be to refactor the JSP to include no Java scriptlets. Scriptlets have been discredited since the introduction of JSP 2.0 over 8 years ago.

You might want to read this article for some ideas on modern web application structure.

As it stands, you've posted a lot of code without any indication of where the error is occurring. Does not the error message include information that helps to narrow the location of the problem down? You might want to at least include that in your post.

Even better would be to narrow down the scope of the code you post to that which is causing the issue.




Thanks Bear, but yes its telling me that the error is occuring in the getOffers() method, with a nullPointerException.

I am passing through the offerid from the JSP which is stored in the cookie, and so i don't know why this is causing the problem.

I found that it is getting caught in the last catch block of the getOffers() method. So don't know if you might know why this is then?

Thanks in advance
13 years ago
JSP
Thanks a lot for your guys reply, sorry i know i posted a lot the reason being that i have just been trying for quite a while and can't seem to sort it out and don't
know where the problem is, so thought if i give most of the code, someone might be able to see a problem.

And yes, i know its too much java in the scriptlet but i'm still new with this subject and don't know too much on how to use servlets etc.

The reason i'm using cookies is because our site runs on 2 servers and so if i use a seeion, it can transfer to the other server and then will be a different session (I think).
So i've been told the best way is to use cookies...

But thanks, i will try do some more research and see if i can find the specific problem
13 years ago
JSP
Hi

I am trying to create an "Add to shortlist" functionality for our website. I have a jsp and a java class which should connect to the database and then display the results according to the specific "offerid" that the user added.

I am using cookies to store the offerid's and it displays the cookie values (offerid's) on the page but doesn't get the data from the bean, in the Tomcat console its telling me NullPointerException, but i'm really battling because i'm quite new to this so don't know what i'm doing wrong.

Here is my jsp so anyone can try tell me if something is wrong in it. Sorry i'm posting all this it's just i'm getting no where and really don't know where i'm going wrong now



And here is my bean (class)



Pleeeeease can someone out there help me, i have no-one to ask and my job is on the line as i'm on a 3month probation here.
13 years ago
JSP