This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android 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 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

how can i include a JSP in an HTML page?

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a index.html page. i cannot change its extension from .html to .jsp i need an application to run in background and this application is launched by this JSP. i want this JSP content to be a part of each page in my web application. hence i want to place it in a frame in index.html. how can i do it?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could create a mapping in your web.xml file that points the URL "/index.html" to either a servlet or to your JSP page.
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but this will not solve the problem because when i will change the page from index.html to consequent pages, the JSP will not exist anymore. i want to include the JSP in a frame in an HTML page.is it possible?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use an iframe in each page.
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am sorry, but this will also not solve the problem. i dont want that application JSP to reload with every page. it needs to be loaded only once throughout the session of the user.

i can not create a index.jsp with two frames. as i have said in the other thread of mine : HTML Frames and JSP! (https://coderanch.com/t/287429/JSP/java/HTML-Frames-JSP)

these are two interdependent problems. please give me solution. i am stuck up.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If index.html is a frame set, just create one frame for your JSP and another for main content window.

I'm not sure I understand what the question is.
Are you just asking how to build frames in a browser?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If all you're looking for is help with Frames and setting the "target" attribute, this thread would be better off in the HTML/Javascript forum.
I'm sure the moderator will move it there soon.

Can you post the code to your page with the frameset element?
 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:
If index.html is a frame set, just create one frame for your JSP and another for main content window.

I'm not sure I understand what the question is.
Are you just asking how to build frames in a browser?



yes, this is just exact the solution, it just did not strike me. thanks a million.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic