You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by haimra <ha...@012.net.il> on 2004/12/11 00:12:27 UTC
JSP expressions are displayed as string
I am having this wired problem driving me crazy.
I am using JSTL and Tomcat 5.0.30.
Some times for unknown reason the JSP expressions are displayed as string
for example
The following command
<c:out value="${fn:escapeXml(param.code)}"/>
will display the expressions fn:escapeXml(param.code)
and not the actual value of param.code
Any clue why this happens?
Re: JSP expressions are displayed as string
Posted by Thomas Chille <th...@gmail.com>.
Hi,
last night i stepped during the upgrade from TC4 to TC5 and from
JSTL1.0 to JSTL1.1 into the same problem. And fortunately changing the
2.3er DTD entry to an 2.4er Schema entry solved my problem.
But i dont know why.
What has this entry to do with the execution of JSTL-Expressions?
Thanks in advice for any hint,
thomas!
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: JSP expressions are displayed as string
Posted by haimra <ha...@012.net.il>.
I replaced my <web-app> tag with the following tag in my web.xml
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
Then I rebuild everything and it worked like magic.
Thanks Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: New Babie query - pls pls help me
Posted by Ben Souther <bs...@fwdco.com>.
Welcome aboard.
The first thing you should do is find yourself a good book or tutorial.
There is a good one here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/index.html
If you just want a simple servlet example that you can drop into
a running instance of Tomcat and run you can find one here:
http://simple.souther.us
Good Luck
-Ben
On Mon, 2004-12-13 at 08:09, Manisha Sathe wrote:
> Hi,
>
> I am totally totally new to Servlet/Tomcat. I wrote a very simple
> "HelloWorld" servlet. I could compile it and could create the
> HelloWorld.class file.
>
> But how to test it thr Tomat web server ? I put the class inside servlet
> example dir
> C:\jakarta-tomcat-5.0.28\webapps\servlets-examples\WEB-INF\classes
> But whe tried to run it like
> http://localhost:8080/servlets-examples/servlet/HelloWorld
>
> always i get description The requested resource
> (/servlets-examples/servlet/HelloWorld) is not available.
>
> I tried to start-stop/reload the tomcat servlet-example but still the same,
> i understand i need to change some files - but can any body tell stepwise
> instructions ? Pls pls help me I am stuck....
>
>
> Thanks in advance
> Manisha
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: New Babie query - pls pls help me
Posted by Jon Wingfield <jo...@mkodo.com>.
Argh. Triple hijack!
This thread started as "JSP expressions are displayed as string", became
"Do not allow browsing the root directory to tomcat", then "problem
starting tomcat 5.5/jdk1.3.1_11" and now "New Babie query - pls pls help
me".
For the sake of the archives and those of us using thread-aware mail
clients, please start a new thread instead of replying to a completely
unrelated topic.
Ta,
Jon
Antony Paul wrote:
> You need to create a mapping in web.xml to invoke the servlet. Look at
> the elements
> <servlet> and <servlet-mapping> elements in the
> example/WEB-INF/web.xml. Create a similar one and restart Tomcat.
>
> rgds
> Antony Paul
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: New Babie query - pls pls help me
Posted by Antony Paul <an...@gmail.com>.
You need to create a mapping in web.xml to invoke the servlet. Look at
the elements
<servlet> and <servlet-mapping> elements in the
example/WEB-INF/web.xml. Create a similar one and restart Tomcat.
rgds
Antony Paul
On Mon, 13 Dec 2004 21:09:07 +0800, Manisha Sathe
<ma...@starhub.net.sg> wrote:
> Hi,
>
> I am totally totally new to Servlet/Tomcat. I wrote a very simple
> "HelloWorld" servlet. I could compile it and could create the
> HelloWorld.class file.
>
> But how to test it thr Tomat web server ? I put the class inside servlet
> example dir
> C:\jakarta-tomcat-5.0.28\webapps\servlets-examples\WEB-INF\classes
> But whe tried to run it like
> http://localhost:8080/servlets-examples/servlet/HelloWorld
>
> always i get description The requested resource
> (/servlets-examples/servlet/HelloWorld) is not available.
>
> I tried to start-stop/reload the tomcat servlet-example but still the same,
> i understand i need to change some files - but can any body tell stepwise
> instructions ? Pls pls help me I am stuck....
>
> Thanks in advance
> Manisha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
New Babie query - pls pls help me
Posted by Manisha Sathe <ma...@starhub.net.sg>.
Hi,
I am totally totally new to Servlet/Tomcat. I wrote a very simple
"HelloWorld" servlet. I could compile it and could create the
HelloWorld.class file.
But how to test it thr Tomat web server ? I put the class inside servlet
example dir
C:\jakarta-tomcat-5.0.28\webapps\servlets-examples\WEB-INF\classes
But whe tried to run it like
http://localhost:8080/servlets-examples/servlet/HelloWorld
always i get description The requested resource
(/servlets-examples/servlet/HelloWorld) is not available.
I tried to start-stop/reload the tomcat servlet-example but still the same,
i understand i need to change some files - but can any body tell stepwise
instructions ? Pls pls help me I am stuck....
Thanks in advance
Manisha
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
problem starting tomcat 5.5 /jdk1.3.1_11
Posted by bi...@tcs.com.
I just installed tomcat5.5 i am getting following error,
Im using jdk1.3.1_11
can any body help me
thanks rgds
Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/apache/catalina/startup/Bootstrap (Unsupport
ed major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
Birendar Singh Waldiya
Tata Consultancy Services Limited
Mailto: birendar.waldiya@tcs.com
Website: http://www.tcs.com
DISCLAIMER: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited and any violation thereof would possibly attract penal action. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. TCS accepts no liability for any damage caused by this email or its attachments due to viruses, interference, interception, corruption or unauthorized access/use.
Re: Do not allow browsing the root directory to tomcat
Posted by inr <ay...@4sight-tech.com>.
Hi,
You can set the Directory listing to false in Web.xml file in order
to avoid displaying Directory contents.
Use the <Param-name> element to
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>False</param-value> // Make it
true for listing Directory file and Sub Dirctories
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
And set Your Home page the deafult Access in Welcome List in web.xml
For Welcome list
<welcome-file-list>
<welcome-file>YourHomePage.html</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
bye,
inr
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Do not allow browsing the root directory to tomcat
Posted by haimra <ha...@012.net.il>.
Hi All
I am using tomcat 5.0.30 for a web application.
Currently anyone can brows the Root directory of my application and server.
For example by typing the url http://127.0.0.1/PrjectName/
Is their any way to avoid this? Making the user access the home page and
then navigating and not seeing all the files and directors under
Thank
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: JSP expressions are displayed as string
Posted by Tim Funk <fu...@joedog.org>.
A few possible reasons
- Use a 2.3 DTD in your web.xml
- web.xml says el is disabled for that page
- the jsp has el ignored
- you haven't included the fn tag lib (doubt this)
-Tim
haimra wrote:
> I am having this wired problem driving me crazy.
>
> I am using JSTL and Tomcat 5.0.30.
>
> Some times for unknown reason the JSP expressions are displayed as string
> for example
>
> The following command
>
> <c:out value="${fn:escapeXml(param.code)}"/>
>
>
>
> will display the expressions fn:escapeXml(param.code)
>
> and not the actual value of param.code
>
>
>
> Any clue why this happens?
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org