Shankar Tanikella

Ranch Hand
+ Follow
since Jan 30, 2011
Shankar likes ...
Eclipse IDE Oracle Java
Merit badge: grant badges
If I look back and see, I do only things that I LOVE
For More
Winchester, UK
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shankar Tanikella

Hi Rajesh,

Its Master of Business Application?

If it is so, why would you need what details of resistance struts migration would have. With my little knowledge & experience - Sorry for irrelevant comments on it but if you are looking in a Management perspective [for a case study, may be]- a elegant manager never needs to know about the technology. For a manager [who would have already got the budget and estimates -normally not in his hands] its all about planning of deadlines/milestones and resource utilization and resource fitment/allocation and nothing else. - however, forget this.

Coming back to the technology I do not see any thing that would slow me down [-I never worked on Struts 2]. Its all about the volume of work and extinct of migration.

When we talk about it
After initial configuration [afterwards its just building blocks]
How many flows do the application have that i need to migrate
Am I going to remove the Form culture and use simple DTO? If yes how many of them are available? How many JSP's are being effected?
Am i going to use the old struts stags or use something new? if yes what is volume?
How many filters do I have? Should i make all of them as interceptors, if possible and applicable?
-validation framework and tiles are more or less the same so no change..

There is simply no challenge, except for volume. I do not know how different is struts 2 file upload from 1.x. In general whatever it is, higher versions would be more easier to live with than the earlier ones

11 years ago
Hi Rajesh,
Before doing any migration, not just this one,any - one would think of what is being achieved after migration. Why to migrate a stable application unless there is a necessity to do so. Hope you have done all this stuff already and very much clear with your necessity and entered into technical challenges.

Actually there shouldn't be any challenges - its Java [its always the estimation which creates mess rather than the technology & design]
Few things to think about- is what your action classes have in them - does it have business logic/does you JSP's have business logic? Is it a well structured/designed project and is the development as per design? What are the exceptions in following the design - are the first steps think about. Upto what extent are you going to migrate your application [all the features?] is the next thing

Next would be what are custom frameworks you have in the application and where do they fit in the changed framework. Say for example, since it is about struts - security framework/mechanism exception handling, servlet filters are the few things which commonly are close to your action classes along with the form beans...

All the above is just how I go about before thinking of migration but it is not the same for all. The best way is to migrate one medium-complex flow in your application and see how it works and what it takes to achieve it.

After all, while migrating if there are any difficulties - it is just Java, we can do whatever we want, Struts is just a little drop in it. We do have this wonderful place 'JavaRanch'
11 years ago

Gustavo Coelho wrote:... to extinguish another fire

good luck

Keep posting if something challenging comes up even if you solve it in a blink
11 years ago
Hi Lakshmi,
First things first, Throwing an exception of generic type is a very bad Idea.

Which version of struts are you using?
if 1.x, what is the global exception mentioned in struts config (if it was mentioned)
I would prefer to throw an user defined exception and configure the same in struts config based on type.

11 years ago
Hi Gustavo,

Welcome to JavaRanch!!

Since you do not have deployment exception what we can conclude is that Strut's config files are all well formed. Did you try using simple path like below I mean without "processos", I am not sure if it can take two forward slashes. It should be fine for the "forward"[above line 1] but not sure about the "action path"[line 2] The rest of the code looks fine. If this doesn't work could you post "" which would be in your server cache

11 years ago
Ha, interesting

1. You get 0 since your ID is of type int. May be you are not setting the value of Id. Where are you setting the value for this?
2. I guess "./view.action?id=$" would be taken as a single entity and does not evaluate the value of $ I didnt work in struts 2 and hence do not know exact conventions/syntax maybe try single quotes like "...?id='$'" - again this might work or may not, not sure.
3. ------------not at all important, but your code is very much vulnerable to SQL injection

11 years ago
Could you please explain the same with sample code
11 years ago
Hi Howard,
If above lines from 1-78 is from view source then, problem is almost known. If you observe the body part of it - fmt:message, html:text tags are as is and are not properly compiled [which no normal HTML browser can understand]. May be necessary tag-libs are not included in the body jsp or so. Please verify that, it should be the root cause. And i also do not understand why you need to do tile insert in login.jsp when your template does that for you. Anyways that should not be an issue.

And congratulations!! seems like your tiles setup is working fine [header and footer are already displayed]. So no tiles problem

11 years ago
Hi Mark,
Everything looks fine but for the validators "allrequired" and "required" are using the same method signature. Have you overwritten the validator code. In any case how come two different validators use same method from the same class using same attributes [non user defined] and perform different operations?

Looks like you have to remove "allrequired" validator from your validation-rules file if it is added by mistake.

11 years ago
1. Why would want an Inner HTML instead you can change the div style visibility
2. Have tried what are all the forms and their element forms[0], forms[1]... if you have a single form you should be getting it else try other forms or I still would go with the first option

11 years ago
Looks like you have problem in lines 117-119 in your JSP

11 years ago
Sorry Dave,
I overlooked at your post... "team" is just a String and and it is trying to do getType() from your "team" which doesnt exists. You need to simple do Here, since TestGettingData extends Sport it should be able to get the value from parent class.
Hope you are understanding what is happening, Understanding the problem is more important sometimes than solving it just like that

11 years ago
Hi Dave,
What struts framework does for us is if you mention it tries to fetch value of from "unitform" type object in the scope mentioned using the getter method. As the error clearly mentions "No getter method" that means your it is considering the whole property as a single one and trying to call something like method. You have two ways to get out of it
1. If you are using only struts and no EL
define the team object and then get the value, example -
2. If you are using struts-el, include the definitions in your view file and do whatever you have already done- do not forget the syntax
11 years ago
Hi Moorthy,
It is true that for security pupose Struts convert < to < but what you are seeing in the response is with with space "& lt;". This implies that there is some encoding being performed in your application (may be a request/response wrapper OR would have modified the struts code itself ) Check out your security framework.

11 years ago