Specifying the target bean by using the 'parent' attribute allows a reference to be created to a bean which is in a parent container of the current container. The value of the 'parent' attribute may be the same as either the 'id' attribute of the target bean, or one of the values in the 'name' attribute of the target bean, and the target bean must be in a parent container to the current one. The main use of this bean reference variant is when you have a hierarchy of containers and you want to wrap an existing bean in a parent container with some sort of proxy which will have the same name as the parent bean.
Appreciate, your help to understand the parent container and current container on the above context.
While running the application putting an alert for request.readyState inside the event handler request.onreadystatechange = function() {...}, it is displaying "undefined" and output is not getting displayed on web page, where as with System.out.println, correct data is getting displayed in the console.
Such type of issues occur due to malformed source or request not reaching to the server.
Check the login page for any syntactical error.
Also check the web.xml for the url (the action you have specified in your login page) mapping.
Thanks Jeanne for making me know about another interesting feature of JDBC. If I am not wrong, I have to use Tomcat DBCP feature (by using the jars - commons-pool-x.x.x.jar and commons-dbcp-x.x.jar and getting an instance of the class BasicDataSource) for this purpose.
But still I am hunting for the answer with the JNDI setup.
In web application, we can connect to the database by supplying the configuration details in server.xml or context.xml. Is it possible to achive the same thing in a stand-alone application? I am getting the below exception while running an stand-alone application:
Cannot get connection: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
From the description it is clear that the configutarion detail need to be provided in the form of environment or system property or through the application resource file java.naming.factory.initial. Tried to get the solution in the web, but didn't got the result.
Kindly sugest.
My requirement is :
1. To display a default text in a textarea.
2. The default data has to be read from the ResourceBundle.
3. The data in the textarea cannot be edited.
It is possible to achieve the task by using <html:textarea>?
If yes, then how?
The code I am trying with is as follow:
UserRegistration.jsp
MessageResources.properties
struts-config.xml
The JSP is successfully getting generated, but the default data is not getting displayed.