You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Garner Shawn <sh...@gmail.com> on 2006/09/28 17:26:49 UTC

problem with scriplets not evaluating

I'm using sitemesh with struts 2 on tomcat 5.5.17.
Alright I have a decorator that is a JSP file.
Now when the requested page comes through it is a plain old HTML page

http://localhost:8080/mycontext/product/myProduct/docs/index.html

Now the sitemsh filter and struts 2 filters are both mapped to /* so
they both filter this.

When my JSP decorator is applied to the html page I tried this:
<%=request.getContextPath()%> and it never prints out.

However the jsp tags in the JSP decorator are evaluated so I end up
with decorated jsp page.

I've checked that I have my web.xml correctly configured to allow JSP scriplets.

Also if I request a JSP page instead of a HTML page then
<%=request.getContextPath()%> evaluates fine.   (In fact it is the
same decorator JSP)

Is there something different about the request of a JSP page vs a HTML page?

Shawn

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: problem with scriplets not evaluating

Posted by Mark Thomas <ma...@apache.org>.
Garner Shawn wrote:
> Is there something different about the request of a JSP page vs a HTML
> page?

JSP - dynamic, generates java source for servlet, executes servlet
HTML - static, sneds whatever is on the disk

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org