Angelo Watson

Ranch Hand
+ Follow
since Oct 27, 2002
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 Angelo Watson

can you implement an event handler on a JLabel
21 years ago
Im creating my UI and I want to create a calendar that shows all the days of the month.
Basically I need help creating a calendar the only thing that I dont know how to do is creating a white box and inside that box it contains one of the days.
Thank You for your help.
21 years ago
All you need to know is to import org.omg.CORBA, and org.omg.CosNaming
Here is a good site that i created:
http://users3.ev1.net/~apenalosa/hello1.html
21 years ago
What are you returning in your doStartTag()
21 years ago
JSP
I dont think you do if you return SKIP_BODY in the doStartTag()
21 years ago
JSP
Thank You jianqiang huhu I kindof figured it was that simple. Thanks again
21 years ago
import java.awt.event.*;
import javax.swing.*;
public class ClassA extends JFrame {
public ClassA() {
super("Hello World");
Container container = getContentPane();
JButton button1 = new JButton("Button 1");
button1.addActionListener(
new ActionListener() {
pubic void actionPerformed(ActionEvent e) {
ClassB app = new ClassB();
app.setVisible(true);
}
}
);
container.add(button1);
setSize(400,400);
setVisible(true);
}
}
Another Class:
import java.awt.event.*;
import javax.swing.*;
public class ClassB extends JFrame {
public ClassB() {
super("Hello World");
Container container = getContentPane();
JButton button2 = new JButton("Button 2");
container.add(button1);
setSize(400,400);
setVisible(true);
}
}
When I hit "Button 1" in Class A it will show ClassB, but when I close ClassB it closes Class A also.
My question is is there a way I can ONLY close ClassB.
Hopefully this helps.
21 years ago
import java.awt.event.*;
import javax.swing.*;
public class ClassA extends JFrame {
public ClassA() {

super("Hello World");
Container container = getContentPane();
JButton button1 = new JButton("Button 1");
button1.addActionListener(
new ActionListener() {
pubic void actionPerformed(ActionEvent e) {

ClassB app = new ClassB();
app.setVisible(true);
}
}
);
container.add(button1);
setSize(400,400);
setVisible(true);
}
}
Another Class:
import java.awt.event.*;
import javax.swing.*;
public class ClassB extends JFrame {
public ClassB() {

super("Hello World");
Container container = getContentPane();
JButton button2 = new JButton("Button 2");
container.add(button1);
setSize(400,400);
setVisible(true);
}
}
When I hit "Button 1" in Class A it will show ClassB, but when I close ClassB it closes Class A also.
My question is is there a way I can ONLY close ClassB.
Hopefully this helps.
21 years ago
I have two User Interface classes - Class A and Class B
I have Class A calling Class B by a button. When I close Class B it closes Class A, what I wanted is to go back to Class A and not close it.
Please Help, Thank You
21 years ago
I created a table in cloudscape using JDBC3.0, created a servlet, html form, and the DD.
servlet - C:\tomcat\webapps\test\WEB-INF\classes
html - C:\tomcat\webapps\test
DD - C:\tomcat\webapps\test\WEB-INF
In the DD I named the servlet to Support and specified the right path and also gave its mapping and the url-pattern.
When I hit submit on the html form it gives an status error code 503
What should I do?
21 years ago
I created a table in cloudscape using JDBC3.0, created a servlet, html form, and the DD.
servlet - C:\tomcat\webapps\test\WEB-INF\classes
html - C:\tomcat\webapps\test
DD - C:\tomcat\webapps\test\WEB-INF
In the DD I named the servlet to Support and specified the right path and also gave its mapping and the url-pattern.
When I hit submit on the html form it gives an status error code 503
What should I do?
21 years ago
Im using: Tomcat4, JDBC 3.0, Cloudview
I created a simple technical support form, that asks the common informations(firstName, lastName...) this is in my c:\Tomcat\webapps\test
directory.
The source code for this is:
<html>
<head>
<title>IT Department</title>
</head>
<body>
<h1>Technical Support Request</h1>
<hr><br>
<center>
<form action="/servlet/techSupport" method="post">
<table align=center width=100% cellspacing=2 cellpadding=2>
<tr>
<td align=right>First Name: </td>
<td><input type="text" name="firstName" align=left size=15></td>
<td align=right>Last Name: </td>
<td><input type="text" name="lastName" align=left size=15></td>
</tr>
<tr>
<td align=right>Email:</td>
<td><input type="text" name="email" align=left size=25></td>
<td align=right>Phone:</td>
<td><input type="text" name="phone" align=left size=15></td>
</tr>
<tr>
<td align=right>Software:</td>
<td>
<select name="software" size=1>
<option value="Word">Microsoft Word</option>
<option value="Excel">Microsoft Excel</option>
<option value="Access">Microsoft Access</option>
</select>
</td>
<td align=right>Operating Systems:</td>
<td>
<select name="os" size="1">
<option value="95">Windows 95</option>
<option value="98">Windows 98</option>
<option value="NT">Windows NT</option>
</select>
</td>
</tr>
</table>
<br>Problem Description
<br>
<textarea name="problem" cols=50 rows=4></textarea>
<hr><br>
<input type="submit" name="submit" value="Submit Request">
</form>
</center>
</body>
</html>
This my DD and its under c:\tomcat\webapps\test\WEB-INF directory.
The sourcecode is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

