Mark Blackledge

Greenhorn
+ Follow
since Nov 04, 2005
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 Mark Blackledge

If "myobject" is a String, you want to be testing it for null like
in your action code.

If you have JSTL you can do this in your JSP

15 years ago
Yes, put your JSP files somewhere under your WEB-INF directory. Then the users have no access to them and you don't have any extra work.
15 years ago
Can you use EL? From within the logic iterate just access your item with something like ${item.name}. You can put that right in the script.
15 years ago
What if you made these changes:

errors.add("singleToDoItem[index].title", new ActionError("Edit.NoTitleSupplied"));

(you would have to generate the index value and put it in the string in your validation method)

and then change your iterate tag:
<logic:iterate name="ListItemsIndexedForm" property="items" id="singleToDoItem" indexId="index">
...
...
<html:errors property="singleToDoItem[${index}].title" />
<tr>....</tr>

</logic:iterate>
15 years ago

Originally posted by k mut:
what if a user types in the direct jsp page into the browser www.xamplesite.com/xample.jsp

No STRUTS action will be called, so that wont work.
how can i take care of it.



To prevent the user from accessing the JSP page directly, place the JSP page in a location that the users have no access to. For example, /WEB-INF/JSP/xample.jsp.
15 years ago