Nandhakumar Soundarrajan

+ Follow
since Apr 24, 2009
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 Nandhakumar Soundarrajan

I have found one more thing...

if I use localhost in the URL all servlets are able to get the value from request, but if I use host name in the URL request.getParameter is returning NULL in all servlets.

Note: The application has been developed using NetBeans 6.5.1

Please help
10 years ago
Hi Bill,

Thanks for getting back.

Globally I use only one link i.e http://<host_name>.ap.<company Name>.net:8085/prompt

Everything is fine in INDIA, only other global users face the problem...

"The page cannot be displayed" is shown only to one user and just now I received a mail saying that it is browser issue...

so we can skip it...but still request.getParamter returns null
10 years ago
Hi Experts,

Today is the toughest day for me, I am experiencing lot of problems...

request.getParamter always returns a null value if I use host name in the URL

Everything works fine if I use localhost in URL....

Please help..
10 years ago
Hi Experts,

I have developed a web application which will be used globally, I have the app server located in INDIA, the domain is APNET, but when users other than INDIA (say Europe with domain as EUNET) try to launch the application, they are facing issues as listed below.

1. JSP pages are loaded successfully, but when an action is executed the servlet's "request.getParameter("pName"); which is a post request is returning a null value. (Actuall all Servlets are failing)
2. For some users, they are getting "Page Cannot be Displayed".

Please help me out.
10 years ago
Yes, I have implemented connection pooling and used type4 driver.

Thanks you guys...
You can use "~" as separator instead.
10 years ago
I had a similar scenario and in my case I could not use log4j as I need to show the logs of import in a separate file.

In created a separate JAVA class which does importing, so I just call the import method in the class with the filename as parameter which adds all the log values either success or failed (starts with "INFO:" if succeeds and starts with "ERROR:" if fails) and this method returns the arraylist to the calling servlet.

In my servlet I just loop around the arraylist and print it to the brower (which shows only errors) and a log file (which captures all).

Hope this helps.
You need to remove the attributes from the session in the pageToReturn page after populating the values.

If you remove session attribs after send redirect, then obviously your confirmation page will be empty.
10 years ago
Answering you based on the assumption that when the user enters value in page1.jsp and submits it to Servlet A which add the values to session and validates, if validation failed page1.jsp is called with the values from session, if validation succeeds page2.jsp (confimation page) is called and loaded with the values from session and then the session values are cleared. So the session values are removed when the page2.jsp is rendered.

I am pretty sure this works, as I have used the same logic in my application.
10 years ago
Hi Jigeshs,

To execute the servlet, you need to use the URL as shown below.

http://<host_name>:<port_no>/<application_name>/<servlet's URL pattern defined in the web.xml file>

in your case i guess it would be (I am assuming you have installed tomcat on you local PC and using port 8080)


Hope this helps.
10 years ago
Hi Moieen,

First of all create a new method with request and response as the parameters and call that method from both doGet and doPost, this will avoid the error

HTTP Status 405 - HTTP method GET is not supported by this URL


Next step is, try to use HttpSession, so if the session is null, you can redirect to the login page, else if you want to retain your existing logic check that username from the request is null or not, if null then redirect it to login page.

For redirection, you can use sendRedirect or use the following javascript in the servlet to redirect to your main page or login page.

10 years ago
Hello Mayura,

Hope you are trying to find the difference b/w request parameter and attributes.

Request Paramter:
Request Parameter are name value pairs and both the name and the value are strings.

Consider that you have a form with a text box say , so when this form is submitted to a servlet or another JSP. You can get the value entered by the user in the textbox (firstName), through which returns the value entered in the textbox.

Request Attributes:
Request Attributes are objects, and can be placed in the request, session, or context. As they are objects and not just String, they are much more flexible to use. You can set attributes programatically and retrieve them later.

Consider in a JSP page you have a connection object and you are setting it to the request attribute through the code
you can retrieve the Connection object in servlet by using the following code.

Note: You need to cast the object which you retrieve from request attribute.

Hope this helps.
10 years ago
Hi Paul,

Thanks for your reply.

Now I changed my code to use "Microsoft SQL driver for JDBC" and this is a type 4 driver.

And also, using connection pooling.

Thanks for your time.
Hello JAVA experts,

I am in a process of developing a web application. I am just thinking of what would be the best way to use Connection object.

I am currently adding the connection object to the user's session and using it, but I encounter some problem (Connection is busy error) when I execute a query inside a while loop of the resultset of the first query, so in those cases, I am creating a new connection and executing the outer query, so that the inner query can use the connection object from the Session.

Could you guys give me a better in sight on how to handle this?

I am using jdbc odbc bridge to connect to my SQL server.

Note, I am not facing any issues with the code when I was using Ms-Access as a database.

Nandha Kumar S.

Please help me out in finding why my doPost is not working...

Sorry to bother you all, its a bit urgent..
10 years ago