Femi Alla

Ranch Hand
+ Follow
since Jul 05, 2002
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 Femi Alla

My notebook boots 2 operating systems, windows XP, 2000 Server and Red Hat Linux 9.0. It turns out that I spend more time on XP and as such it has so many installed applications and I am regularly seeking ways to free up space on the hard drive. I have observed that the JDK places a space consuming setup application in the E:\Documents and Settings\Femi Alla\Local Settings\Application Data directory at the start of the JDK installation. But never removes it afterwards. It sits there consuming space.
Not being sure why this application was sitting there, I left it. But decided to delete it after I upgraded my JDK and it remained.

You may have to �show hidden folders� to view the folders in question.

Location:
<Drive Letter>:\Documents and Settings\<User Name>\Local Settings\Application Data\{32A3A4F2-B792-11D6-A78A-00B0D0150030}\
These two make their home here:
J2SE Development Kit 5.0 Update 3 (Size:51MB )
1033.MST

Location:
<Drive Letter>:\Documents and Settings\<User Name>\Local Settings\Application Data\{32A3A4F2-B792-11D6-A78A-00B0D0150000}\
The files:
Java 2 SDK, SE v1.5.0.msi
1033.MST

There exists something similar at <Drive Letter>:\Documents and Settings\<User Name>\Application Data\Sun
But this folder seems to be more useful than the other one.

Can anyone offer useful any explanation about these folders?
14 years ago
Hi ranchers,

Does anyone know about a tutorial in video format on any Java IDE at all.
Like the one at this location: http://www.learnvisualstudio.net.

Any useful information would be greatly appreciated.

Thanks
Hi ranchers,

I created an RMI application using jdk1.5. When I used rmic to generate the stub and skeleton, it generated only the stub without the skeleton. When I tried to run the client from the client machine, I got an error along the lines of: Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: MyServerClass.

Can anyone explain this phenomenon and how this could be solved? I guess there's a new way of doing this in 1.5
15 years ago
I should have added this to my last post:
To get a full understanding of this application (the modified version of the jsmsengine) please point your browser to:
http://www.armnz.co.nz/cgi-bin/forum/YaBB.pl?board=AppProg;action=display;num=1092121920

Thanks.
15 years ago
Hi all,

I’m currently working on an SMS application using jSMSEngine which can be found at http://jsmsengine.sourceforge.net

In pursuit of this, I came across someone who’s successfully worked with jSMSEngine and downloaded the code he put up on his site, which is at: http://www.coneridge.com/jsmsengine/jsmsengine.jar
or
http://www.coneridge.com/jsmsengine

But I’m finding it difficult to get one of the packages his program imports.

The name suggests it’s one of those stuff from the apache foundation. Does anyone know how I could get this package?

Upon close inspection of the extracted source code of the Java API, which comes packaged with the SDK (j2sdk1.4.0 in my case) and found out that the folder that corresponds to org.apache. doesn't contain a log4j folder. It contains only 4 folders/packages: crimson, xalan, xml and xpath folders.


Thanks.
15 years ago
Thanks so much for those answers.

Richard, I've put the class in a package and included the <servlet-mapping>, like you and Nidhi said I should.

And William, I read

The Long and Sordid Tale of the Invoker Servlet

you linked me to and I got the message.
I think I've got it now, only that the page that comes up is blank.
First, I did as the FAQ page said at the begining of the page:

In the file conf/web.xml find a section of text that looks like this:


<!-- The mapping for the invoker servlet -->
<!--
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
-->
[/code]

You need to uncomment the servlet-mapping and then restart Tomcat. Your application should work now....


I uncommented these lines.
I did this just to see the application work, at least. But knew something was wrong when instead of displaying a webpage, I got a text file downloaded. Then saw it was in the part where the servlet sends the header [code] theResponse.setContentType("text.html"); [/code] . I fixed that to read [code] theResponse.setContentType("text/html"); [/code]. Then I put the servlet in a package named mypackage ( I always prefer to keep things simple at first. The package structure could get deeper later), and I added the <servlet-mapping> tag. But all I get now is a blank page. What am I doing wrong?

In a bid to solve this, I included my classes directory in the classpath. Still didn't work. I then chaged the way output is sent to the browser in the servlet, like this
[code]
ServletOutputStream out = theResponse.getOutputStream();
out.println("<HTML>");
[/code]
I think it's something to do with my web.xml file.

Listing of my web.xml file:
[code]
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2se/dtds/web-app_2_2.dtd">

<web-app>
<!-- Application that implements Wireless security for GSM networks in this case, Nigeria -->

<display-name>Wireless Security application</display-name>
<description>
This application uses a client - server model to implement a Wireless security mechanism for
GSM networks.
</description>

<!--
I'm supposed to declare parameters here, but chose not to, yet
-->

<context-param>
<param-name>myParameter</param-name>
<param-value>myValue</param-value>
<description>
This parameter represents nothing sensible......
</description>
</context-param>

<servlet>
<servlet-name>HelloServlet</servlet-name>
<description>
This servlet does this and this.....
</description>
<servlet-class>mypackage.HelloServlet</servlet-class>
<init-param>
<param-name>NoParameter</param-name>
<param-value>NoValue</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/gsm</url-pattern>
</servlet-mapping>

<session-config>
<!-- How long to wait before the session times out-->
<!-- 30 minutes -->
<session-timeout>30</session-timeout>
</session-config>

</web-app>
[/code]

Any useful suggestion would be greatly appreaciated.

Thanks.
15 years ago
Greetings everyone,

