Zac Roberts

Ranch Hand
+ Follow
since Jan 29, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Zac Roberts

We'll all be winers if we don't win right!
22 years ago
JSP
I did not try it on different machines yet but that is also a good point...
22 years ago
JSP
Maybe you need to iterate through your ResultSet, something like this...
22 years ago
JSP
Jose -
Great solution, I just tested on Tomcat with Windows NT and lo and behold up came my user name...
22 years ago
JSP
... and I had a type, you also need a space like this one...
<%= MyClock.getTime() %>
22 years ago
JSP
Also what output are you getting... and for one thing, this line
<%= MyClock.getTime()=%>
needs to lose an equals sign like so...
<%= MyClock.getTime()%>
22 years ago
JSP
Maybe you can show us your MyClock class...
22 years ago
JSP
I often have to create browser based CD ROMs for customers and we are very limited as to what we can do. Of course anything requiring a Web Server such as JSP or ASP is out of the question. You are basically stuck with HTML/JavaScript unless you go with something like Macromedia Director to create your content but this is much different than using a web browser.
22 years ago
JSP
I think there could be some games developed with JSP but they would definitely not be like an arcade type of thing. They would be games that would require a step by step process, such as you roll the dice, then depending on the outcome, you make another decision. Card games, casino games, storyboard games, board games, games that run in a straight line if you know what i mean...
22 years ago
JSP
Anybody program any server side interactive games using JSP? Anyone have any good ideas for any? We need a little entertainment in this forum too right!
22 years ago
JSP
Dave Vick is right, you will definitely need to use escape sequences for this... here is a link to some....
Scroll about half way down on this page...
http://mindprod.com/jcheat.html
22 years ago
JSP
I like the sound of these cooperating tags and would like to learn more about them. I have only done some very small stuff with TagLibs but I found that I just kept adding attribute after attribut to one big huge tag. It's hard to decide when to stop adding attributes and actually just create a new tag. For instance, if I have a tag that creates an HTML table with certain information, do I use one tag to create the structure of the table and another to create the information within the table? That's the sort of thing I would like to learn more about.
22 years ago
JSP
What is an NT authentication? Is it like using basic or form based authentication in a web app using JSP?
22 years ago
JSP
Sorry in my last post number 2 should be:
public ResultSet getPHONE() instead of
public String getPHONE()
22 years ago
JSP
I think there are a number of things that you could be doing differently here. First I will say that getting a ResultSet from a JavaBean to a JSP can be strange at first. Here is how I would do it (This may not be the best way and I have not coded it exactly but you should get the idea):
1. Create a method in your bean that connects the database... so for your purposes it would be...
Connection con
public void connect() {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbcdbc:MyDatabase2");
}
catch(Exception e)
{
System.out.println( "error: connection to " + "sun.jdbc.odbc.JdbcOdbcDriver");
}
try{
}
catch(Exception e)
{
System.out.println( "error: connection to DriverManager");
}
}
2. Then create a method that returns a ResultSet... like so for your example it would be something like...
public String getPHONE()
{
try{
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM CONTACTTABLE");
}
catch(Exception e)
{
System.out.println( "error: SQL query");
}
return rs;
}

The create a JSP that uses that JavaBean and populates the HTML like so ...
<ul>
<%
theBean.connect();
ResultSet rs = theBean.getPHONES();
while(rs.next()) {
%>
<li><%= rs.getString("aDatabaseColumn") %></li>
<%
}
%>
</ul>
Also you should create another method in the bean that disconnects the database connection...
Sorry I did not code it all out perfectly for you but hope that helps some...
22 years ago
JSP