wood burning stoves 2.0*
The moose likes Struts and the fly likes display data on first jsp on start of application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "display data on first jsp on start of application" Watch "display data on first jsp on start of application" New topic
Author

display data on first jsp on start of application

rohit surve
Greenhorn

Joined: Mar 19, 2009
Posts: 17
<b>i want to display table on first jsp page which i am retrieving from the database
i have form action defined on jsp pages and also struts config navigation is correct
how do i display table without using submit button on my jsp page ( it works when i use submit button its showing me the table )
please help.</b>
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

rohit surve wrote:how do i display table without using submit button on my jsp page ( it works when i use submit button its showing me the table )

Call the action URL explicitly by forwarding to it.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Kartik Talasu
Ranch Hand

Joined: Aug 21, 2009
Posts: 98
As we know at first the index.jsp will be read, so in that give



in struts.xml give this statement
so that it will go into LoginAction, in the action class you can call database and return success.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

OR in S1


http://struts.apache.org/1.3.10/struts-taglib/tagreference.html#logic:forward
OR
http://struts.apache.org/1.3.10/struts-taglib/tagreference.html#logic:redirect
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: display data on first jsp on start of application
 
Similar Threads
Submit button calling Java Methods
Building JSP pages and link to MySQL table
session attribute
A servlet code written to add details in database but not happening?
Transfer the variable value from one jsp page to other