Lido Collins

Greenhorn
+ Follow
since Apr 27, 2006
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 Lido Collins

Sorry, yes, I downloaded the ajaxtags taglib from here:
http://ajaxtags.sourceforge.net (their forum has no action so I'm posting here), but I'm having some general trouble working with it.

It uses this class/method to handle ajax requests:


My trouble is that it isn't working and I can't figure out a way to view the output of the structures in the servlet. I tried setting some session attributes but when I read them in the calling jsp (after a page reload) they are still null. Is there a way to turn some kind of debugging output on and direct it to a specific console or something? Thanks.
17 years ago
JSP
I installed the jar and all the dependencies. It looks like the demo stuff at least tries to work (the indicator spins though the autocomplete fields don't actually populate). Then I put nearly identical code into my own jsp and nothing happens. No autocomplete, no indicator, no error messages. Any idea how to see if anything is happening? Thanks.
17 years ago
JSP
Yes, I have that web-app tag instead of the DTD etc tag in web.xml. I will try that line in the jsp and see what happens. I will also double check the package situation. Thanks.
17 years ago
JSP
Thanks, but that didn't help. Still getting the same output. I tried taking the .tld files out of the directory and taking the <taglib> section out of web.xml first, but that didn't work. Then I put the tld files back, added the <taglib> section back into the web.xml file and then put the <jsp-config> tags around that, still no change.
17 years ago
JSP
I've followed everything I thought I was supposed to after reading the install info and a few FAQ's for jstl and it's not working for some reason (though the standard-examples web app is working with jstl). You can read about that issue in this thread here.

For now I need to work with an ArrayList of objects that is stored in a session and I can't figure out how to do it without jstl. Are there any examples of this anywhere? Thanks.
17 years ago
JSP
I'm using Tomcat 5, and I think it's JSTL 1.1.2 which when I downloaded said it would work with jsp/servlets under Tomcat 5 because all containers are compatible (something like that).
Also, the standard-examples are working... I even tried copying the standard-examples web.xml <web-app> tag. Commenting this out:

and adding this:


[ April 30, 2006: Message edited by: Lido Collins ]
[ April 30, 2006: Message edited by: Lido Collins ]
17 years ago
JSP
Wouldn't I need a bean to handle the fact that Customer is an object?

Now I think I have a problem with my jstl installation. I redeployed my war file and had to copy the two jars into the lib folder and the .tld files into the WEB-INF file and I'm not sure it's working. Here's my new test file based on your suggestion:

Here are the results:


[ April 30, 2006: Message edited by: Lido Collins ]
[ April 30, 2006: Message edited by: Lido Collins ]
17 years ago
JSP
I added this line to my class:

and put the compiled class in: WEB-INF/classes/storePackage/

Then I changed my jsp to:

Now I'm getting this:


[ April 30, 2006: Message edited by: Lido Collins ]

[ April 30, 2006: Message edited by: Lido Collins ]
[ April 30, 2006: Message edited by: Lido Collins ]
17 years ago
JSP
Thanks, I will look up how to make the package.
17 years ago
JSP
Ok, I installed Taglibs and set up 'core' to be part of my web app. Now I made a little test jsp. I have a class called "Customer" in my WEB-INF/classes folder (and sources of course), "results" is an ArrayList of Customer objects that is stored in the session:

But I'm getting the "cannot be resolved to a type error" on my "Customer" class which is sitting in the WEB-INF/classes folder.

[ April 30, 2006: Message edited by: Lido Collins ]
17 years ago
JSP
I've got an ArrayList of Product items created in a servlet and passed into a jsp that I need to display in the jsp. Can someone point me to a howto on this or some examples that show how to iterate through the list and display the fields of the Product objects stored in the ArrayList? I'm not particularly familiar with Beans yet so I will be reading up on that. Thanks.
17 years ago
JSP
Tom,

Thanks! I did not notice that. I solved the problem by just getting a new connection in the Search servlet, but I will go back and see if I can share the connection that way.

William,

Thanks for the link to the FAQ. I did not uncomment the invoker so I think I'm ok there, but the faq did point out that the web.xml couplets for the servlets should be grouped together by type rather than in pairs. Although mine seems to be working as is, I will change the web.xml to be grouped by type rather than how they are now (in pairs by servlet).

17 years ago
I'd be up for hearing about a better design, but I couldn't figure out a better one. I'm not confident I could set up JNDI and even if I did I might still have this problem if I was using multiple servlets. Maybe I could do it in a way where the servlet doesn't need anything from the session and just gets information via forms, but can I pass an arraylist from the servlet to a jsp in the response without disturbing the user's existing session (since the servlet won't have access to it)?
17 years ago
Do you think this is the problem? I think it autoboxes to a string or something because userId is available in the jsp which is called by login:

<!-- Hi <%= session.getAttribute("userId") %> -->

shows as:

<!-- Hi 490002 -->

when I view source on the page.

- as I said, the main problem I'm having is that the session is gone when I call a second servlet from a form in a jsp (which was called by Login servlet).
17 years ago