I would appreciate a little help from all the gurus out there.....

Tomcat refuses to bring up my servlet. I know I've done something wrong somewhere but can't figure out where.

Now let me confess all my wrong deeds:

I'm trying to run servlets (and JSPs) by installing tomcat on j2sdk1.4.0 (and not using J2EE sdk).
I have apache Tomcat 4.1.18 installed.
I set the JAVA_HOME environment variable to the directory where the J2 SDK is installed on c: (c:\j2sdk1.4.0)
I also have APACHE_HOME set to the location of the tomcat installation. But then, while troubleshooting, I also added CATALINA_HOME and made it point to the same location. (My thinking is this wasn't nessesary, but it wouldn't hurt. Was I right?)
I have included all the environment variables below in case it would help....

In the webapps directory which resides in the tomcat installation directory, I have my directory named gsmsecurity, which contains a WEB-INF subdirectory. This WEB_INF subdirectory now contains to other subdirectories: lib and classes. My servlet resides inside the classes folder. Now the examples folder that comes with tomcat is on the same level with my gsmsecurity folder.

After starting tomcat, I point my browser to http://127.0.0.1:8080/examples/servlet/HelloWorldExample to bring up the HelloWorld example servlet. But when I do: http://127.0.0.1:8080/gsmsecurity/servlet/HelloServlet I get a tomcat error report page: HTTP status 404.
When I try different urls e.g http://127.0.0.1:8080/gsmsecurity/HelloServlet, the result is the same. Even when I put HelloWorldExample inside my classes folder and tried to bring it up, I didn't succed. My conclusion was that this was probably because there was no web.xml file in the WEB-INF folder. I put a minimal amount of things in the xml file and put it up, but the problem persists.


I would appreciate it greatly if someone could tell me what I'm doing wrong here.

Here's a listing of my Servlet. It's s simple one to let me know everything OK,before serious work begins


A listing of my web.xml file:

his is the song tomcat sings anytime it starts up:


My environment variables:


Another question I have is, why does http:\\localhost:8080\blah,blah not work for me?

Maybe it would also help if I mention that I am running Windows 2000 professional without IIS installed.

Thanks for reading up to this point. You could as well kindly pass a comment or two.......
15 years ago
Hi everyone,

When I write applets, and then have to make some modifications, it turns out that Internet explorer continues to display the old applet. It doesn't even help when I delete temporary Internet files. It's obvious that the applets are cached somewhere. Does anybody know where?

I use IE6 on Windows 2000, but I think the behaviour is the same on the lower versions of IE I've used.
15 years ago
Greetings!,
This is a follow up question to this one I asked several months ago. I managed to escape using the JTable and implementing my TableModel etc as the application worked OK using JTextArea. Now, there's no escape. I have to use a JTable. I'm making progress but still haven't got it yet. I still need a little help...
Dear Jose Botella , I downloaded the chapters you linked me to back in November and they made a big book.Scared me...
I tried using Vikalp Setya's example (above) - thanks so much Vikalp.

and used


to call it up and had it crash at runtime. In case the error messages would help give an insight into the problem, here it is;

Any useful suggestions would be welcome...
Thanks.
15 years ago
Greetings everyone,

I found myself in a quiet unusual situation. I need to display an applet on a JPanel. But can't seem to figure out how to go about it, or it would be possible at all. I kind of think this should be possible since Applet is a subclass of Panel.

I'm would like to display the Applet on a JPanel, which is part of a JTabbedPane and I don't know how I can go about doing so.
I attempted trying to take swing components ability to display HTML a little futher but it didn't work.
Since something like this is possible:


I created a Panel and made it contain only one label , which would be displayed when the appropriate tab is clicked. Now the label contained HTML but with the applet tag. [Dont laugh!. Didn't know what else to do. ]

Here:



But then at runtime, I got all the exceptions:



This is making me to think that my solution lies in the javax.swing.text.html, and the javax.swing.text packages. If this is so, is anyone familiar with these packages, or does anyone have any idea how I could
achieve what I want to achieve?

Any useful suggestions would be appreciated.

Thanks so much.
15 years ago
Thanks so much Joe,
Fixed it.
Just in case anyone's looking... here's the code that got it fixed:

Again, thanks.
15 years ago
Thanks Jeanne, for that answer.
The instructions page of this tool warn against using Drivers that don't support metaData... You are right.
What do you think of the tool by the way?
Hi all,
I tried to use the TableGen tool I mentioned in the previous post with a database I had created using Microsoft Access (This is because there's this application I'm currently developing and the end user wants it to work with MS Access), but ran into a problem. The output when run shown below:

Here's the portion of the code I figured generated all them Exceptions.

Question [1]
I'm begining to think that it may be that MS Access doesn't support the use of foreign keys. Is my diagnosis right?
Question [2]
On the web page for TableGen, it was tested on MySQL,Oracle, DB2, Prostgressql and Sybase. All the big RDBMS.... Someone who should know once told me MS Access is an RDBMS too (and I've believed this all these while), is this true? I mean if it doesn't support the use of foriegn keys, then how can it be relational?
Please let me know what you think.
Thanks.
Greetings everyone,
I stumbled on this tool/application I think could be useful in developing programs that use JDBC.
It's called TableGen and it's at http://www.codeguru.com/java/articles/646.shtml
Quoting from the page "This package automatically generates classes to represent tables within a database. It is released under GPL..........TableGen has been tested with the following database/driver combinations. As well on Linux/Solaris/Windows NT....."
Does anyone know about this package and if there have since been updates or modifications.
I would really appreciate your comments.