Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Bernardus Irmanto

Greenhorn
+ Follow
since Oct 03, 2003
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 Bernardus Irmanto

Hi
If you set the username as an attribute of the request object,
eg: request.setAttribute("username",username)
you can do the following :
<html:hidden property="keyValue" value='<%=request.getAttribute("username")%>'/>
or you can include the username variable in the form bean which is associated to the page, so that u dont need to specify explicitly the value property of html:hidden tag
rgds
beN
16 years ago
Hi,
I dont understand why you forward the successfull logoff action to another action (menu). Why dont u just forward the logoff action to the welcome page?. You can do whatever necessary (invalidate action ect) in the log off action and after that go to the welcome page directly..
rgds
beN
16 years ago
If you use the logic:notEqual(/logic:equal) tag, you must specify the value property. Yes, you can fill the value with "".
however, this tag will not work if the value of the address2 is null(it will output the following error message "Cannot compare null variable to value", just like if you compare a variable with a string value, and the var is the left operator, and it is null), so you have to make sure that your address property is not null
<logic:notEqual value="" name="GeneralInfo" property="address2">
...
</logic:notEqual>

rgds
beN
16 years ago
U can use the evaluation logic tag for that case. I think logic:notEqual will do.
<logic:notEqual value="" name="GeneralInfo" property="address2">
<bean:write ...
</logic:notEqual>
rgds
beN
16 years ago
Hi suryan,
have u tried to deploy simple application (say login screen which access db). It will help u to identify the problem. Well I suspect the problems come from the wrong strus-config.xml/you put the applicationresources.properties at the wrong location. If you still cant deploy the application properly, pls send me your compressed project files(the simple one of course, not your current project files ). Ill try to look at it.
rgds
beN
birmanto@yahoo.com
16 years ago
Hi suryan,
It's hard to tell whats wrong with your environment. Iplanet 6.5 has so many bugs in it. My suggestion is, try to use the same environment as I am using. I am also using tomcat for the development, and deploy the apps to the iplanet at the end of the day. well..it's not the ideal situation.
Form my experience(using the environment that i mentioned be4), the apl that runs on tomcat, will run in iPlanet(maybe with little modification).
rgds

beN
16 years ago
Hi,
I have been developing an appl for a while, using Iplanet 6.5 and struts 1.02. Yes, we faced alot of problems in the beginning of the development, but now, I's quite stable. Here is the environment we re using
-iWs 6 sp 5
-iAs 6.5 sp 1, maintenance update 3
-Struts 1.02
rgds
beN
16 years ago
is there any1 who have experience with image encryption(using java). any link on it would be useful
many thanks
beN
16 years ago
well..
if you set the struts config properly, you should be able to execute the action you specified in the path attribute.
BTW., the path attribute should begin with a slash("/") character. It represent the module-relative or context relative path to the resource that is encapsulated by the logical name. If the path is to be considered context-relative, then the contextRelative attribute should be set to true...

rgds
beN
16 years ago
hi,
try to add "/" to the path attribute
<forward name="CreateRequirement" path="/createRequirement.do"/>
rgds
beN
16 years ago
Mike,
U should have 2 additional methods in order to get the multi-lines data from your jsp.
In your form bean, you have awards Arraylist. Say that in the arraylist you have award object(bean).
You need to add the following method in your form bean
public void setAward(int index, award ob){
awards.set(index, ob)
}
public award getAward(int index){
awards.get(index)
}
this should work...

rgds
beN
16 years ago
hi Anselm,

I dont think the code will work.
the property attribute of the logic:iterate tag "must" have the jsp bean which is refered by the name attribute, associated with it.
rgds
beN
16 years ago
Hi there,
when you clicks the refresh button in jsp 2, what do you want to achieve?
since you said that all fields are read only(user wont be able to chnage the data), I assume that there will be no data to be updated. am I right?.
well. If you still want to "re-enter" the data to the database(updating the available record, since you have already had the record when you click submit in jsp1), you could specify other method in the same action (as used by jsp 1) , by adding a specific flag. In the execute method of your action class, you can detect the existence of the flag, and delegate the request to specific method.

rgds
beN
16 years ago
yes you can,
but I prefer to pass a jsp bean containing collection to the request object, and the use the logic:iterate tag to iterate over the collection.
when you pass the arrayList in the request object, you can access it using collection attributes. You need to specify an expression to get that arraylist, like
<logic:iterate collection="<%=request.getAttribute(...)%>" id="..." type="...">
rgds
beN
16 years ago
Hi,
among the logic:iterate tags, there are 3 attributes which are needed to specify the collection to be iterated in the jsp page. They are :
1. Collection : which is a runtime expression that evaluates to a collection
2. name : which is the name of the jsp bean containing the collection to be iterated over
3. property : the name of the property of the jsp bean specified by name( point 2)
In all those 3 attributes, you need to have a jsp bean which has a collection member variable to be iterated over.
So, In your case, you cant put the arraylist directly to the request object. you can define a jsp bean, declaring one arraylist, fill the arraylist with the arraylist returned by your getDepartments method. The next step is put the jsp bean in the request object.
then in the jsp you can have logic:iterate tag
which will look like :
<logic:iterate name="depatrmentBean" property="departments" id="row" indexId="index" scope="request" >
where the departmentBean is your jsp bean(refered by the name attribute). In the the departmentBean you need to have an ArrayList named departments(refered by property attributed).
and then you can use html:text/bean:write to output each member variables.
<html:text property='<%= "department["+index+"].deptId" %>' >

you might be a bit confused. We have "departments" (see the name attribute)and department(see the property attribute of html:text tag). They represent two different things.
departments is the collection you want to iterate over, and the department, is the object contained in the arraylist.

hope this can help
16 years ago