Hi all, I need some advice regarding generate jsp file in runtime. I have a jsp web page which allowed the user the enter value forthe fields , and , when he or she click submit , it will generate thejsp file according to the value entered. Anyone have any ideas or suggestion how to do that ?ThanksWee Tat
|
|
0
|
|
|
|
Reply
|
weetat.yeo (17)
|
4/24/2007 1:17:28 PM |
|
weetat wrote:...> Anyone have any ideas or suggestion how to do that ?1) Hire a consultant.2) Do a turorial. (e.g. <http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html>)..or..3) Put a bit of effort into it, and ask a more specific question.-- Andrew Thompsonhttp://www.athompson.info/andrew/Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-general/200704/1
|
|
0
|
|
|
|
Reply
|
Andrew
|
4/24/2007 1:41:01 PM
|
|
weetat schrieb:> I need some advice regarding generate jsp file in runtime.....> > Anyone have any ideas or suggestion how to do that ?Simply don't touch the out-of-the-box settings of tomcat(e.g. don't turn dynamic jsp compilation off).The Jasper engine will check and recompile your JSPs,so you just have to write the file.Kai
|
|
0
|
|
|
|
Reply
|
Kai
|
4/24/2007 4:07:59 PM
|
|
weetat schrieb:> I need some advice regarding generate jsp file in runtime.> I have a jsp web page which allowed the user the enter value for> the fields , and , when he or she click submit , it will generate the> jsp file according to the value entered.Kai Schwebke wrote:> Simply don't touch the out-of-the-box settings of tomcat> (e.g. don't turn dynamic jsp compilation off).> The Jasper engine will check and recompile your JSPs,> so you just have to write the file.I interpreted the original question as how to display dynamic data in a JSP field, not how to rewrite the JSP itself. To the OP: Is that correct?If so, then you don't change the JSP. JSPs by their very nature create HTML dynamically, so you don't have to change the JSP in order to show data dynamically.Changing a JSP is equivalent to rewriting (part of) the application. A well-designed application does not need to be rewritten to deal with known runtime situations.You only have to change the JSP if the layout logic changes, and not always even then. JSPs are inherently dynamic and do not need to be recompiled to show different things depending on runtime phenomena.The Sun JEE tutorial covers how to do this.-- Lew
|
|
0
|
|
|
|
Reply
|
Lew
|
4/24/2007 11:10:29 PM
|
|
On Apr 24, 6:17 am, weetat <weetat....@gmail.com> wrote:> Hi all,>> I need some advice regarding generate jsp file in runtime.> I have a jsp web page which allowed the user the enter value for> the fields , and , when he or she click submit , it will generate the> jsp file according to the value entered.>> Anyone have any ideas or suggestion how to do that ?>> Thanks>> Wee TatI have a suggestion.Don't.JSP's are actually compiled into Java, and then into byte code. Ifyou want to have templates based on what a user enters, I wouldsuggest trying a different templating technology. Google for Velocityor FreeMarker. Also, you might consider writing your own templatingmechanism. JSP is not intended to be created automatically.
|
|
0
|
|
|
|
Reply
|
Daniel
|
4/25/2007 12:07:48 AM
|
|
|
4 Replies
186 Views
(page loaded in 0.085 seconds)
Similiar Articles: Problem in Loading JSP - comp.lang.java.programmerhow can I change the priority of thread during Runtime? - comp ... Problems to ... that no new problems occur, I should get finished ... I have a application make in jsp ... Unique computer identifier in Java? - comp.lang.java.security ...I'd like to get an id unique to a computer with Java, on Windows, MacOS and, if possible, Linux. It could be a disk UUID, motherboard s/n... Runtime.getRuntime().exec ... Show icon in system tray - comp.lang.java.gui... for JNIWrapper for example: http://www.jniwrapper.com/winpack.jsp#tray ... Icons at Runtime and Show Them in the System Tray - CodeProject Create dynamic icons at runtime and ... JScript Error 800a1391 'MM_NameOfPage_STRING' is undefined - comp ...... receive the following error: Microsoft JScript runtime ... RequestedBy|',none,''|Date|',none,NULL"; // create the ... Identifier Expected Error in JSP page - comp.lang.java ... how display japanese character with eclipse - comp.lang.java ...... and I whould like use java and > sql > database to create ... java.sun.com/javase/technologies/database/index.jsp>. ... japanese characters in Eclipse. When I start the Runtime ... comp.lang.java.security - page 6How to use safe connection in JSP? 0 71 (8/20/2003 11:16:27 AM) Hi ... user has the right to execute a specific method on an ejb at runtime ? This is very important to create ... matlab r2009b starting problem - comp.soft-sys.matlab... An unexpected error has been detected by Java Runtime ... http://java.sun.com/webapps/bugreport/crash.jsp # The ... How to make Matlab R2009b recognize Visual Studio 2010 ... get file timestamp - comp.unix.programmercreate file with timestamp 6 hours back - comp.unix ... Java get File Timestamp - JSP Tutorials,EJB Tutorial ... The class Runtime provides the runtime environment. "Platform default encoding" - comp.lang.java.help... Linux, and Microsoft Windows) and the Java SE Runtime ... boulder.ibm.com/infocenter/iwedhelp/v6r0/index.jsp ... it would make sense now for Microsoft/Oracle to make ... getResourceAsStream() problem - comp.lang.java.programmer ...Can I get runtime information on which directories are in ... The normal wasy >>>> to make a resource available is ... Problem in Loading JSP - comp.lang.java.programmer hi ... How to generate PDF file in jsp at runtime...? - Yahoo! AnswersBest Answer: for showing ur content ur content as pdf, u have to do work on server side, u have to change extend HttpServlet Class and then taking refernce ... iText - Generate PDF from Servlet or JSP with iTextiText tutorials, Java Generate or Output PDF from Servlet or JSP Java Server Page with iText, iText lowagie, Java open generate manipulate PDF, Java PDF API, Java ... 7/22/2012 3:22:27 AM
|