Hi Everybody,
Does anyone know of a post that discusses a way to use Tomcat to
generate HTML from a JSP file?
I have a need to generate HTML and provide it as a text file locally
(i.e. create a local application that will create a file that contains
the appropriate HTML). I would like to write the HTML as a JSP so I
can leverage all of the benefits that go along with writing JSP
instead having to generate the HTML inline in Java source code.
Is there a better way to do this?
When I search on something like jsp to html or render jsp as html the
hits I get refer to ways of doing this as one normally would (i.e.
running Tomcat as a server and making requests through a browser).
Thanks,
John
|
|
0
|
|
|
|
Reply
|
grasp06110 (25)
|
12/9/2009 4:12:20 AM |
|
grasp06110 wrote:
> I would like to write the HTML as a JSP so I
> can leverage all of the benefits that go along with writing JSP
> instead having to generate the HTML inline in Java source code.
This part makes no sense to me. JSP *do* generate HTML. I think
perhaps that's all they do. How are you having a hard time?
Here is a JSP. How does this not generate HTML?
<html>
<body>
<h1>The Message</h1>
Your message is:
<% out.println( "Hello World!" ); %>
</body>
</html>
|
|
0
|
|
|
|
Reply
|
markspace
|
12/9/2009 6:09:36 AM
|
|
On Dec 8, 11:12=A0pm, grasp06110 <grasp06...@yahoo.com> wrote:
> Hi Everybody,
>
> Does anyone know of a post that discusses a way to use Tomcat to
> generate HTML from a JSP file?
>
> I have a need to generate HTML and provide it as a text file locally
> (i.e. create a local application that will create a file that contains
> the appropriate HTML). =A0I would like to write the HTML as a JSP so I
> can leverage all of the benefits that go along with writing JSP
> instead having to generate the HTML inline in Java source code.
>
> Is there a better way to do this?
>
> When I search on something like jsp to html or render jsp as html the
> hits I get refer to ways of doing this as one normally would (i.e.
> running Tomcat as a server and making requests through a browser).
>
> Thanks,
> John
If you use Eclipse IDE to develop JSP software, Eclipse application
will generate a template for you, then you can modify from there.
|
|
0
|
|
|
|
Reply
|
moongeegee
|
12/11/2009 6:54:07 PM
|
|
On Tue, 8 Dec 2009 20:12:20 -0800 (PST), grasp06110
<grasp06110@yahoo.com> wrote, quoted or indirectly quoted someone who
said :
>
>Does anyone know of a post that discusses a way to use Tomcat to
>generate HTML from a JSP file?
>
>I have a need to generate HTML and provide it as a text file locally
>(i.e. create a local application that will create a file that contains
>the appropriate HTML). I would like to write the HTML as a JSP so I
>can leverage all of the benefits that go along with writing JSP
>instead having to generate the HTML inline in Java source code.
>
>Is there a better way to do this?
>
>When I search on something like jsp to html or render jsp as html the
>hits I get refer to ways of doing this as one normally would (i.e.
>running
One way to do it would be to use a utility like download that
simulates a browser. You give it an local URL on the command line and
the name of a file where to store the result. Or you could use the
methods of the FileTransfer class wrapped in a loop to generate HTML
for your entire website. See
http://mindprod.com/products1.html#FILETRANSFER
You also could probably write a servlet that fakes transactions coming
it and routes them.
--
Roedy Green Canadian Mind Products
http://mindprod.com
The future has already happened, it just isn�t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 61)
|
|
0
|
|
|
|
Reply
|
Roedy
|
12/12/2009 6:11:24 AM
|
|
grasp06110 wrote:
> Hi Everybody,
>
> Does anyone know of a post that discusses a way to use Tomcat to
> generate HTML from a JSP file?
>
> I have a need to generate HTML and provide it as a text file locally
> (i.e. create a local application that will create a file that contains
> the appropriate HTML). I would like to write the HTML as a JSP so I
> can leverage all of the benefits that go along with writing JSP
> instead having to generate the HTML inline in Java source code.
>
> Is there a better way to do this?
>
> When I search on something like jsp to html or render jsp as html the
> hits I get refer to ways of doing this as one normally would (i.e.
> running Tomcat as a server and making requests through a browser).
>
> Thanks,
> John
John, one possible way is to deploy the application on Tomcat, write a
simple program to visit those JSP pages, and save the resulting HTML
pages you get automatically.
Tony
|
|
0
|
|
|
|
Reply
|
Tony
|
12/13/2009 4:46:59 PM
|
|
|
4 Replies
155 Views
(page loaded in 0.162 seconds)
Similiar Articles: tomcat - access files outside of webapp - comp.lang.java ...... in the %TOMCAT_HOME%/conf/web.xml, see= http://tomcat.apache.org/tomcat-5.5-doc/config/context.html ... Servlet under Tomcat using Runtime.exe(). The exe reads a file Generating excel sheets through JSP - comp.lang.java.programmer ...Now I'm using tomcat 5.5 and this is just not working.... Can ... Excel Interaction - comp.soft-sys.matlab... gui Export HTML table inside JSP to Excel ... How to get ... prevent direct access to JSP - comp.lang.java.programmer ...Okay, so we're upgrading to Tomcat 6, and we've encountered a difficulty. ... eventdata, handles, varargin), how to prevent ... comp.lang.java.gui Export HTML ... Hox to match Linux PID to tomcat thread - comp.lang.java ...... but I was not able to find theaccording Tomcat Thread.Is there a way to get the right Tomcat ... Thread Dump"<http://qa.netbeans.org/bugzilla/generating-thread-dumps.html>I ... Picking an unused port number - comp.lang.java.programmer ...We could use 8080 like Tomcat, but there might also be a Tomcat instance running that we ... download.oracle.com/javase/6/docs/api/java/util/prefs/package-summary.html ... How to determine Java version is at least 6? - comp.lang.java ...1) Web start - to handle versioning and possibly prompt the user to upgrade if they have lower version. <http://www.physci.org/jws/version.html> 2) try/catch. Java Based Web Browser - comp.lang.java.programmerThey all render HTML,some better than others, and usually eachbrowser will render ... like JSP,Servlet, ASP ... saving them to disk ... creating a war file using tomcat ... How to get a .lib from .dll - comp.lang.asm.x86ALIB crtdll.dll http://alink.sourceforge.net/download.html > How can I get the list of functions contained in the DLL. PEEXPORT crtdll.dll http://rs1.szif.hu/~tomcat ... Passing checkbox values from one JSP page to another - comp.lang ...Hi, I'm trying to get user selections (using checkboxes) on one ... can be done server-side with normal HTML ... Programming using JSP and Tomcat: cannot be resolved to ... Problem in Loading JSP - comp.lang.java.programmerPleeeeze help me.> I am using struts framework under tomcat 5.5 server.> note ... I can allready decrypt pdf, doc, xls, jsp, htm, html, js and txt. - Now does ... Tomcat ... Tutorial: Configuring & Using Apache Tomcat 7 and Apache Tomcat 6A BOUT THE I NSTRUCTOR C OURSE R EVIEWS JSF 2.0 & P RIME F ACES A JAX (w/ J Q UERY, HTML 5, E ... Using Tomcat as a deployment server or integrating Tomcat as a plugin within the ... Jakarta Tomcat 4 and 5: Configuration and Usage TutorialTutorial on setting up and using Apache Jakarta Tomcat for use as a standalone ... generation of the DOCTYPE (specifies the HTML version--useful when using HTML ... 7/15/2012 6:30:56 AM
|