Rashmini Palakurti

Greenhorn
+ Follow
since Jun 29, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Rashmini Palakurti

Hi!

If You are using Tiles Framework for the presentation then u can have different tiles-def.xml for different Locales.
19 years ago
When i tried to do this in Action Class I dont know what's happening behind scenes if it is going into Infinite Loop or not able to write to ServletOutputStream , my system is hanged and PDF is not opening..

Can u tell me what the problem could be??
19 years ago
hi!

We also have the same problem , i'll modify our code accordingly , but before that i want to know something from where did u write all this code , that is reading PDFBytes and setting it to outputStream..in an Action Class or Servlet??

In our project we did that in a servlet , but i want to move that code to an action class for Exception Handling.. but i couldnt do that..If u did it in Action class then let me know how U did that.
19 years ago
hi!

I try out this..

<html ptions collection name="Customers" property = "key" labelProperty = "value"/>
19 years ago
While creating a new ActionError object you are not passing any replacementValue but ur using arguments in your AppResources file.

i.e.,

instead of creating ActionError object as new ActionError("error.Invalid SSN.errorMsg")

instantiate it as new ActionError("error.Invalid SSN.errorMsg","SSN1")

The error message in ur AppResources file is looking for a replacementValue for its argument {0} which it is not getting and it is throwing Null Message Exception.

I hope this will solve ur problem.
19 years ago
In html:radio there's no CHECKED attribute , that feature can be implemented by setting default value to the associated property in ActionForm.

For Example:

If u have something like this in ur JSP :

<html:radio property="gender" value="M">Male</html:radio> ---1
<html:radio property="gender" value="F">Female</html:radio>---2

then u can set 1 control as checked by initialising gender property to "M" in ur ActionForm or if u want to do it at run-time in Action class then u can do it by the setProperty of Gender.
19 years ago
Thanx Marc..
What i thought was to redirect to same jsp when submit is clicked and check
the action path or set some flag which tells submit was successful and then forward it to JSP which will open PDF.

If u have any other better idea then plz do post it.
19 years ago
Yes ur right , u need not create ActionForm when u use DynaActionForms and container will create its instance just like normal ActionForm but there are some trade-offs in using DynaActionForm. It works for simple JSP's but if there are some complex validations to be done in validate() method of ActionForm then this may not be right choice.

For more about ActionForms and DynaActionForms u can refer http://www.struts.apache.org
19 years ago
I think Cendy's answer is right but it would be better if u extend ValidatorForm instead of ActionForm.

It is returning to LoginView.jsp bcoz there was some error in processing ur Input.Put some log statements in LoginForm's validate() method , i think that would be helpful..
19 years ago
For <html:select> default value can be set by assigning the value to property associated to the <html:select>

In ur case , u can do this in ur ActionForm..

String activeFlag = "0";

then by default "0" will be selected.

If it has to be set runtime then it can be done using set-property of activeFlag.
19 years ago
hi!

I think u have not correctly understood my difficulty.My problem is not with displaying the error Message , but to wipe out when the correct month is given(that is refreshing this page) which is not possible now bcoz action is redirected to open pdf rather than this page...
19 years ago
Hi!

I think its the problem with <html:text> but not of nesting struts tags , i got this working for <html:select> but it is not working with <html:text>.Try this out..
19 years ago
hi!
I have a problem in refreshing a page when an application exception is thrown. I have a jsp where in if user enters a year and month and presses submit button then a pdf report is generated and acrobat reader open dialog box pops-up, but if data doesnt exists for that year and month then an application exception thrown and is shown in same jsp.

Scenario: If user enters year and month for which data doesnt exists then application exception is shown in the page correctly , but after that if he gives valid input then pdf is generated but this jsp is not refreshed as a result the error for previous input is not wiped out... this is happening because when there is no error , i am returning success in my action and for success i have a forward action in my struts-config which opens pdf in a new jsp and it doesnt return this jsp and this jsp is not reloaded. can anyone give me a solution where in for the same forward parameter i can refresh this input jsp as well as open pdf in another jsp.
19 years ago