débutant : Contenu d'une page à chaque actualisation JSP - ASP - Programmation
Marsh Posté le 29-05-2004 à 13:10:32
une jsp est une servlet en fait ... donc elles sont persistante
Donc tu dois fermer et réouvrir tomcat ...
Sino tu modifie le fichier config pour qu'il rechange les servlets modifiées
Mais au passage tu t'es trompé de rubrique pour ton post
Marsh Posté le 26-07-2004 à 15:01:41
à quelle endroit il faut modifier le fichier httpd.conf
pour que je puisse le compiler à chaque fois !!!
merci.
Marsh Posté le 26-07-2004 à 15:37:44
Sauf erreur de ma part ça n'a rien à voir avec le fichier httpd.conf (et donc apache).
Il faut que tu modifie le fichier de configuration de tomcat ($TOMCAT_HOME/conf/server.xml) et que tu passe l'attribut reloadable de ton context à true.
exemple
Code :
|
Marsh Posté le 26-07-2004 à 16:55:27
je trouve pas l'attribut : reloadable dans le fichier server.xml !!
je peut l'ajouter ?
Marsh Posté le 26-07-2004 à 17:18:34
oui tu peux.
http://etudiant.univ-mlv.fr/~mrous [...] tomcat.php
pour plus de renseignement et en FR
Marsh Posté le 28-07-2004 à 10:52:09
toujour ça marche pas mon truc !!
voici le contenu du fichier server.xml :
-----------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License" );
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Server>
<!-- You can add a "home" attribute to represent the "base" for
all relative paths. If none is set, the TOMCAT_HOME property
will be used, and if not set "." will be used.
webapps/, work/ and log/ will be relative to this ( unless
set explicitely to absolute paths ).
-->
<ContextManager workDir="work" >
<!-- ==================== Global modules ==================== -->
<LoaderInterceptor11 useApplicationLoader="true" />
<TrustedLoader />
<LogSetter name="tc_log" timestamps="true"
verbosityLevel="INFORMATION" />
<LogEvents enabled="false" />
<!-- Backward compat: read the Context declarations from server.xml-->
<ContextXmlReader config="conf/server.xml" />
<!-- Separated Context -->
<ContextXmlReader config="conf/apps.xml" />
<AutoDeploy source="modules" target="modules"
redeploy="true" />
<AutoWebApp dir="modules" host="DEFAULT" trusted="true"/>
<AutoDeploy source="webapps" target="webapps" />
<AutoWebApp dir="webapps" host="DEFAULT" />
<PolicyLoader securityManagerClass="java.lang.SecurityManager"
policyFile="conf/tomcat.policy" />
<SimpleMapper1 />
<SessionExpirer checkInterval="60" />
<!-- For development you can use randomClass="java.util.Random" -->
<SessionIdGenerator randomClass="java.security.SecureRandom"
randomFile="/dev/urandom" />
<!-- ========== context processing modules ========== -->
<!-- This will be the "default" profile
( all except the "global" modules can be set per context )
-->
<LogSetter name="servlet_log"
timestamps="true"
verbosityLevel = "INFORMATION"
path="logs/servlet-${yyyyMMdd}.log"
/>
<LogSetter name="JASPER_LOG"
timestamps="true"
path="logs/jasper-${yyyyMMdd}.log"
verbosityLevel = "INFORMATION" />
<WebXmlReader validate="true" />
<ErrorHandler showDebugInfo="true" />
<WorkDirSetup cleanWorkDir="false" />
<Jdk12Interceptor />
<!-- Non-standard invoker, for backward compat. ( /servlet/* ) -->
<InvokerInterceptor />
<!-- you can add javaCompiler="jikes" -->
<JspInterceptor keepGenerated="true"
largeFile="false"
useJspServlet="false"
/>
<StaticInterceptor listings="true"
useAcceptLanguage="true"
useCharset="locale" />
<ReloadInterceptor fullReload="true" />
<SimpleSessionStore maxActiveSessions="-1" />
<AccessInterceptor />
<CredentialsInterceptor />
<SimpleRealm filename="conf/users/global-users.xml" />
<!-- UnComment the following and comment out the
above to get a JDBC realm.
Other options for driverName:
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott"
connectionPassword="tiger"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test"
connectionPassword="test"
"connectionName" and "connectionPassword" are optional.
-->
<!--
<JDBCRealm
debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:TOMCAT"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
roleNameCol="role_name" />
-->
<LoadOnStartupInterceptor />
<Servlet22Interceptor />
<!-- Tag pooling support.
To enable the reuse of tag handlers as described in
the JSP spec, uncomment the following. If your pages
use a lot of custom tags, you should see a nice performance
gain.
Note that placing the interceptor here will enable
Tag pooling for all of the web applicatitions loaded -
this may be a bad thing if all tags are not coded to
handle reuse. To enable pooling only for specific web
applications i.e. Contexts, place the interceptor inside of
the Context's definition.
To view information about tag usage uncomment the tag
LogSetter. Set verbosityLevel to DEBUG to see everytime
a tag is obtained and released.
-->
<!--
<LogSetter name="tag_pool_log" timestamps="true"
path="logs/tagpool-${yyyyMMdd}.log"
verbosityLevel="INFORMATION" />
<TagPoolManagerInterceptor />
-->
<!-- Request processing -->
<DecodeInterceptor />
<!-- If you are running SSL and wish to verify Tomcat sessions
against SSL sessions, use checkSSLSessionId="true"
Default is checkSSLSessionId="false" -->
<SessionId cookiesFirst="true" noCookies="false" />
<!-- Automatic config generation
Set noRoot="false" if you wish to have Tomcat try to take
control of the external web server's root context.
Additonal configuration of the external web server may be
required for this to be successful.
Note: Configuration files are not written as part of the
default startup behvior. Append "jkconf" to the startup
command to have Tomcat initialize, write the config files,
then exit. This may be done while Tomcat is running.
-->
<ApacheConfig noRoot="true" />
<IISConfig noRoot="true" />
<NSConfig noRoot="true" />
<!-- Uncoment for apache-style logs
Attributes: logFile, flush, format
<AccessLogInterceptor/>
-->
<!-- ==================== Connectors ==================== -->
<!-- old http adapter. Attributes:
secure - use SSL ( https )
keystore, keypass - certs for SSL
port
reportedname - Server name to send back to browser
by default report Tomcat Web Server ...
set an empty string to avoid sending server header
-->
<!-- Uncomment this if useing a 1.1 JDK
<Http10Connector port="8080"
secure="false"
maxThreads="100"
maxSpareThreads="50"
minSpareThreads="10" />
-->
<!--
Uncomment this for SSL support. You _need_ to set up a
server certificate if you want this to work, and you
need JSSE. See tomcat-ssl-howto.html for more detailed
instructions.
1. Make the JSSE jars available to Tomcat, either by making
them an installed extension or by adding them to the
Tomcat CLASSPATH.
2. Do: keytool -genkey -alias tomcat -keyalg RSA
RSA is essential to work with Netscape and IIS.
Use "changeit" as password. ( or add keypass attribute )
You don't need to sign the certificate.
-->
<Http10Connector port="443" secure="true" />
<!--
HTTP 1.1 support using the Coyote adapter and
and Http11 processor from jakarta-tomcat-connectors.
Note: CoyoteConnector supports the same attributes as
Http10Connector
-->
<!--
<CoyoteConnector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
-->
<!-- Note : To disable connection timeouts, set connectionTimeout value
to -1 -->
<!-- Note : To use gzip compression you could set the following properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!--
JNI connector. It assumes the library is located in
TOMCAT_HOME/bin/native/jni_connect.[dll, nlm, so]. or in LD_LIBRARY_PATH.
For different paths set "nativeLibrary" parameter.
The JniConnector will be self-enable only if JNI mode is detected.
-->
<JniConnector />
<!-- Apache AJP12 support. This is also used to shut down tomcat.
Parameter "address" defines network interface this Interceptor
"binds" to. Add it if you want to "bind" to just "127.0.0.1".
address="127.0.0.1"
Parameter "tomcatAuthentication", controls if Tomcat honors
( and uses ) auth done in HTTP Server or not, when true Tomcat does
not use in any way auth information provided by the HTTP Server.
true is the default.
tomcatAuthentication="false"
-->
<Ajp12Connector port="8007" />
<!-- Apache AJP13 support (mod_jk)
Parameter "address" defines network interface this Interceptor
"binds" to. Add it if you want to "bind" to just "127.0.0.1".
address="127.0.0.1"
Parameter "tomcatAuthentication", controls if Tomcat honors
( and uses ) auth done in HTTP Server or not, when true Tomcat does
not use in any way auth information provided by the HTTP Server.
true is the default.
tomcatAuthentication="false"
-->
<!-- old JK support. Uncomment if you need to use a 1.1 JDK
<Ajp13Connector port="8009" />
-->
<Context path="/examples" docBase="examples" debug="0" reloadable="true" crossContext="true">
<!-- Jk2 support using coyote. -->
<CoyoteConnector processorClassName="org.apache.jk.server.JkCoyoteHandler"
port="8009" />
<!--
Context definitions can be placed here ( not recommended ) or
in separate files. The ContextXmlReader will read all context
definitions ( you can customize the "base" filename ).
The default is conf/apps-[name].xml.
See conf/apps-examples.xml and conf/apps-admin.xml
-->
</ContextManager>
</Server>
-------------------------------------------------
je comprend rien dans ce fichier !!!
Marsh Posté le 27-05-2004 à 10:23:45
Bonjour,
j'ai un petit probleme avec jsp, en effet quand je modifie le programme jsp,et j'actualise la page ça change rien du tout,
voici le code:
<%
out.println ("<p> On est " + days + " aujourd'hui" );
%>
et quand je le modifie comme ca, la page ne se change pas !!
<%
out.println ("<p> nous somme le " + days + " aujourd'hui" );
%>
comment je peut faire ,et merci d'avance