cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the application alias for a web project in NW7.2

Former Member
0 Kudos

Hi,

a simple question, but I could not manage to solve it: How do I change the application alias (the url) of a web project? I'm using Netweaver 7.2 and all the tutorials I found refer to earlier versions and do not work anymore.

In particular, I would like to change e.g. "server.com/vendor~webbappname" (the standard url of the web project) to "server.com/mywebapp".

Thanks in advance for your help!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try customizing the <context-root> element in the web.xml deployment descriptor, for example:

<?xml version="1.0" encoding="ASCII"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
		http://java.sun.com/xml/ns/javaee/application_5.xsd"
	      version="5">
	      <display-name>YourWebApp</display-name>
	      <module>
			<web>
			<web-uri>YourWebApp.war</web-uri>
			<context-root>mywebapp</context-root>
		</web>
	</module>
	<module>
		<ejb>YourWebAppEjb.jar</ejb>
	</module>
</application>

Afterwards, rebuild and redeploy your application.

I hope that helps.

Regards,

Yordan

Former Member
0 Kudos

Thanks for your reply, Yordan! Unfortunately, my web.xml looks quite different since I'm (now) using a WebDynpro DC for this project instead of a normal web DC:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"/>

So it's not an "application" anymore, but an "web-app" with a different schema definition. Any ideas about how I have to change this type of configuration?

Former Member
0 Kudos

Go to NWA -> Configuration Management -> Infrastructure -> Java HTTP Provider Configuration -> Alias -> Add

Here you can define an alias for your application.

Example:

name: myapp

path: D:/usr/sap/<SYSID>/J00/j2ee/cluster/apps/<apppath>/<myapp_name>

Best regards,

Kevin

Former Member
0 Kudos

Thanks for your reply! But your solution seems to be restricted to static or jsp web pages. Since I'm using a WebDynpro app, I cannot point the HTTP alias to a location in the file system, can I?

I tried several paths for the alias, but I always get a "directory listing not allowed" error. I also tried to add the application component name to the shortcut url, like host/shortcut/AppName, but this doesn't work either.

Is there a possibility to define an alias without a pointer to the file system, but containing directly the url to which the alias should be forwarded?

Former Member
0 Kudos

Yes, I think it is just for static web sites. I don't know how to define an alias in case of a web dynpro application. You could create a web site which redirects to the web dynpro or display the application in an iFrame within a static html.

Best regards,

Kevin

0 Kudos

Hi,

Please try by editing the Webdispatcher Profile.

[/people/shantanu.garg/blog/2009/03/17/custom-aliases-with-sap-web-dispatcher|/people/shantanu.garg/blog/2009/03/17/custom-aliases-with-sap-web-dispatcher]

Regards,

Aditya

Former Member
0 Kudos

Any solution yet to this question?

Best regards,

Kevin