• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i include a JSP in an HTML page?

 
Neeraj Macker
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • 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?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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! (http://www.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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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 Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic