Howard Thompson

Greenhorn
+ Follow
since Nov 06, 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 Howard Thompson

Do most people see them as complementary interfaces/frameworks or having to make a choice to use one or the other? Struts is obviously much more mature/stable. Has anyone worked with both on something real?
A Few Links:
http://www.internetnews.com/dev-news/article.php/3322641
http://www.jsfcentral.com/
20 years ago
I have a Class-Path which has 11 jar files. If I use their real names, I go over what seems to be a line/character limit. The generated Manifest file from the jar command shows a cr lf having been injected. This results in part of the listed jar files not being included; those forced onto the second line. If I use an additional Class-Path statement, the last Class-Path statement becomes the only one that is used. If I simply put my list on 2 lines with just one Class-Path statement, the jar command indicates a syntax error. The only solution so far is to rename all the jar files to 1 1 character names as indicated below. It may also be possible to nest Class-Path references within the manifest files of the "sub"jars, so that the list at the top can be shortened.
There must be a better solution out there! The single character listing below does work however but there must be some special syntax to make this work with longer file names.
jar cvfm output.jar myManifest com *.jar
Manifest-Version: 1.0
Main-Class: com.mine.myclass
Class-Path: a.jar b.jar c.jar d.jar e.jar f.jar g.jar h.jar i.jar j.jar k.jar
Thanks
20 years ago
>For example,
>String s = new String("java");
>As I know, s is a referece, but I do not clearly >know what is a object. Does object only exist in >runtime? who can explain for it or show me a >example for what they are difference? Thanks in >advance!

a) As you have said, "s" is a reference. So, its just a small piece of memory with an address in it. That address points to the real object in memory.
b) The real object (the object created by your 'new String("java")' statement) is an instance of the class java.lang.String. That object is a chunk of memory with "java" in it along with some other class instance members (non-static variables) that hold information about the String object. It also has references to the methods of the String object. See java.lang.String in the Java 2 Platform, Standard Edition, v 1.3.1
API Specification
c) Oh, yes, the run time question. Well ... this may be tricky. Because quoted strings are pretty static in nature (the compiler already knows what you want in your string) it could be creating something at compile time. Certainly dynamically created strings are run-time. To answer this more you need someone with more insight into compilers and Java VMs.
My problem is setting up an initial value for a Radio field using Struts. In plain old HTML you could do something by adding a "checked" key word. With Struts there doesn't seem to be any "Checked" option.
With a "Select" I believe I can just assign "Value" to have my initial value; as read previously from a database (in the example its from the bean "account.") I believd this works ok.
<tr>
<td width="49%">Security Question</td>
<td width="43%">
<html:select property="securityQuestion" value="<%=account.getSecurityQuestionType() %>">
<html ptions collection="securityquestions" property="questionText" />
</html:select>
</td>
</tr>
The problem is with Radio buttons. From everything I've read, I either that have to :
a) Set the form field value to whatever is desired and it will show up correctly. But my problem with this is that I don't see how to set it initially based on a session/request bean. I tried looking at the form "reset" method, checking for "" as an initial value and then setting it to the desired session bean value. But, my reset method wasn't being called by default. I obviously can't use my Perform Action method.
b) I've seen some servlet code that spits out real html. I'd like to solve this using Struts taglib.
<tr>
<td width="49%">Type of Account:</td>
<td width="43%">
<logic:iterate id="t" name="accounttypeset" type="java.lang.String">
<html:radio property="accountType" value="<%=t %>"/>
<%=t %>
</logic:iterate>
</td>
</tr>
Any thoughts out there?
I'm still a bit green in the Java/Stuts/JSP world but I've done a fair bit of hunting.
Thanks,
Howard
21 years ago