• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic jsp forms?

 
Jack Harrison
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I went to be able to generate a dynamic form based upon an XML document that is read into the application.

The XML will determine which form fields, etc will need to be populated in the form.

My problem is that the output form fields need to contain JSP tags, so I need a servlet to dynamically create the JSP output.
This bit isn't too hard...my problem is that I need to somehow get the JSP container to process the servlet output as if it were a standard JSP document.

Any ideas? BTW, I'm using JBoss, however the ideal solution would not be tied to any particular product.

Thank you.
-Jack
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jack,
Welcome to JavaRanch!

As you've probably noticed by now, you can't mix and match servlets and JSPs. Instead, have the servlet generate raw HTML. That can be displayed by the browser. There is no reason to involve a JSP.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can't mix and match servlets and JSPs


Just in case this statement gets misconstrued -- actually the combination of Servlets and JSP is a match made in heaven: Servlets to perform the processing, JSP to render the view. What you can't do -- which is what I'm sure Jeanne meant -- is to emit JSP syntax from a Servlet and expect it to be interpreted.

If you'd like to use JSP for this project you might want to look into the 'x' tags of the JSTL.
[ November 08, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic