Win a copy of High Performance Python for Data Analytics this week in the Python forum!

rick collette

Ranch Hand
+ Follow
since Mar 22, 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 rick collette

Thanks for giving me pointers.

Unfortunately, even after I set onload event on the body tag, it still does
not work.

I guess something must be wrong somewhere else.
Hi,

The following code is on my second page. There is a form field called
time, I want to set it to user's current time after user hits submit button on the first page and comes to this page. I use javascript code like the following
to do that. But it seems it never sets the time value after I come to second page:

<script language="JavaScript">
times=new Date();
document.form2.time.value = times;
</script>
<form name="form2" action="nextPage.php" method="post">
<table>
<tr>
<td> Name:<input id="name" size="10" name="name"></td>
<td> Phone:<input id="phone" size="10" name="phone"></td>
<td> Zip Code:<input id="zipcode" size="5" name="zipcode"></td>
<td> Address:<input id="address" size="30" name="address"></td>
<td> Time:<td><input name="time" value="" readonly /></td>
</tr>
<tr>
<td><input type="button" value="Submit" name="Submit2"></td>
</tr>
</table>

I am wondering what I did wrong here?

thanks,
Hi,

I am working on some old swing code.
I have a swing form composed of combo boxes (actually components that mimic JComboBox behavior) and text fields. Say, I have a textfield on the top, and two combo boxes at the bottom. If user clicks textfield first, and press down arrow key, it goes down to the editable text field of first combo box, if user press key again, it goes to second combo box.

My question is: can I prevent user from using down arrow key to go through the form fields? instead, they can use tab key to go through fields, once they are at one of combo boxes, then user can use down arrow key to surf through combo box list.

I am wondering what controls the behavior of down arrow key events? Just have spent tons of time, and have not been able to figure it out.


regards,
14 years ago

Originally posted by Merrill Higginson:
A little JSTL should do the trick:

<input name="myTextField" type="text" value="<c ut value="${myBean.myProperty}"/>">

or if you're using a JSP 2.0 web container, simply:

<input name="myTextField" type="text" value="${myBean.myProperty}">

[ March 02, 2006: Message edited by: Merrill Higginson ]



Thanks for the reminder. I guess I can just use JSP expressions to populate form values.
14 years ago
JSP
Hi, guys:

I have a JSP page with a form of text boxes and dropdowns. Every time
when a user comes to this page, I will try to set form fields with values I
got from database which are put in session. I know we can use struts ActionFomrm to achieve this, but I cannot use Struts for this somehow. Is there any way I can do this using JavaScript or anything else?

regards,
14 years ago
JSP
Hi, guys:

I need a primary key (sequence) generator for multiple tables.

I will have to programatically store/retrieve primary keys and save them as
foreign keys for other tables using Java JDBC.

I also looked at AUTO_INCREMENT of MySQL, but how can I use it for multiple tables and retrieve the most recent key to use without producing duplications?

regards,
Hi, guys:

I have heard a lot about Websphere ApplicationServer 6.1 is gonna come out
this year. I am wondering if IBM has already released WAS 6.1? What are the new technologies it gonna support? Any web site has those detailed info?

regards,
14 years ago
Hi, guys:

I already installed SunOne 8.1 (Sun System application server, part of Sun Enterprise Server8.1) and Sun Web Sever, I am wondering how I can configure application server and web server to
let them work together so that user can access enterprise applications through sun web server? I cannot find any relevant documentation about this. Really appreciate your help.

regards,
14 years ago
Hi, guys:

I got the following exception when I try to runa simple jsp page:
org.apache.jasper.JasperException: File "/WEB-INF/struts-logic.tld" not found
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105)
............


the following is my jsp page:

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<logic:redirect page="/do/goToInitialPage"/>

taglibs specified in web.xml:

......
<taglib>
<taglib-uri>struts/bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>struts/html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>struts/logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
.........
struts-logic.tld is in WEN-INF folder

I double-checked everything many times, still cannot find out what is the
cause of this exception. I also unpacked war file in tomcat/webapps dir, and found struts-logic.tld is packed inside.

Anther thing is war file is never unpacked automatically when tomcat starts running. Is it because of the above exception?

regards,
14 years ago
Hi, guys:

I am stuck here with this problem. I created a Java project on
Eclipse, the reason is I have to use my own framework that won't
fit into a Tomcat project. But we are using Tomcat to run our application. Now I have to create datasource for Hibernate to use. If this is a tomcat project, I can set up DB2 datasource in Tomcat's server.xml. But it seems I cannot access this datasource set up in server.xml and web.xml using Hibernate code or JDBC code. I am wondering if there is a workaround for this?

regards,
[ February 02, 2006: Message edited by: rick collette ]
Thanks a lot, Henry. That solved my problem.


Originally posted by Henry Wong:


The "jar" command can be used to list, extract, and create jar, war, and ear files. I guess you can extract the ear file, copy in the war file, and bundle it up again. BTW, just don't forget to use the "M" option, when creating the ear file -- as you don't want a manifest.

Henry

15 years ago
Thanks.

Yes, I know war file should go inside ear file.
But how to do that? Is there a simple command to do that?

Originally posted by Scott Selikoff:
WAR files go inside EAR files.

15 years ago
Hi, guys:

I have a war file which includes web modules and a ear file which includes
enterprise modules. Before I deploy them to websphere, I need to merge them
into one ear file. I am wondering if there is any simple way to do that?

thanks
15 years ago
Never mind, something must be wrong with my Eclipse settings, seems it only accepts 1.3/1.4 compiler compliance level. Thats the problem.
15 years ago
Yes, I set up env and checked it from command prompt, and got
the following:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

And Eclipse atomagically detects new JDK version and sets its JRE.
Everything looks fine, duno what went wrong.



Originally posted by Susanta Chatterjee:
Did you make sure you are using correct JDK for building and running your app?

- Susanta

15 years ago