Ram Narayan.M

Ranch Hand
+ Follow
since Jul 11, 2010
Merit badge: grant badges
For More
India
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ram Narayan.M

Thanks Steve..

will try that...
11 years ago
Thanks Steve for the reply...

Yes I am testing on real phone with GPS turned on...

Even when running on real phone, should i have to use Google API 17?
11 years ago
I am doing a small android app involving location based Android .

I am using Geocoder class to get the address details to be shown.

I ended up with Geocoder
IOException service not available.
when invoking getLastKnownLocation() method of GeoCoder class.

Could you just give hints to fix the issue?
11 years ago
Synchronizing is done if the method has some code to access critical common resource which should not be spoiled by multiple thread running on that method concurrently.

Unsynchronized does not deal with that critical common resource so no danger of multiple threads accessing that method concurrently.

So, its legal to allow thread running on Unsynchronized method on an instance even if that instance has been locked by another thread.
As Rob asked, to get the excel content sent by Servlet, it should be written to Servlet OutputStream, then only it reaches the client(browser) to open the excel file.
12 years ago
request.getSession(false) will not create new session.

During the first request to the server, first request not containing any SESSION ID Cookie/ URL rewritten is processed by servlet.
In the process, when request.getSession(true)/getSession() is invoked, new session is created and SESSIONID will be added to cookie in the response.

Then, request forwarding is done to other servlet, when request.getSession(false) will return NULL since this forwarded first request does not contain SESSIONID/URL Rewritten.

This is the general concept. I have got it in Apache Tomcat. Dont know about WebLogic.

Session Management Logic may differ from container to container.

12 years ago
This can be used to get ServletContext of other web application in the same Servlet Container but not the different ServletContext in different server.
12 years ago

bean.main.main(main.java:25)



"test" Stateless Session bean does not have Business Interface from which it implements.
Seeing the trace, you are calling the "test" class from main() method of main class...

Seems you have directly instantiated the "test" class and making a conventional method on object invocation...

Does not seem to be done in Application Server...

I got acquainted Budi Kurniawan's book through this promotion activity only... Budi's explanation to my some Servlet 3.0 Clarification queries are remarkable...

I think this book will address all the Servlet 3.0 queries we are having...

Thanks again Budi for exclusive Servlet 3.0 book...
12 years ago
Hi Budi,

AsyncContext documentation says "Unlike forward dispatches, the response buffer and headers will not be reset, and it is legal to dispatch even if the response has already been committed."

Why this exception for Asynchronous Dispatch?.
12 years ago
Yes... You will have to access the JNDI Service running in Application Server by using the remote hostname and the port in which JNDI Service listens..
After JNDI lookup, you will get EJBObject Stub to access the Bean component...

Make sure if JBOSS Application Server allows the remote calls. If not, you will have to change the Security Permissions to get access to it.
12 years ago
Why cant you collate the war file and jar file(business component programs) in ear file and deploy in JBOSS App Server itself?
12 years ago
Thanks Budi,

Now got a clear picture of Asynchronous Operations..

So, startAsync method invocation on request set some implicit flag to indicate the JSP/Servlet container not to close the connection in
order to send the outcome.
12 years ago
I was meaning only the context root name "WebContent" that it can be changed since it may look odd... Thats all
12 years ago
First of all transfer all WebContent files to proper "war" file. Dont use "WebContent" as root which ServletContainer will regard as ContextPath...

When you requestDispatch to the path "/WEB-INF/JSP/MyPage.jsp", path will be resolved implicitly under the context path so that dont need to
specify it explicitly. Since RequestDispatching occur in Server side, WEB-INF resources are accessible...

When you do sendRedirect which sends Redirection response status to Client(Browser) to raise new request for the page, it wont work since
the explicit request from client for WEB-INF resources are not allowed.
12 years ago