Skip to main content

Execute html pages as jsp

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
Gnorro76
Offline
Joined: 2012-09-04

Hi
is possible to execute html pages as jsp with GlassFish 2.1?

I don't need a webapplication. I want only to configure a virtual server and have some html pages inside it's docroot. But these pages have jsp code inside and I can't rename them to "jsp", so I need to tell GF to execute also html pages as jsp

thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miluch
Offline
Joined: 2007-06-18

http://stackoverflow.com/questions/4249622/using-html-files-as-jsps

br Jakub

2012/9/4

> Hi is possible to execute html pages as jsp with GlassFish 2.1? I don't
> need
> a webapplication. I want only to configure a virtual server and have some
> html pages inside it's docroot. But these pages have jsp code inside and I
> can't rename them to "jsp", so I need to tell GF to execute also html pages
> as jsp thanks
>
> --
>
> [Message sent by forum member 'Gnorro76']
>
> View Post: http://forums.java.net/node/**889818
>
>
>

yaroska
Offline
Joined: 2006-05-05

Hi,

You can try to specify in WEB-INF/web.xml

<jsp-config>
  <jsp-property-group>
    <url-pattern>*.html</url-pattern>
  </jsp-property-group>
</jsp-config>
pljosh
Offline
Joined: 2006-12-05

Hi,
Knowing nothing about how GF works or gets configured, I would just rename
all the files to dot-jsp and would write a servlet with a single line of
code 'doGet' method which would forward all the dot-html to dot-jsp. A
five-minutes solution.

Regards,
Witold Szczerba
On Sep 4, 2012 11:08 AM, wrote:

> Hi is possible to execute html pages as jsp with GlassFish 2.1? I don't
> need
> a webapplication. I want only to configure a virtual server and have some
> html pages inside it's docroot. But these pages have jsp code inside and I
> can't rename them to "jsp", so I need to tell GF to execute also html pages
> as jsp thanks
>
> --
>
> [Message sent by forum member 'Gnorro76']
>
> View Post: http://forums.java.net/node/**889818
>
>
>

Gnorro76
Offline
Joined: 2012-09-04

Hi

thanks for your reply guys

I solved with the servlet. Didn't try the config in xml but I will do

thanks

bye