<servlet>
<servlet-name>techSupport</servlet-name>
<servlet-class>TechSupportServlet</servlet-class>
<init-param>
<param-name>driver</param-name>
<param-value>com.ibm.db2j.jdbc.DB2jDriver</param-value>
</init-param>
<init-param>
<param-name>protocol</param-name>
<param-value>jdbc b2j</param-value>
</init-param>

</servlet>
</web-app>
Two of my classes are on c:\tomcat\webapps\test\WEB-INF\classes directory.
PROBLEM: When I access my html page, and hit submit, its saying that it cannot find the class file techSupport.
21 years ago
Thank You so much.
21 years ago
JSP
This is a simple hello world custom tag.
Im storing my TLD and DD in the WEB-INF directory, and by the way Im using Tomcat 4.
When I start the server it doesnt properly startup , it gives me a bunch of errors.

This my source for TLD:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>Hello World</short-name>
<description>A Simple Hello World</description>
<tag>
<name>helloworld</name>
<tag-class>custom.ch09.HelloWorld</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
This is the code for web.xml
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>Chapter 9 examples</display-name>
<description>Really simple Hello World</description>
<taglib>
<taglib-uri>/helloworldtags.tld</taglib-uri>
<taglib-location>/WEB-INF/helloworldtags.tld</taglib-location>
</taglib>
</web-app>

When I try to access it using http://localhost/test/hello.jsp
This is the error it gives me:
org.apache.jasper.JasperException: null(-1,-1) File "/helloworldtags.tld" not found
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:180)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:799)
at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:219)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
21 years ago
JSP
This is a simple hello world.
Im storing my TLD and DD in the WEB-INF directory, and by the way Im using Tomcat 4.
When I start the server it doesnt properly startup , it gives me a bunch of errors.

This my source for TLD:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>Hello World</short-name>
<description>A Simple Hello World</description>

<tag>
<name>helloworld</name>
<tag-class>custom.ch09.HelloWorld</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
This is the code for web.xml
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>Chapter 9 examples</display-name>
<description>Really simple Hello World</description>
<taglib>
<taglib-uri>/helloworldtags.tld</taglib-uri>
<taglib-location>/WEB-INF/helloworldtags.tld</taglib-location>
</taglib>
</web-app>

When I try to access it using http://localhost/test/hello.jsp
This is the error it gives me:
org.apache.jasper.JasperException: null(-1,-1) File "/helloworldtags.tld" not found
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:180)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:799)
at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:219)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
21 years ago