wood burning stoves 2.0*
The moose likes JSP and the fly likes dynamic jsp forms? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "dynamic jsp forms?" Watch "dynamic jsp forms?" New topic
Author

dynamic jsp forms?

Jack Harrison
Greenhorn

Joined: Nov 08, 2005
Posts: 1
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30392
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic jsp forms?