Automate creation of web.xml file for tomcat 4.1.29
hi , this is with ref to Tomcat 4.1.29, if i am correct, each Servlet in the application has to be mentioned in the web.xml file for the Tomcat to know about it. Is there any way to automate the creation of web.xml file , depending on the contents of the Servlet folder of the application. Any way to escape from writing each Servlet name in web.xml file.
rc
Hello,
Maybe you should check if you can use Ant tool to do
that. I am not sure if it can help u.
Zeph.
http://ant.apache.org/
It will, specially if used in conjunction with XDoclets :
http://xdoclet.sourceforge.net/
XDoclet has Ant tasks to generate web.xml files.
Similar Messages
-
Can i run a servlet without a web.xml file for servlet mapping?
Hello everyone.
The code i want to run compiles and everythink looks ok.
It produces the .class file.
I run Tomcat 4.1 and i build my Web site with Dreamweaver.
I have a form in a page and i want to send the data upon form completion to a database i already have build with MySql.
The database is up and running and the server is set-up ok.
I have changed the port in Tomcat to run on port 80.
The directory i have my site is
Tomcat41\webapps\ROOT\se
and the directory where i keep the servlet class is
Tomcat41\webapps\ROOT\se\WEB-INF\servlet
I have a web.xml file to map the servlet and placed it in
Tomcat41\webapps\ROOT\se\WEB-INF
In the Form action i write action:"/servlets/Classes/GroupRegistration"
and I RECEIVE AN 404 ERROR FROM APACHE.
Somethink is wrong .
The following is the code from the GroupRegistration.java file
and follws the web.xml file.
Please Help.
import java.sql.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class GroupRegistration extends HttpServlet
Connection con;
public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, java.io.IOException
handleForm(req, res);
public void init() throws ServletException {
try{
/* Loading the driver for the database */
Class.forName("com.mysql.jdbc.Driver");
Connection Con = DriverManager.getConnection("jdbc:mysql://localhost/se?user=luser&password=");
catch (ClassNotFoundException e) {
throw new UnavailableException("Couldn't load JdbcOdbcDriver");
catch (SQLException e) {
throw new UnavailableException("Couldn't get db connection");
private void handleForm(HttpServletRequest req, HttpServletResponse res)
throws ServletException {
//ServletOutputStream out = res.OutputStream();
//res.setContentType("text/html");
//Extract the form Data Here
String group = req.getParameter("GroupNo");
String Name1 = req.getParameter("Name1");
String LoginID1 = req.getParameter("LoginID1");
String Name2 = req.getParameter("Name2");
String LoginID2 = req.getParameter("LoginID2");
String Name3 = req.getParameter("Name3");
String LoginID3 = req.getParameter("LoginID3");
String Name4 = req.getParameter("Name4");
String LoginID4 = req.getParameter("LoginID4");
String URL = req.getParameter("URL");
String Title2 = req.getParameter("Title2");
String date = req.getParameter("date");
String INSERT = "INSERT INTO registration (groupno, name1, loginid1, name2, loginid2, name3, loginid3, name4, loginid4, url, topic, date) VALUES (" + group + "," + Name1 + "," + LoginID2 + "," + Name2 + "," + LoginID2 + "," + Name3 + "," + LoginID3 + "," + Name4 + "," + LoginID4 + "," + URL + "," + Title2 + "," + date + ")";
PreparedStatement pstmt = null;
try{
pstmt = con.prepareStatement(INSERT);
pstmt.executeUpdate();
catch (SQLException e) {
throw new ServletException(e);
finally {
try {
if (pstmt != null)pstmt.close();
catch (SQLException ignored){
The web.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com.xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<servlet>
<servlet-name>GroupRegistration</servlet-name>
<servlet-class>GroupRegistration</servlet-class>
</servlet>
<servlet-maping>
<servlet-name>GroupRegistration</servlet-name>
<url-pattern>/myGroupRegistration</url-patern>
</servlet-mapping>
</web-app>
I apreciate your time.
Thanks for any help.and the directory where i keep the servlet class is
Tomcat41\webapps\ROOT\se\WEB-INF\servletOthers have pointed out that "servlet" should be "classes", but there is another mistake that hasn't been spotted. If you want your servlet to appear in the root context, you should use:
Tomcat41\webapps\ROOT\WEB-INF\classes
If you want your servlet to appear under the /se context, then you should use:
Tomcat41\webapps\se\WEB-INF\classes
and also, in the latter case, your form action should be /se/myGroupRegistration. -
Where is the web.xml file in Tomcat 5.5
hi folks,
i made a small appl in Tomcat 5.5 named "Name". I made a WEB-INF folder inside the Name folder (which obv is inside the webapps folder), which inside had the classes and lib folder. After running the application where do i look for the web.xml file controlling my appl?
thanx in advance..well, the web.xml file must be done for you. Its specific to your project, you wont find in on other folders of tomcat.
-
Virtual-mapping in jrun-web.xml file for CFIDE is not working
I have put virtual-mapping for my web root into jrun-web.xml
file. It looks like this:
<virtual-mapping>
<resource-path>/*</resource-path>
<system-path>E:/WebSites/mywebroot</system-path>
</virtual-mapping>
So I need give virtual-mapping for my CFIDE too. It looks
like this:
<virtual-mapping>
<resource-path>/CFIDE/*</resource-path>
<system-path>E:/Apps/JRun4/servers/myserver/cfusion-ear/cfusion-war/CFIDE</system-path>
</virtual-mapping>
It is now working for me. When I use following url:
http://localhost:8002/CFIDE/administrator
I am getting "HTTP 404 - File not found". I have set it for
other servers they are working on same server. What I did wrong
this time?
Thanks ahead.
MikenjHi John,
i did some some changes in Account dimension in my Planning Dev server. When i was migrating it to QA using LCM in shared services it is howing this error: Import failed for the following reason - Error parsing the deployment xml.
First i define migration in Dev for export and the migration was successful.Then i went into QA shared services and started migration, i got this error for importing.
Could you help me out on this?
Regards,
Shilpa -
XML Question for web.xml file for LiteWebServer
Hi,
I have no clue of wut tags are required in the web.xml file.
Currently the following code is in my web.xml file and i am trying to run servlets that are located under web-inf/*.class
Pls tell me wuts wrong....
Do i need those mime-mapping tags, session and welcome tags.......... ?
Right now i just want those 2 servlets to work
And wut is this encoding ="UTF-8" in the first line of the xml file. Wut does that do... ? ARe there any others
Any help would b greatly appreciated
Thanks
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_1">
<display-name>PDMPortal</display-name>
<session-config id="SessionConfig_1">
<session-timeout>60</session-timeout>
</session-config>
<mime-mapping id="MimeMapping_1">
<extension>htc</extension>
<mime-type>text/x-component</mime-type>
</mime-mapping>
<welcome-file-list id="WelcomeFileList_1">
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet>
<servlet-name>HelloWorldExample</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>HelloWorld</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>HelloWorldExample</url-pattern>
</servlet-mapping>
</web-app>Try putting your servlets in the WEB-INF\classes directory.
-
How to setup web.xml files in Tomcat 4.0.6
Hi, I'm to new to Java Servlets. i am trying to run my first servlet but it's not showing up..can anyone help me out please!!!
I created a folders like this:
webapps/sumitapps/WEB-INF\classes\Forms\login.class
under sumitapps: i'm puttin all of my .html files(Logins.html)
under WEB-INF: i put web.xml file and classes folder
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>Forms.login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/Forms.login</url-pattern>
</servlet-mapping>
</web-app>
<Context path="/sumitapps" docBase="webapps/sumitapps" crossContext="true" debug="0" reloadable="true" trusted="false" >
</Context>
under my classes folder i put folder Forms where i'm keeping all of my .class files. my class file name is login.class
can anyone tell me why i cant run my servlets
<FORM method="POST" action="Forms.login"
name=userinfo onsubmit="return checkData()">
please help me out here
i can access my html page like this:
http://lcoalhost:8080/sumitapps/Logins.html
but when i enter userid and password it doesnt show anything..it takes me to http://localhost:8080/sumitapps/Forms.login
and shows cannot be displayedhave a look at www.moreservlets.com. There you can find a free pdf (part of the book, a whole chapter) that explains in deep the use of web.xml.
-
Does anyone have a good server.xml file for tomcat?
I am trying to link apache and tomcat on a RedHat 9 computer. I previously posted a message stating that I could not get tomcat to "automagically" make the configuration files (mod_jk.conf-auto) that all the manuals promised it would. However, I found that my problem was the lack of an ApacheConfig tag in the server.xml file. After looking at my server.xml file, I found that it was much more simplistic than I would hoped = it did not have enough comments or commented out options. It had none of the directives that the manuals said it included by default.
In short, does anyone who has apache and tomcat linked have a server.xml file that I can look at so that I can figure out what I must add to mine to get tomcat working with apache? I would greatly appreciate it if you could copy and paste the whole thing here.
Thank you very much in advance.
Edward S. RiceHi!
I am having the Apache-Tomcat4.0 version installed on a Win2000 machine. I am pasting here my server.xml. Hope it will be useful to you. I even didnot do much modifications to my server.xml except for adding a context.
Please come back if problem persists.
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Tomcat-Standalone">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 4.0 documentation bundle for more detailed
instructions):
* Download and install JSSE 1.0.2 or later, and put the JAR files
into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value
to -1 -->
<!-- Define an SSL HTTP/1.1 Connector on port 8443 -->
<!--
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0" scheme="https" secure="true">
<Factory className="org.apache.catalina.net.SSLServerSocketFactory"
clientAuth="false" protocol="TLS"/>
</Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
-->
<!-- Define a Proxied HTTP/1.1 Connector on port 8081 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8081" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0" connectionTimeout="60000"
proxyPort="80"/>
-->
<!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -->
<!--
<Connector className="org.apache.catalina.connector.http10.HttpConnector"
port="8082" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0"/>
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Standalone" defaultHost="localhost" debug="0">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.3
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<!-- Because this Realm is here, an instance will be shared globally -->
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority?user=test;password=test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL?user=scott;password=tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across all web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common"/>
<!-- Logger shared by all Contexts related to this virtual host. By
default (when using FileLogger), log files are created in the "logs"
directory relative to $CATALINA_HOME. If you wish, you can specify
a different directory with the "directory" attribute. Specify either a
relative (to $CATALINA_HOME) or absolute path to the desired
directory.-->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<!-- Define properties for each web application. This is only needed
if you want to set non-default properties, or have web application
document roots in places other than the virtual host's appBase
directory. -->
<!-- Tomcat Root Context -->
<!--
<Context path="" docBase="ROOT" debug="0"/>
-->
<Context path="/vijay" docBase="D:\Java\servlets" debug="0"/>
<!-- Tomcat Manager Context -->
<Context path="/manager" docBase="manager"
debug="0" privileged="true"/>
<!-- Tomcat Examples Context -->
<Context path="/examples" docBase="examples" debug="0"
reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_examples_log." suffix=".txt"
timestamp="true"/>
<Ejb name="ejb/EmplRecord" type="Entity"
home="com.wombat.empl.EmployeeRecordHome"
remote="com.wombat.empl.EmployeeRecord"/>
<!-- PersistentManager: Uncomment the section below to test Persistent
Sessions.
saveOnRestart: If true, all active sessions will be saved
to the Store when Catalina is shutdown, regardless of
other settings. All Sessions found in the Store will be
loaded on startup. Sessions past their expiration are
ignored in both cases.
maxActiveSessions: If 0 or greater, having too many active
sessions will result in some being swapped out. minIdleSwap
limits this. -1 means unlimited sessions are allowed.
0 means sessions will almost always be swapped out after
use - this will be noticeably slow for your users.
minIdleSwap: Sessions must be idle for at least this long
(in seconds) before they will be swapped out due to
maxActiveSessions. This avoids thrashing when the site is
highly active. -1 or 0 means there is no minimum - sessions
can be swapped out at any time.
maxIdleSwap: Sessions will be swapped out if idle for this
long (in seconds). If minIdleSwap is higher, then it will
override this. This isn't exact: it is checked periodically.
-1 means sessions won't be swapped out for this reason,
although they may be swapped out for maxActiveSessions.
If set to >= 0, guarantees that all sessions found in the
Store will be loaded on startup.
maxIdleBackup: Sessions will be backed up (saved to the Store,
but left in active memory) if idle for this long (in seconds),
and all sessions found in the Store will be loaded on startup.
If set to -1 sessions will not be backed up, 0 means they
should be backed up shortly after being used.
To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
and minIdleBackup all to -1, saveOnRestart to false, then restart
Catalina.
-->
<!--
<Manager className="org.apache.catalina.session.PersistentManager"
debug="0"
saveOnRestart="true"
maxActiveSessions="-1"
minIdleSwap="-1"
maxIdleSwap="-1"
maxIdleBackup="-1">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
-->
<Environment name="maxExemptions" type="java.lang.Integer"
value="15"/>
<Parameter name="context.param.name" value="context.param.value"
override="false"/>
<Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/EmployeeAppDb">
<parameter><name>user</name><value>sa</value></parameter>
<parameter><name>password</name><value></value></parameter>
<parameter><name>driverClassName</name>
<value>org.hsql.jdbcDriver</value></parameter>
<parameter><name>driverName</name>
<value>jdbc:HypersonicSQL:database</value></parameter>
</ResourceParams>
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
</Context>
</Host>
</Engine>
</Service>
<!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
as its servlet container. Please read the README.txt file coming with
the WebApp Module distribution on how to build it.
(Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
To configure the Apache side, you must ensure that you have the
"ServerName" and "Port" directives defined in "httpd.conf". Then,
lines like these to the bottom of your "httpd.conf" file:
LoadModule webapp_module libexec/mod_webapp.so
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
The next time you restart Apache (after restarting Tomcat, if needed)
the connection will be established, and all applications you make
visible via "WebAppDeploy" directives can be accessed through Apache.
-->
<!-- Define an Apache-Connector Service -->
<Service name="Tomcat-Apache">
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0"/>
<!-- Replace "localhost" with what your Apache "ServerName" is set to -->
<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache" debug="0" appBase="webapps">
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="apache_log." suffix=".txt"
timestamp="true"/>
<!-- Because this Realm is here, an instance will be shared globally -->
<Realm className="org.apache.catalina.realm.MemoryRealm" />
</Engine>
</Service>
</Server> -
Where to save web.xml file in apache jserv with servlet 2.0
hi,
we are using apache jserv which included servlet 2.0 we are able to run .class files and
jsp files,but we are using web.xml file for connection pooling which we were used in tomcat
but we are unable to find web-inf folder in apache/jserv to save the file.
please help me out in this problem,
please guide us is there any other method of connection pooling apache jserv,we are using backend
as oracle9i
i will be greatfull to u in this regards
laiqHi,
Just create WEB-INF folder and copy the web.xml.
good luck !
...san :-) -
Help on web.xml file, what if the parameters contains key words ?
Hi:
I am just wondering what should I do if I want to include key words suchs
as <param> in web.xml file for a servlet config.
Example:
<servlet>
<servlet-name>testServlet</servlet-name>
<parameter>
<param-name>some name</param-name>
<param-value>some value</param-value>
</parameter>
</servlet>
What should I do if I want to repleace 'some value' with '</param-value>some
value' and still to prevent the engine to terminate parsing the param-value
at the fake ending? Is there a standard way in XML to distanguish that?
(in URL format it can be replaced %xx for some chars).
ie,
<param-value> </param-value>some value</param-value>
where the second </param-value> is the real ending.
Thank you!
GangHi!
You can use "& lt ;" and "& gt ;" xml entities for that. Or wrap text element in <![CDATA[...]]> section.
Regards,
Ignat. -
How to deploy the web.xml file when trying to use the JSP SDK from SAP?
I want to use the adduser.jsp which downloaded form SAP SDK samples to add user in BO, but I cannot run it sucessfully. I believe it's caused the web.xml file was not deployed appropriately.
could you please teach how to deploy the web.xml file for the JSP samples ?
Could you show me some sample of web.xml for the SDK jsp files? Thank you very much!Ensure that you have followed below directory structure while deploying your web application.
web_application_name
WEB-INF
lib
classes
web.xml must be placed in WEB-INF. Ensure that you have included all the jar files and other necessary files in your application.
For more information refer to the below link:
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
Regards,
Anuj -
Web.xml file problem in tomcat
Hi i need help in this... its urgent
currently i just subscribe to a web hosting site and i need to start the private tomcat in the web server..
The followings are the instructions and i have follow them but i do not know how to create a web.xml file to store in the folder indicated for example a HelloServlet that im testing :
To setup servlet, you need to configure servlet into the file web.xml which needs to be placed in /var/www/html/WEB-INF directory.
www root directory or webapps:/var/www/htm
Classes directory located in: /var/www/html/WEB-INF/Classes/
There you will need to upload your Java class file.
Our default url-mapping for servlet is: /servlet/*
To check servlet in your browser: www.mydomain.net/servlet/HelloWorld
Jsp Files - Upload anywhere in /var/www/html
all the above steps are follow except the web.xml file which i suppose to write and store in the folder... but i actually try to write one but i still cannot load my servlet on the webpage... test on standalone tomcat works.
pls help its urgent!!!first sorry about cross posting the subject. i didnt know i am not suppose to do that. i post in a few forums that are related to my topic. sorry
The tomcat on the web server is of version Private J2EE / Tomcat 4.1.29 and the standalone tomcat i am using is also tomcat 4.1
the web.xml in my standalone server in root/web-inf/ is as follows and it is configure for authentication purposes. It works together with the tomcat-users.xml located on conf directory
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<security-constraint>
<web-resource-collection>
<web-resource-name>
Restricted Area
</web-resource-name>
<url-pattern>/secure/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/Login.html</form-login-page>
<form-error-page>/Error.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>The Secure ROLE</description>
<role-name>manager</role-name>
<role-name>tomcat</role-name>
</security-role>
<security-constraint>
<web-resource-collection>
<web-resource-name>
Restricted Area
</web-resource-name>
<url-pattern>/Customer/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>customer</role-name>
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/Login.html</form-login-page>
<form-error-page>/Error.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>The Secure ROLE</description>
<role-name>customer</role-name>
<role-name>tomcat</role-name>
</security-role>
</web-app>
using this web.xml, my stanalone web pages works fine for all servlets and jsp. however if i copy this over to the web server, i still cannot load my servlets and jsp. moreover it doesnt work for authentication purpose anymore. i don't know why too
i have try the codes you write before and it also doesnt work
the problem is i cannot get the support form the web hosting site. This is the link that suppose to teach me but it doesn not tell me how to configure my web.xml
https://www.eroute.net/JSPSupport.htm -
Help in creation of XML file for IDOC postings
Hi All,
Need help if anyone has knowledge/experience in creating XML files for IDOC processing.
We need to design an input file (in XML format) for creation of IDOCu2019s for purchase Invoices through Interface.
We have an existing input file, which is working correctly. We are trying to modify this existing input file for a new Tax Code (Non-deductible inverse tax liability). This tax code is working fine for manual postings. But, through IDOC, tax postings are not correctly triggering.
Could you please confirm if any one has experience on this, so that I can share more details for resolving.
Thanks & Regards,
SriniHello,
you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
Regards Otto -
URL Mapping for packaged JSP's in web.xml file
Hi,
I am using weblogic6.0sp2 enterprise edition.I have my JSP's in package structure.
Suppose my login.jsp is in package com.advice.document. So for URL mapping in
web.xml what should be given so that by giving that my JSP runs. I have tried
many options but not got success.
Here is my web.xml file..
<web-app>
<servlet>
<servlet-name> Login </servlet-name>
<jsp-file> com\advice\document\login.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name> Login </servlet-name>
<url-pattern> /Login</url-pattern>
</servlet-mapping>
</web-app>
If any body knows or have worked on the same then let me know.
Thanks in advance.
--- Vipul
Did you try specifying the jsp-file with forward slashes (e.g.,
com/advice/document/login.jsp)?
Vipul Garg wrote:
> Hi,
> I am using weblogic6.0sp2 enterprise edition.I have my JSP's in package structure.
> Suppose my login.jsp is in package com.advice.document. So for URL mapping in
> web.xml what should be given so that by giving that my JSP runs. I have tried
> many options but not got success.
> Here is my web.xml file..
> <web-app>
> <servlet>
> <servlet-name> Login </servlet-name>
> <jsp-file> com\advice\document\login.jsp</jsp-file>
> </servlet>
> <servlet-mapping>
> <servlet-name> Login </servlet-name>
> <url-pattern> /Login</url-pattern>
> </servlet-mapping>
> </web-app>
>
> If any body knows or have worked on the same then let me know.
> Thanks in advance.
> --- Vipul
-
Reload web-inf/web.xml file without restarting tomcat
Please help me if any one have a solution .
I am doing development in jsp, servlet. I am using tomcat5 as a webserver.
i want to reload web-inf/web.xml file without restarting tomcat.From the tomcat admin page you can stop/start and refresh individual applications. See the tomcat documentation. Which, when you have a question about tomcat, you should always do first.
-
How to get Context paramters out of Tomcat web.xml file
The Documentation at Tomcat seems to suggest:
Context initialization parameters that define shared
String constants used within your application, which
can be customized by the system administrator who is
installing your application. The values actually
assigned to these parameters can be retrieved in a
servlet or JSP page by calling:
String value =
getServletContext().getInitParameter("name");
Now I want to write a jsp, where the user enters his username and pwd, and this contacts a jdbc connection bean. I want to store the driver name in the web.xml file. Now can some1 please suggest a method as to how I can extract this (It ain't that straightforward as suggested in tomcat doumntation. You cannnot call the above method ithout Servlet Initialization (actually to say ithout HTTP Connection). I succeeded when I had written a servlet, but can some1 please suggest an alternative (bcoz othrwise just to extract that I am writing a servlet).
Hope I am clear.
Thanks in advance.Edit your web.xml file and add these entries,
<context-param>
<param-name>dbUrl</param-name>
<param-value>jdbc:oracle:thin:@server5:1521:pl2java</param-value>
</context-param>
<context-param>
<param-name>dbDriver</param-name>
<param-value>oracle.jdbc.driver.OracleDriver</param-value>
</context-param>
Place the above entries in between your already existing <web-app> and </web-app> tags.
Now in your jsp, you can use, <% application.getInitParameter(); %> and in servlet, getServletContext().getInitParameter();
Hope this helps.
Sudha
Maybe you are looking for
-
Financial document not getting updated
Hi, In export sale, I am using a financial document in the order. I have done invoices for the order. But when I see the financial document open value in VX12N, it is showing as 100% open value. the invoice value is 10,000 USD. the financial document
-
Changing the Computer name with ARD
Hello, I am new to mac but I am now in charge of running a mac network or machines for an art department. I see that with ARD you cna change the computer name. If you change the computer name does it just change anything on the client machine? I just
-
How do I create a dashed line growing longer?
Hi all, I want to create a dashed line that grows longer. I made two keyframes (at frame 1 and frame 15) with dashed lines of different lengths. Motion or Classic Tween just makes the small line move to the right and then turn into the long line imme
-
Scroll bar moved layout slightly to left
If content on ALL of my site either did or didn't require a scroll bar, the transitions when clicking from page to page would all look smooth. Unfortunately I have some pages that are short (and so the browser displays no display bar) and other pages
-
Data services job failes while insert data into SQL server from Linux
SAP data services (data quality) server is running on LInux server and Windows. Data services jobs which uses the ODBC driver to connect to SQL server is failing after selecting few thousand records with following reason as per data services log on L