You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Manca Davide <da...@matrix.it> on 2007/05/07 11:54:17 UTC

tomcat 6 and system property

Hello to everyone in the List,

 

I have a problem with system property with Tomcat 6.

 

I have various webapp under various hosts under one Tomcat. I'm trying
to set system-properties for every webapps, I mean that every single
webapp should have one or more system-property. In resin 2 or 3 it is
possible setting them in the webapp web.xml like that:

 

  <system-property config.filename="/tmp/commenti.config.xml"/>

 

  <system-property log4j.configuration="file:////tmp/log4j.properties"/>

  <system-property config.location="file" />

 

I tried the same way in Tomcat 6 but it doesn't see system-properties.

 

And I cannot use the -D into the Java or Tomcat start command because of
I have a lot of webapps under one Tomcat.

 

Thanks a lot.

 

Best regards.

Dave.


Re: Odd tomcat 6.1.0 problem

Posted by Sebastiaan van Erk <se...@sebster.com>.
Adam Lipscombe wrote:
> Folks
>
> I have an odd problem that occurs on TC6 running on fedora core 6.
> Apache in fronting TC.
>
> When I try to pass an HTML parameter from a JSP it is not in present 
> in the request object for the receiving JSP. I get the following in 
> catalina.out:
>
> WARNING: Parameters: Character decoding failed. Parameter skipped.
> java.io.CharConversionException: isHexDigit
>         at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
>         at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
>         at 
> org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
>         at 
> org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392) 
>
>         at 
> org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344) 
>
>         at 
> org.apache.catalina.connector.Request.parseParameters(Request.java:2453)
>         at 
> org.apache.catalina.connector.Request.getParameter(Request.java:1031)
>         at 
> org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) 
>
>         ....
>
>
> The param I am trying to pass is a simple text string.
>
>
> Any ideas?

Sounds to me like there is a % sign in the parameter text which is not 
url encoded. Make sure you url encode the request url in your first JSP.
Regards,
Sebastiaan


---------------------------------------------------------------------
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: Odd tomcat 6.1.0 problem

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
send us a small test app please
Filip

Adam Lipscombe wrote:
> Folks
>
> I have an odd problem that occurs on TC6 running on fedora core 6.
> Apache in fronting TC.
>
> When I try to pass an HTML parameter from a JSP it is not in present 
> in the request object for the receiving JSP. I get the following in 
> catalina.out:
>
> WARNING: Parameters: Character decoding failed. Parameter skipped.
> java.io.CharConversionException: isHexDigit
>         at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
>         at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
>         at 
> org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
>         at 
> org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392) 
>
>         at 
> org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344) 
>
>         at 
> org.apache.catalina.connector.Request.parseParameters(Request.java:2453)
>         at 
> org.apache.catalina.connector.Request.getParameter(Request.java:1031)
>         at 
> org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) 
>
>         ....
>
>
> The param I am trying to pass is a simple text string.
>
>
>
> Any ideas?
>
>
> TIA - Adam
>
>
> ---------------------------------------------------------------------
> 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
>
>
>


---------------------------------------------------------------------
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


Odd tomcat 6.1.0 problem

Posted by Adam Lipscombe <ad...@expensys.com>.
Folks

I have an odd problem that occurs on TC6 running on fedora core 6.
Apache in fronting TC.

When I try to pass an HTML parameter from a JSP it is not in present in the request object for the 
receiving JSP. I get the following in catalina.out:

WARNING: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
         at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
         at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
         at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
         at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392)
         at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344)
         at org.apache.catalina.connector.Request.parseParameters(Request.java:2453)
         at org.apache.catalina.connector.Request.getParameter(Request.java:1031)
         at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)
         ....


The param I am trying to pass is a simple text string.



Any ideas?


TIA - Adam


---------------------------------------------------------------------
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: tomcat 6 and system property

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Manca Davide wrote:
> This didn't worked out, I tried to write in my server.xml to let Jfig work.
>
>  
>
> <Context.....>
>
>         <Environment name="config.filename" value="/myhost/doc_root/webapps/mywebapp/WEB-INF/classes/myconfig.xml" type="java.lang.String" override="false"/>
>
>         <Environment name="config.location" value="file" type="java.lang.String" override="false"/>
>
> </Context>
>   
This does not set system property. Please read 
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html to 
know how to read such variables / parameters.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


