Max Haroot

Greenhorn
+ Follow
since Jun 11, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Max Haroot

The ServletContextListener interface containing the methods:
void contextInitialized(ServletContextEvent iEvent)
void contextDestroyed(ServletContextEvent iEvent)
are the prefered way to start processes at startup. This will allow you to set parameters in the web.xml file, such as url, username, password, pool size...
You need only add
<listener>
<listener-class>my.package.name.ConnectionPoolListener</listener-class>
</listener>
to your web.xml file. The container does the rest using introspection to determine which type of listener it is.
20 years ago
A RequestDispatcher can be used to include the response from another context(application2) as long as both contexts are on the same server.
It will then continue in servlet1, appliction1 like you want.

(in application1, servlet1)
...some code...
RequestDispatcher reqDisp=request.getServletContext().getNamedDispatcher("servlet2Name"); //as named in web.xml <servlet-name>
reqDisp.include(request,response); //will include response from application2, servlet2
...some more code...
20 years ago
If I understand correctly you are printing out the form name=\"AMember\" in your doGet. A user then submits that form and you expect that the doPost will be called.
If this is correct then form name=\"AMember\" method needs to be a POST, else you will never cause the doPost method to be invoked. Try changing the method to POST.
20 years ago