aspose file tools*
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
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: display data on first jsp on start of application
 
Similar Threads
Submit button calling Java Methods
Transfer the variable value from one jsp page to other
session attribute
A servlet code written to add details in database but not happening?
Building JSP pages and link to MySQL table