You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Kukulies <ku...@gilberto.physik.rwth-aachen.de> on 2001/05/17 17:43:36 UTC

passing " quotes in html

Sorry that this is not directly tomcat related but in the course of 
writing a jsp/servlet application I came across the problem
that I'm generating a FORM which contains 
something like:

fprintf(yyout,"<input type=\"hidden\" name=line%d value=\"%s\">\n",p,s);

But string s can contain " quotes. In order to have the quotes later
appear in the html page, what do I have to do to quote the quotes?

-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

SessionListener

Posted by Alin Simionoiu <as...@musicnet.com>.
Does anybody use SessionListener?..
I try to use this, but is absolutly an nightmare to put everithing in place.
I cannot find a very clear documentation about how the web.xml file should be set.

Alin

Problems replacing SessionInterceptor

Posted by "David M. Rosner" <da...@recommend-it.com>.
Hello,

I've written my own version of the SessionInterceptor and placed this with 
my application class files (com.myapp.uril.SessionInterceptor). I updated 
the server.xml file to point to my version of the class instead of Tomcats 
by updating the following:

         <RequestInterceptor
             className="com.myapp.util.SessionInterceptor"
             noCookies="false" />


This works fine on my development box, but on my production box I get an 
error on startup claiming it can not find the class. In the production 
environement we use directories under the webapps:

         <Context path="/"
                  docBase="webapps/app-010517a"
                  crossContext="false"
                  debug="0"
                  reloadable="false" >
         </Context>


Is there something else I need to do to get Tomcat to use my version of the 
SessionInterceptor?


Thanks,

-dave


Re: passing " quotes in html

Posted by Christoph Kukulies <ku...@gilberto.physik.RWTH-Aachen.DE>.
On Thu, May 17, 2001 at 05:43:36PM +0200, Christoph Kukulies wrote:
> 
> Sorry that this is not directly tomcat related but in the course of 
> writing a jsp/servlet application I came across the problem
> that I'm generating a FORM which contains 
> something like:
> 
> fprintf(yyout,"<input type=\"hidden\" name=line%d value=\"%s\">\n",p,s);
> 
> But string s can contain " quotes. In order to have the quotes later
> appear in the html page, what do I have to do to quote the quotes?

Dumb question. *withdrawn*
(inserted &#34; for the quotes).
> 
> -- 
> Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

Virtual Hosting and security

Posted by Renato Weiner <re...@yahoo.com>.
 Hi all, 
I know this is a quite common subject but I didn't find any ultimate answer. In a shared hosting environment, how can I prevent clientX to read files from clientY ? 
-  java.policy doesn't cover this. If I use grant codeBase 'file:/...' or 'http://', it doesn't work. 
- can I override SecurityManager ? If so, how can I know which JSP/Servlets is trying to read a file ? ( inside the methgd checkRead I now the file... If I know the absolute path I can compare the location of the reader and the file being read ) 
Did anybody make a secure shared-hosting environment ???? 
I do not want to use a private JVM for each client, because it's too expensive. 
Thanks in advance 
Renato - Brazil. 



---------------------------------
Do You Yahoo!?
Yahoo! Auctions $2 Million Sweepstakes  -  Got something to sell?

Virtual Hosting and security

Posted by Renato Weiner <re...@yahoo.com>.
 Hi all,
I know this is a quite common subject but I didn't find any ultimate answer. In a shared hosting environment, how can I prevent clientX to read files from clientY ? 
-  java.policy doesn't cover this. If I use grant codeBase 'file:/...' or 'http://', it doesn't work.
- can I override SecurityManager ? If so, how can I know which JSP/Servlets is trying to read a file ? ( inside the methgd checkRead I now the file... If I know the absolute path I can compare the location of the reader and the file being read ) 
Did anybody make a secure shared-hosting environment ????
I do not want to use a private JVM for each client, because it's too expensive.
Thanks in advance
Renato - Brazil.
 



---------------------------------
Do You Yahoo!?
Yahoo! Auctions $2 Million Sweepstakes  -  Got something to sell?

Re: passing " quotes in html

Posted by Wyn Easton <wy...@yahoo.com>.
Use the single quote (') in the HTML that has double
quotes.

Like this:

<input type="text" value='"Hello"'>

--- Christoph Kukulies
<ku...@gilberto.physik.rwth-aachen.de> wrote:
> 
> Sorry that this is not directly tomcat related but
> in the course of 
> writing a jsp/servlet application I came across the
> problem
> that I'm generating a FORM which contains 
> something like:
> 
> fprintf(yyout,"<input type=\"hidden\" name=line%d
> value=\"%s\">\n",p,s);
> 
> But string s can contain " quotes. In order to have
> the quotes later
> appear in the html page, what do I have to do to
> quote the quotes?
> 
> -- 
> Chris Christoph P. U. Kukulies
kuku@gil.physik.rwth-aachen.de


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/