Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display data on first jsp on start of application

 
rohit surve
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kartik Tal
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic