Rick Harding

Greenhorn
+ Follow
since Mar 02, 2004
Merit badge: grant badges
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 Rick Harding

I figured out what I did because I did it again

In eclipse I changed the name of the class and had it change the name of the compilation for me.

Once I did that I can't run with the run icon. I have to first go and tell it to run as a java application again. If I don't tell it to run as java application it seems to want to run as the old name and can't find that class any longer because it has been renamed.

Thanks for the help all.
19 years ago
It's on Windows XP. I am honestly not sure what I hit, but I hit something that ran it differently from eclipse.

I tinkered with the drop down and it seems to be working again.

Guess that is just some fun of learning a new language.
19 years ago
Ok, I am looking for some help again. I am trying to work on this heap program and I am learning java while I do it.

I am getting this error on compile:
Could not find the main class. Program will exit.

I am using Eclipse 3.1.0

I know it's a lot of code, but I am not sure what to leave out.

Any help is really, really appreciated.


[ September 29, 2004: Message edited by: Rick Harding ]
19 years ago
Thanks for the help everyone!
19 years ago
I am trying to read in a file of integers for a heap sort program. The problem I am having is that the code will only grab the second digit. If the integer is only a single digit it will throw an error on me.



Data File:


10
11
13
19
34
12
45
91
91
16
33



Output:


C:/test.txt
0
1
3
9
4
2
5
1
1
6
3


[ September 28, 2004: Message edited by: Dirk Schreckmann ]
19 years ago
yep, as long as I use the uri without the _rt on it I am fine.

Thanks for the help and helping me understand a bit more about how all this works.
19 years ago
JSP
Ok, I am a bit confused. I THOUGHT that the jakarta-taglibs were 1.1. Now I tried to change the taglib to core_rt and got errors. The placing of the <%@page isELIgnored="false"%> in the file helped get the EL expressions to work in Eclipse so that is cool.

So can you explain how with Tomcat 5.0.28 (which I thought was a JSP 2.0 container) and the jakarta taglibs are somehow acting like a JSP 1.2 with 1.0 of the libs? Is there some kind of fallback mode or something I might be running into?
19 years ago
JSP
Naw, not a cross post. I know better than that. I had a different problem earlier in servlet forum that someone suggested I wait on using eclipse.
19 years ago
JSP
ok that worked.

I am using eclipse and it seems that somehow by using eclipse it must not be reading the web.xml file. Sorry to bug you with something like this. I guess the poster in my other thread was right, I should probably start without eclipse. I am just used to having a nice code comletion IDE when coding.

Thanks for the help!
19 years ago
JSP

Originally posted by Bear Bibeault:
Btw, the taglib declaration in your web.xml is not necessary -- Tomcat will find the tld in the standard.jar file automatically -- and is wrong (specifies the URI for version 1.0 of the JSTL). The URI you are using on your page contains the correct (JSTL 1.1) URI.


Thanks, I was following some instructions I found. I removed it.

Ok, I updated the web-app declaration and still not replacing of EL expressions. Everything I read and search for seems to imply that it is something that should be on by default as long as it is specified as version 2.4 in the web.xml file.

Anything else I am missing?

P.S. You do have the JSTL 1.1 jars, right?


I am using jakarta-taglibs-standard-current.zip from today. They are supposed to be 1.1 supporting from what I read.

[ September 01, 2004: Message edited by: Rick Harding ]
[ September 01, 2004: Message edited by: Rick Harding ]
19 years ago
JSP
Ok, I read some more up on the web.xml file and I don't see how what I am doing comes into being a servlet and must be defined in the web.xml so. I just have a single index.jsp file that I am playing with. The full content is this:



I am sorry for being so new to this stuff, man you have to have a LOT more environmental stuff to get JSP working than PHP.
19 years ago
JSP
I am sorry, forgot some info.

Yes I am running Tomcat 5.0.28 and my web.xml file is just enough to get my JSTL to work:


<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4">

<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>;
<taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
</taglib>

</web-app>



Putting ${3+7} does not output 7, just that exact text so it seems I have something wrong that does not parse properly? Any ideas?
19 years ago
JSP
I finally got the JSTL to work out and I am going through some sample things in a beginner JSP book I have. They have one code sample:



The loop is working. I changed it to iterate a certain number of times just fine, but as it is I only get one row of output and it outputs the text "${entry.key} - ${entry.value}" and does not seem to actually get any header info and cycle through all of it.

I have searched around trying to figure out if this is a bad method of getting header info, but I can only find commands for getting a specific part of the header like:


Can anyone fill me in on what I am missing to get the sample book code to work?

Thanks
[ September 01, 2004: Message edited by: Rick Harding ]
19 years ago
JSP
I am trying to set up eclipse with tomcat on windows XP. I am following the tutorial here:
http://javaboutique.internet.com/tutorials/three/index-6.html

This is the page I get stuck on. I can get the hello world sample working, but I am really confused as to where I put what files and how this all works. There are several folders and I understand that general jsp files just go in the project directory. Since the tutorial is creating a class, should the file end in .class and be created in the web-inf/classes directory? If I create a class file in the project root will it compile the class into a .class file in the web-inf folder? I guess I am really confused how it works and what I should be doing in creating a project here.

Any tips and links to places that go into great depth of this is really appreciated. Sorry to sound so noobish, I have been working in PHP for the last three years and want to give JSP a try. I know a little java just from a beginner class in college.

Thanks
Any other ideas?
20 years ago
JSP