Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Ravi Seshu

Ranch Hand
+ Follow
since Mar 19, 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 Ravi Seshu

Dear Viewer, I have a problem decrypting a 3DES encrypted string. Can any one has a way to decrypt a 3des encrypted string. say for ex: " {3DES}SKbZpRTcR8urG/viVJL1Hw== " can you please provide any info how to do it in java any sample code..as i find many blogs java code doesnot support unsigned keyword so, it cant do decryption, by the way its 168 bit long...etc.. can any one help me in this regard, how to decrypt a 3des string? -rawse
13 years ago
Hi,


I am using struts & tiles framework for the project, The page structure follows the below structure:
1)After logingin the page displays tabs, going to the corresponding tabs (1st level menu) by clicking it will display the avaliable links as menus on top-left-corner (2nd level menus),
clicking on the link in (2nd level)menu's will take to the page say URI is "/action/module/page.do", as uri calls
: after the uri call it constructing required information in its action class, redirect to the main page say "/page.jsp" its form is in session, input is the page "/module/page.jsp"

2) This page which uses a tile, initializing the menus (in tiles-defs,it extends a layout tile) 1st & 2nd level in its inner jsp)
module tab..etc, for the page and then loads the outer jsp.
3) for this main (inner) jsp page uses another tile which displays a block of information on the page.

say : inner jsp page content...
<tiles:insert definition="showinformation">
<tiles ut name="info1" value="..."/>
<tiles ut name="info2" value="..."/>
</tiles:insert>

<tiles:insert attribute="/PAGE.jsp"/> (this displays the outer jsp page content)

4) The above tiles definiton "show information" path in tiles-defs.xml is a URI "/tiles/showinformation.do?method=load" (uses dispatch action class)
this uri in struts-config.xml file is an action mapped to a form with few variables, scope in session,validation false
input attribute to the showinformation page "/show.jsp"

5) When clicking on the (2nd level navigation menu)link (getting back to step-1), this shows all the information what is desired, in the PAGE.jsp (inner.jsp display page content)

I am inserting another jsp say : "datajsp" in it, which shows few blocks of data,and a link to add another set of data.(this is done by adding another row in the list of form field in action class say "form field of type java.util.List".
This is done by updating the method name in the jsp page (in JavaScript) and submit it(this is onclick event of that link in sub jsp page) and in action class update the form field fo type list with another empty record which displays another set of empty info (need to be updated by the user).

query : here I observed 2 forms, 1 for the "show information in the inner.jsp" another for the main link "page.do i.e. pageform"

1) When i click on the link in the "datajsp", this page is redirected back to the same page showing empty data set of data(as desired) to be filledin by the user but shows "servletException" to display "show information" (step-4 tiles declared form+info display). I dont understand the reason as both of the forms are in session scope and the form(innser jsp "show information" form)exist in the session. The exception observed is "no bean specified".

How come it threw "ServletException : No Bean Specified" eventhough i have this form in the session (i tried printing the session variables and found it there).

can any one suggest me atleast the reason or is there anything to be known more in this scenario. The link in "datajsp" updates the form (main form Outerjsp: pageform) method variable to required action class method name and submits the form (/module/page.jsp page includes a page "datajsp", this "datajsp" page has a link and this submits the form of the including page(/page.jsp) form. IS there any chance of error...or something..

i would be pleased if anyone spares some time for this issue.

regards,
-eswar
13 years ago
i have a problem with request scoped form in my struts application.

i created actionform with list as its form field, and in the jsp page i am using this list which includes
list of objects of my model class to display few items. When submitting the form i receive Indexoutofbounds
exception. i know that a new form is created for request scoped form when submitted, then the list values
are assigned to the form list.


but can anyone suggest me regarding this, previously i used session scoped form where old form object is
used to populate the data. Is there a way i can use request scope form having list/arraylist as its field
and i can render those updated values to my action class...


i tried putting print statement in my action (DispatchAction) method as first stmt...but no use,

any help is strongly appreciated...
13 years ago
i m using struts: when i click on a link it will go to my action (Dispatch) method and loads
the data from the db into my formfield of type map. then i forward my page to actionforward
:"loadpage":, this is declared as shown below:::

<forward name="loadPage" path="/mymodule/my followed jsp page.jsp"
redirect="false" />

the action form is set to request scope ... so is there a way i can retrieve my data put in form
field MAP...

My action mapping :

<action path="/action/mymodule/rel_path"
type="com.company.subpart.module.plan.ProcessNameAction
name="processNameForm" scope="request"
validate="false"
parameter="method">

And i set values in my action class :

like this : in its method : load()

loadMaps(request, form, initialLoad); -->loads data from db to my form field Maps
return loadPage(mapping, form, request, null); --> load page returns to my desired page

i am able to access the valuesin map in loadpage method even..but after forward(last instruction)
i dont get data (null values in Maps) ...can any one helpme regarding this issue..(arch ..problem)

regards,
-eswar
14 years ago
hi,
is there a way i can have multiple applicationresource.properties file like for my module called
funny if i want those resource bundle to be inserted into funnyapplicationresource

so how can i work on with it what are the changes need to be made, is it adding <message resource
tag in struts-config...or ..anythingelse

regards,
-eswar
14 years ago
Hi,
Mr Scott u r right its rounded off.., as floating point values are obtained from binary 2 divided....so the rounded bar(0.333333) values are approximated...but did u observe.....

15 as 15.000001
27 : Float Value ----->27.000002
30 : Float Value ----->30.000002
53 : Float Value ----->52.999996
54 : Float Value ----->54.000004
59 : Float Value ----->58.999996
60 : Float Value ----->60.000004


so ..... there is something..going on with this float ing valus ....so...anyhow thx for sparing time with this issue guys....

BigDecimal can serve my purpose...

regards,
-eswar
14 years ago
hi,
i have a problem, when i am trying to covert float 15

i am using the follwoing float f = (float) 0.15 *100F;
when i print it i get 15.000001 instead of 15.0 . can any one help me out regarding this or state the reason for this

i tried to print the values of that below 100


float f=0;
for(int z=1; z<100;z++){
f =z/100f;
float fl= (float)f * 100;
System.out.println(":: : "+fl);
}


i got 6 dissimalarities..... 15 27 30 53 58 60
any help is greatly appreciated...

-eswar
14 years ago
not like sequence it depends on the type of action is called. it gets executed and the corresponding action class is called & form object is created & populated.
14 years ago
hey better initialize variables... with some value as local vbles need to be initialized.....for boolean ... try now..

-eswar
14 years ago
hey thx for ur suggestaction, but i dont have library could u send me thelink so i can download
14 years ago
subclass dispatchaction as ur action class and put all different kinds of methods useful for ur application
, u can call them useing a hidden variable whose name is specified in action parameter element in struts-config.xml,

so say method , a hidden vble in jsp page, whose value is save n its name is specified in ur
action mapping like <action name .. parameter="method">..this will call method save()in action class
-eswar
14 years ago
i think in jsp : u hav to modify ....


<html:messages id="saveMessage" message="true" property="saveData.message">
<bean:write name="saveMessage"/>
</html:messages>
14 years ago
hi, thx for ur exploration i came to know : chk this link : http://struts.application-servers.com/suggest/index.html
-eswar
14 years ago
short Short,date Date,Timestamp,BigDecimal, short Short,Class,String,byte Byte
14 years ago
int Integer, float Float,Doublt double,boolean Boolean, BigInteger,java.util.list
14 years ago