RE: tomcat 6 and system property

Posted by Manca Davide <da...@matrix.it>.
Hello,

 

This didn't worked out, I tried to write in my server.xml to let Jfig work.

 

<Context.....>

        <Environment name="config.filename" value="/myhost/doc_root/webapps/mywebapp/WEB-INF/classes/myconfig.xml" type="java.lang.String" override="false"/>

        <Environment name="config.location" value="file" type="java.lang.String" override="false"/>

</Context>

 

But the output was:

 

May 8, 2007 10:37:05 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Allocate exception for servlet DestinationSearchServlet

org.igfay.jfig.JFigException: ConfigurationDictionary.getValueReally() ***Exception ***

Section DESTINATION not found.

        at org.igfay.jfig.JFigDictionary.getValueReally(JFigDictionary.java:292)

        at org.igfay.jfig.JFigDictionary.getValue(JFigDictionary.java:247)

        at org.igfay.jfig.JFig.getValue(JFig.java:480)

        at it.matrix.planner.DestinationSearchServlet.loadApplicationConfiguration(DestinationSearchServlet.java:501)

        at it.matrix.planner.DestinationSearchServlet.init(DestinationSearchServlet.java:162)

        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)

        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)

        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)

        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)

        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)

        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)

        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)

        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)

        at java.lang.Thread.run(Thread.java:595)

 

I tried also

 

<Context.....>

<Parameter name="config.filename" value="/myhost/doc_root/webapps/mywebapp/WEB-INF/classes/myconfig.xml " type="java.lang.String" override="false"/>

        <Parameter name="config.location" value="file" type="java.lang.String" override="false"/>

</Context>

 

But it didn't work out...what do I wrong?

 

I need help please!

 

Thank you in advance

 

-----Original Message-----
From: Mikolaj Rydzewski [mailto:miki@ceti.pl] 
Sent: lunedì 7 maggio 2007 12.47
To: Tomcat Users List
Subject: Re: tomcat 6 and system property

 

Manca Davide wrote:

> I have various webapp under various hosts under one Tomcat. I'm trying

> to set system-properties for every webapps, I mean that every single

> webapp should have one or more system-property. In resin 2 or 3 it is

> possible setting them in the webapp web.xml like that:

> 

>  

> 

>   <system-property config.filename="/tmp/commenti.config.xml"/>

> 

>  

> 

>   <system-property log4j.configuration="file:////tmp/log4j.properties"/>

> 

>   <system-property config.location="file" />

> 

>  

> 

> I tried the same way in Tomcat 6 but it doesn't see system-properties.

>   

So? The <system-property /> syntax is Resin specific.

> And I cannot use the -D into the Java or Tomcat start command because of

> I have a lot of webapps under one Tomcat.

>   

I'd rather use context parameters or environment entries 

(http://tomcat.apache.org/tomcat-6.0-doc/config/context.html) than 

system properties.

 

-- 

Mikolaj Rydzewski <mi...@ceti.pl>

 


Re: tomcat 6 and system property

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Manca Davide wrote:
> I have various webapp under various hosts under one Tomcat. I'm trying
> to set system-properties for every webapps, I mean that every single
> webapp should have one or more system-property. In resin 2 or 3 it is
> possible setting them in the webapp web.xml like that:
>
>  
>
>   <system-property config.filename="/tmp/commenti.config.xml"/>
>
>  
>
>   <system-property log4j.configuration="file:////tmp/log4j.properties"/>
>
>   <system-property config.location="file" />
>
>  
>
> I tried the same way in Tomcat 6 but it doesn't see system-properties.
>   
So? The <system-property /> syntax is Resin specific.
> And I cannot use the -D into the Java or Tomcat start command because of
> I have a lot of webapps under one Tomcat.
>   
I'd rather use context parameters or environment entries 
(http://tomcat.apache.org/tomcat-6.0-doc/config/context.html) than 
system properties.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>