This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes What does request mean in this statment getDataSource(request); Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What does request mean in this statment getDataSource(request);" Watch "What does request mean in this statment getDataSource(request);" New topic
Author

What does request mean in this statment getDataSource(request);

howard franklin
Greenhorn

Joined: Sep 09, 2012
Posts: 20
Question about the Following code.

I understand that this is use to get the connection from Struts DataSource:

dataSource = getDataSource(request);
myConnection = dataSource.getConnection();

My confusion is what does request stand for.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

The HttpServletRequest instance passed into the action execute method.

By the way, this functionality was removed from Struts after version 1.2.7 (at least 7 years ago!). I recommend you upgrade your Struts version, if possible to Struts 2.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
howard franklin
Greenhorn

Joined: Sep 09, 2012
Posts: 20
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does request mean in this statment getDataSource(request);
 
Similar Threads
Sturts dataBase connection problem
Struts 1.1 database connection exception
DataSource Problem
how to get DataSource Object of Action class ?
Help in connecting to oracle10 database using struts