[opencms-dev] [jsptemplate] ??? com.opencms.core.CmsException JSP not found
sebastian at alberoni.com.ar
Thu Jun 26 21:56:01 CEST 2003
This is my first message. As I could see in the list archive, I went through
the same problem of many other opencms beginners, and I couldn't find in the
archive an answer of help. But afterwards I could solve it on my own. It's
one of those simple mistakes that when you realise the reason you say: "I
cannot believe it was only that ..."
So I'm posting it here in order to help others.
Here it's the problem, and afterwards is the cause and solution.
When I tried to preview or view my first page created with my first JSP
template, as it is stated on the module tutorial "Template Howto", I got
[jsptemplate] ??? com.opencms.core.CmsException: 0 Unknown exception.
Detailed error: [CmsJspTemplate] Error while reading JSP
com.opencms.core.CmsException: 2 Not found. Detailed error:
root cause was com.opencms.core.CmsException: 2 Not found. Detailed error:
Cause & Solution:
the cause is that test01.jsp doesn't exist at all! What I had created was a
file named just "test01" and not "test01.jsp", the fact that a JSP icon
appears at the beginning doesn't mean that the file has the proper extension
internally in opencms. It worked ok when I renamed test01 to test01.jsp
When we create the master xml template at first, we don't have to put .xml
to the name of the plain text file, but when we create the jsp file for the
JSP template, we must add .jsp to the name.
Another solution is to leave test01 without the JSP extension, and specify
the path in the master template without extension too, like this:
We can do this too, because, as I've seen, when opencms copies these
templates to the file system so that Tomcat can run it, it appends .jsp in
the end of JSP templates. (so if we leave it without extension, it will be
copied like test01.jsp. And if we create it with extension, it will be
copied like test01.jsp.jsp)
I think that maybe this warning about file extensions should be put in a
future release of that howto tutorial in order to save time to starters who
are a bit sleepy like me ;-)
I'd worked with commercial CMS systems in the past, I've been studying
opencms for a few days, and up to now I think that opencms is great!
now I hope to discover a way to have these JSP templates stored outside
opencms, in my file system, so that I can modify them with my JBuilder or
any other tool instead of modifying them through my web browser..... if that
is possible, this is really great.
Information Systems Engineer
Web sites & web applications development
More information about the opencms-dev