Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

request.getContextPath issue.

Wesley Hof

2007-01-25


Hi list,

Version: Jakarta-5.5.7

I deployed a new warfile in a new virtualhost in my server.xml :

<Host name="dspextranet.lan.kiala.com" appBase="dspextranet"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
 <Context reloadable="true" path=""
docBase="/usr/local/kiala/dspextranet/dspextranet.war" override="true">
    <Resource name="jdbc/dspExtranetDS" type="javax.sql.DataSource"
auth="Container"
url="jdbc:mysql://kpserverdb:3306/dspextranet?autoReconnect=true&amp;characterEncoding=UTF-8&amp;useUnicode=true&amp;jdbcCompliantTruncation=false"
driverClassName="com.mysql.jdbc.Driver" username="" password=""
maxWait="5000" maxActive="4" maxIdle="2"/>
 </Context>
</Host>

Now in the src we do:

<% pageContext.setAttribute("ctx", request.getContextPath()); %>
<form action="${ctx}/${param.os_destination}" method="post">

but for some reason I always get http://home/home.action, and $ctx
contains just a "/", but the path in the context is set to "". Can
someone explain me how to fix this ?

Thanks.
Wesley.

--
(o_  Wesley Hof | System Engineer
//\  Kiala NV | Louizalaan 149/28 (Brussels/BE)
V_/_ Tel +32 2 541 1839 - http://www.kiala.com


*DISCLAIMER*
This e-mail (including any attachments) may contain information which is privileged or confidential or constitute non-public information.It is to be conveyed only to the intended recipient(s).If you received this e-mail in error, please notify the sender immediately by e-mail or telephone and delete the e-mail from your system without reading, copying or disclosing its contents to any other person.

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.