You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by "T.V.Raman" <ra...@adobe.com> on 1999/04/05 20:48:26 UTC

mod_jserv/4193: multiline (backslashed) entries in servlets.properties fail

>Number:         4193
>Category:       mod_jserv
>Synopsis:       multiline (backslashed) entries in servlets.properties fail
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Apr  5 11:50:01 PDT 1999
>Last-Modified:
>Originator:     raman@adobe.com
>Organization:
apache
>Release:        apache: 1.3.4 apache-jserv: 1.0b3
>Environment:
Solaris 2.5.1 Apache 1.3.4 JSDK 2.0 JDK 1.2 
>Description:
If you create multiline entries in servlet.properties like so

servlet.Hello.initArgs=\
msg="Hello there", \
who="who are you?"

the init args dont appear to reach the servlet correctly.

Removing the backslashes and creating a long line works.
>How-To-Repeat:
Add the following init method to Hello.java:
public void init(ServletConfig config)
    throws ServletException {
    super.init(config);
        
    msg = getInitParameter("message");
}
//and declare msg 
    String msg = null;

Now in servlets.properties (or the appropriate properties file 
add 
servlet.Hello.initArgs=\
msg="Hello"

Add an appropriate line to method doGet to output the msg 
>Fix:

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]