This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to display page elements sequential in Struts2

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

We've developed Java application using Struts 2 as presentation Layer, Spring as Service Layer and Hibernate as Persistence Layer.
The Page Structure is like this:




Everything is working fine. When a link on a website is clicked the previous page stands still while:
1) Request goes to server
2) Corresponding action class found
3) execute() called
4) Service called
5) Corresponding method called
6) Querying database using Hibernate completed
7) List<> of Objects generated
8) Returning SUCCESS
9) Finding corresponding JSP page
10) Rendering JSP Page

And The rendered JSP Page is shown at once. As I've said everything is ok. But we're wanting the New Page (at least some elements Like Header of the Page) is starting to be generated and shown, while we're Fetching data from database.

Is this Possible in anyway except using AJAX?
If we're using Javascript to display Page elements (Header, Navigation bar, Menu, Content, Footer) sequential what would be the effect on SEO Ranking?
Is using Javascript a good approach for this when the Searchability of Content by SEs is very important to us?

I'd really appreciate if anyone could help me out.

Regards,
Khosrow
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without Ajax you only get one request, one response.
 
Khosrow Moossavi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't want more than One Request or Response neither. I want the functionality as doing hardcoding all the program in the JSP page and using response.flush() whenever we want the buffer up to that point sent to browser.

Is the content readable and indexable by search engines If we use AJAX?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose you could *try* coding a flush into the JSP, but ew.

What, specifically, are you trying to accomplish?
 
this is supposed to be a surprise, but it smells like a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!