Win a copy of Securing DevOps this week in the Security forum!

mohana krishna

+ Follow
since Apr 12, 2005
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 mohana krishna

Hi Norm Radder,

Finally i am able to solve the issue , also i am able to read print stack trace.

I modified the code to read status of the response.

With the above code i came to know that request is not reaching the REST web service.
So i modified the URL with the service name with following code modification system is working as expected.

Thanks for your prompt replies.

3 months ago
Hi Norm Radder,

Thanks for your reply.I am getting exception at line number 17 when i run in debug mode.

tried with ex.printStackTrace(); to print stace strace buy i can not see message in Android monitor or Android device monitor log cat.
3 months ago

I am implementing AsyncTask to consume a REST service.
When I invoke the service I am getting the error
Can you please help me what is wrong with this code.

3 months ago
Hi Tim Moores and Pete Letkeman,

Thanks for your time and suggestions.

5 months ago
Hi Pete Letkeman,

Thanks for your reply.

In future, my app has to be implemented in different countries also I may have to store the values for Citi also.

So as per your suggestion, it would be better to use SQLite with web service.

Suppose if there is a new country or State or City added on host how can android app aware about new changes.

I guess solution will be when user open the app a web service call has to be happened to know any new changes is there on the host.

If there are any changes then the host has to indicate that there are some changes on the host.

The app has to consume the respective web service to get the latest details.

Is there will any easy or better solutions than one I have mentioned.

Mohana Krishna.
5 months ago
I wish to create a sign up page i have to display country names and state names.
Country names and state names are static data.
Is it a good idea to store the country names in Strings.xml file or storing in SQLite data base or any better ideas are there to handle cache.
5 months ago

As per servlet-2_4-fr-spec.pdf file. PATH :

"The session-timeout element defines the default
session timeout interval for all sessions created
in this web application. The specified timeout
must be expressed in a whole number of minutes.
If the timeout is 0 or less, the container ensures
the default behaviour of sessions is never to time
out. If this element is not specified, the container
must set its default timeout period."

So If Session-timeout in DD is 0 then session will never expire.
If Session-timeout in DD is 0 then session will never expire
Final HashMap finalHm = new HahMap();

Now we can change the value of KEY "ABC".

But we can not assign a new reference.

finalHm = new HashMap();

If i am wrong please correct me.
6 years ago
1 ) Create a token and store token number and created time in the table.
2) In the link add token as parameter
3 ) When user clicks on the link you check the difference between current time and token created time. If its more than the predefined time iterval show valid erro message to user.
4) Otherwise do a soft delete of the token frm the database.

Dear ranchers if there is any better please provide info
6 years ago
May i know the reason why these jar files should not be keep inside WEB-INF/lib folder.
Issue 1 : Session time out case

Create class UserSessionListener which implements HttpSessionListener
In UserSessionListener Class give the implementation for method

sessionDestroyed(HttpSessionEvent objHttpSessionEvent) in this method write code to delete data from data base.

Configure session listener in Web.xml file.


<description>UserSession Listiner</description>




Case 2 : Abnormal termination of session.

Write a small JSP page which accepts USER id (One which you want to unlock )as input may be admin may have rights to unlock the user.

When user enters the user name submits the page then you delete the data for that user from Data base.

For all these cases
You may create one USER object and store it in session when user is loged in.
When user id loged off , session time out or unlocking using the application delete the object from the session.

6 years ago
Creata a table in database.
When a user login ener the data in into the table.
If the same user tries to login check data is already presest for that user in Data base.
If data alreday data is present display message to user stating that you have already loged in.
When user log off from session delete data from data base.
When session is expired delete data in data base using Session Listener.
If the user close the session abnormally use a separate application to unlock(delete the data from data base) the appplication.

6 years ago
While navigating through the screens of the web-based application, I get blank screen at times. The application menu bar is still visible and the header and footer jsps are also still available. The main processing frame alone goes blank. Once I get the blank screen, I am able to choose from the menu option and contine navigating through the screens.

The application has been deployed on WebSphere Application Server v6.0 and uses JDK 1.4.2. I have checked the application, server and systemerr logs. And there are no exceptions in any of the log files. There is no difference in the logs for a normal flow and the flow when the blank screen occurs.

The blank screen does not occur always. It occurs around 3 out of 10 times. If you consider a particular page, mostly it loads normally and very few times, the blank screen occurs.

Compression filter is being used and it gets invoked for every request. Size before and after compression also gets printed in the logs.
Could this be causing any issue in terms of memory handled or could any jsp timeout be happening, though there are no exceptions in the logs.

Can you please suggest to resolve the issue.
9 years ago