• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Create new JSP page dynamically

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
New to JSP I am working with Spring MVC with annotations and Hibernate.

My question is: I select an item from the drop down menu (populated by Controller). Summary regarding this item is displayed as hrefs. On clicking on this href, I want a page to by created dynamically which will display the details of this selected item. So I want to know if it is possible to get a jsp page to be created dynamically without it actually being physically present.

The main controller class annotated with /test that populates the drop down box with Get method. This controller class has a method which will handle the url /test/about-test - this is invoked when the href is clicked.. I hope you understand my question. If its easier, you could also tell me how I can redirect the results to a particular page (already created) from within this method. thanks in advance for any help!
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

... I want a page to by created dynamically which will display the details of this selected item. So I want to know if it is possible to get a jsp page to be created dynamically without it actually being physically present.


Why you want to create a JSP at runtime? Can't you create a JSP and use that to display data according to the params/data for that particular item? Is there anything other than this you are trying to accomplish here...?

...you could also tell me how I can redirect the results to a particular page (already created) from within this method


You have to forward the request to the required resource (Servlet/JSP). Note that this happens within the server (I guess you didn't mean the *Redirect the request* here?)
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you are new to JSP, there is much you need to learn about how JSPs work. Your question about "dynamic JSPs" shows that you have yet to grasp how to effectively use JSPs.

I'd recommend reading over a few articles that might help you get started:

The Secret Life of JSPs

The Front Man
 
Anne Abraham
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for asking me to go back and take a look at JSP. Ive come pretty far with it and correcting a lot of wrong impression I had about JSP
 
Bear Bibeault
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic