Solved

Hiding url of the address

Posted on 2004-08-17
6
8,650 Views
Last Modified: 2013-12-10
Hello,
Let me first explain the problem. Lets say I have http://www.mysite.com/dir1/mypage1.jsp and i clicked some link in this page navigates to http://www.mysite.com/dir1/mypage2.jsp but in the browser, I wanted to display only http://www.mysite.com/dir1/ and I wanted to hide the jsp page name in the address bar.

I am using weblogic 8.1. Any help would be great.

Uma
0
Comment
Question by:umajava
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 11827273
Hi,

To do this you need to setup the JSP page URL under configuration file.

Use the virtual-directory-mapping element to specify document roots other than the default document root of the Web application for certain kinds of requests, such as image requests. All images for a set of Web applications can be stored in a single location, and need not be copied to the document root of each Web application that uses them. For an incoming request, if a virtual directory has been specified servlet container will search for the requested resource first in the virtual directory and then in the Web application's original document root. This defines the precedence if the same document exists in both places.

Example:

<virtual-directory-mapping>
     <local-path>c:/usr/gifs</local-path>
     <url-pattern>/images/*</url-pattern>
     <url-pattern>*.jpg</url-pattern>
</virtual-directory-mapping>
<virtual-directory-mapping>
     <local-path>c:/usr/common_jsps.jar</local-path>
     <url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>

for more info refer to http://e-docs.bea.com/wls/docs81/webapp/weblogic_xml.html

R.K
0
 

Author Comment

by:umajava
ID: 11827706
Hi,
I tried the way you mentioned. But I do not have a .jar file instead  I have directed it to the folder where my files are located.

Is there any other way that I can do this?

Uma
0
 

Author Comment

by:umajava
ID: 11929378
push
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

Author Comment

by:umajava
ID: 11929666
Hello,
My weblogic.xml file is configured this way. Please let me know if I have done some wrong any where.

  <virtual-directory-mapping>
    <local-path>D:/iw_webdata/www/www_corporate</local-path>
      <url-pattern>/</url-pattern>
      <url-pattern>*.jsp</url-pattern>      
  </virtual-directory-mapping>

I do not want to display the full url. e.g http://localhost:7001/test/index.jsp I wanted to display only http://localhost:7001/test/ and hide the jsp name.

I tried all possible combinations, e.g removing <url-pattern>/</url-pattern> and adding only <url-pattern>*.jsp</url-pattern> but nothing is working.

Any helps would be great.

Uma
0
 
LVL 5

Accepted Solution

by:
Becky earned 20 total points
ID: 12069060
Make index.jsp your welcome file for that web application in its web.xml file:

      <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>

Don't forget to redeploy the application after doing this.

I have a website that's similar, and when I type http://domainName/webappName/  the index.jsp does not appear (unless you type it in explicitly, of course)

-B
 
0
 

Author Comment

by:umajava
ID: 12099594
I got it to work. Thanks

Uma
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question