473,765 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

url mapping

Hi there,

In web.xml, I know it's possible to do path mapping:

<path-mapping url-pattern="/aaa/*" real-path="C:\TEMP\"/>

So a call to myserver.com/mywebapp/aaa will redirect to c:\temp.

Is it possible to do the same but with a URL?

e.g.:
<kind-of-url-mapping url-pattern="/bbb/*" real-url="http://www.google.com" />

Thanks!

Frank
Jul 17 '05 #1
2 5549
Frank wrote:
In web.xml, I know it's possible to do path mapping:

<path-mapping url-pattern="/aaa/*" real-path="C:\TEMP\"/>
I think you are mistaken. This tag is not part of the DTD for the Servlet
x.y deployment descriptor, at least not up until version 2.3. See for
yourself: <http://java.sun.com/dtd/web-app_2_3.dtd>
Is it possible to do the same but with a URL?

e.g.:
<kind-of-url-mapping url-pattern="/bbb/*" real-url="http://www.google.com"
/>


Here is one way of doing it:

(1) Create a servlet that will redirect incoming requests to
<http://www.google.com> .

(2) Define a servlet mapping in web.xml which maps "/bbb/*" to the servlet
you just created.

--
Jonas Kongslund
Jul 17 '05 #2
Your right, path mapping is not part of actual DTD. Actually it's a
node added by Resin container.

I will write a servlet unless there is no possible configuration.

Thank you Jonas.
Jonas Kongslund <do**@mail.me.a t.all> wrote in message news:<Mb******* *********@news. get2net.dk>...
Frank wrote:
In web.xml, I know it's possible to do path mapping:

<path-mapping url-pattern="/aaa/*" real-path="C:\TEMP\"/>


I think you are mistaken. This tag is not part of the DTD for the Servlet
x.y deployment descriptor, at least not up until version 2.3. See for
yourself: <http://java.sun.com/dtd/web-app_2_3.dtd>
Is it possible to do the same but with a URL?

e.g.:
<kind-of-url-mapping url-pattern="/bbb/*" real-url="http://www.google.com"
/>


Here is one way of doing it:

(1) Create a servlet that will redirect incoming requests to
<http://www.google.com> .

(2) Define a servlet mapping in web.xml which maps "/bbb/*" to the servlet
you just created.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
3303
by: Pierre Fortin | last post by:
Hi! "Python Essential Reference" - 2nd Ed, on P. 47 states that a string format can include "*" for a field width (no restrictions noted); yet... >>> "%*d" % (6,2) # works as expected ' 2' Now, with a mapping....
6
6542
by: naruto | last post by:
Hi all, I have the following being defined in a A.cxx file. // define in source file. Not exported to the outside world (this cannot be // moved to the header file ) #define CHANNEL_0 0 #define CHANNEL_1 1 #define CHANNEL_2 2
10
2045
by: mike | last post by:
regards: Where to find tag mapping-table of HTML translated to XHTML1.0 Any positive suggestion is welcome. thank you May goodness be with you all
1
2682
by: Tamas Hegedus | last post by:
Hi! I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. Similar to the solution of Dave Kuhlman (http://www.rexx.com/~dkuhlman/generateDS.html) where the mapping is defined in an xml file (if I am understand well).
3
1627
by: Elder Hyde | last post by:
I was reading this interview with Hejlsberg, when suddenly the conversation turned to O/R mapping. Hejlsberg talked as if he had had to design an O/R mapping for .NET (he said ".NET had each one of those"--"those" representing, among others, O/R mapping). Probably I'm missing something really obvious, but a google search only gave me commercial O/R mapping tool! Is there any free O/R mapping tool that comes with .NET? Elder
4
3093
by: BentleyInc | last post by:
I'm trying to find a way to add a whildcard application mapping to aspnet_isapi.dll in IIS programmatically.... been looking into IIS administrator reference but didn't find the right function to use. The equivalent GUI steps would be, open IIS, select my application->properties, app configuration, in whildcard application mapping type the path to aspnet_isapi.dll. Thanks, Jingmei Li
1
1716
by: none | last post by:
Hi, I'm trying to establish table mappings, and I've hit a snag. At the point to where I try to fill the schema (DB_adapter.FillSchema), I get an exception, and the message is as follows: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Invalid column name 'Unique_ref'. Invalid column name 'ID_string'. Invalid column name 'Sequence'.
1
2562
by: Ram | last post by:
Hey, I'm having a trouble mapping a connecting between 2 of my tables. We have 2 tables - the simplest "dept", "emp" tables which are mapped to 2 classes. Class Dept contains 2 properties for emps - 1 for manager and the second for workers (Collection). How can I map this? We can add additional fields in the emp table that indicates the property in the depts?
6
3094
by: Jan Kucera | last post by:
Hi, does anybody know about wildcard mapping ASP.NET 2 in IIS6? Any tutorial? Thanks, Jan
0
2624
by: edurazee | last post by:
I am trying to create a Unidirectional one-to-one relationship using NHibernate. Example: An Order is given by a Customer. Customer{ID, Name, Address} OrderN{ID, Customer, OrderDate} Here, OrderN.Customer-field is intended to store Customer.ID as an FK. And this field doesn't have any unique constraint. (The OrderN-table is given such a name to avoid SQL keyword conflict.)
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.