Several paths with the virtual-directory-mapping in weblogic.xml
Hello! I don´t know if this is well posted here. Sorry, and my english is aswful :(.
I´m trying to put several paths for jsp files in an application, similar to how the extendend document root works in websphere.
How can I get this on weblogic? With this lines I only managed to get the first but the second url-pattern doesn´t work.
<weblogic-web-app>
<virtual-directory-mapping>
<local-path>/path1/</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
<virtual-directory-mapping>
<local-path>/path2</local-path>
<url-pattern>/jsp/*.jsp</url-pattern>
</virtual-directory-mapping>
</weblogic-web-app>
My intention is make that the app could access to jsp´s files in path1 and in path2. Is this possible on weblogic?
Thanks in advance
I see. In my case, x == images, so if I reverse my directory
structure I could still get this to work for me. For instance:
<virtual-directory-mapping>
<local-path>C:\webapps\context\y</local-path>
<url-pattern>/images/*</url-pattern>
</virtual-directory-mapping>
/images/z.gif would map to C:\webapps\context\y\images\z.gif.
I'll have to weigh changing our directory structure vs. keeping the
servlet we have that rewrites the URL.
Thanks for your help.
Scott Steimle.
Rajesh Mirchandani <[email protected]> wrote in message news:<[email protected]>...
From the developer
Virtual directories just replace the doc root. The doc root in your case
is C:\webapps\context\x\y. The request uri is /images/Z.gif. So the whole
thing resolves to C:\webapps\context\x\y\images\Z.gif. Which is where the
image should be located.
We have cleared up the docs. Sorry for any inconvenience.
Scott Steimle wrote:
Hi. I noticed in WebLogic Platform 7.0 there is a entry for
WEB-INF/weblogic.xml that defines a virtual directory. Example:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<virtual-directory-mapping>
<local-path>C:\webapps\context\x\y</local-path>
<url-pattern>/images/*</url-pattern>
</virtual-directory-mapping>
</weblogic-web-app>
In this case I'm assuming that a request of the form
http:/host:7001/context/images/z.gif would map to the physical file
C:\webapps\context\x\y\z.gif. However I cannot get this to work. Is
my assumption about it's use incorrect? Is the syntax of
<local-path/> or <url-pattern/> wrong? Is there something you have to
do to get WebLogic to recognize the weblogin.xml file?
This is urgent. Please help.
Thanks.
Scott Steimle
Software Engineer
Convera
Similar Messages
-
Virtual directory mapping in weblogic 7.0
I'm trying to define a virtual mapping in my web application deployed in Weblogic
7.0 sp2 and it's not working.
I've defined in my weblogic.xml
<virtual-directory-mapping>
<local-path>c:/cursoBEA/imagenes</local-path>
<url-pattern>/imagenes/*</url-pattern>
<url-pattern>*.gif</url-pattern>
</virtual-directory-mapping>
But when I try to access my images like this:
<img src="/mywebapp/imagenes/image.gif">
it cannot show that image.
We've tried many combinations, but all failed. What are we doing wrong?I'm doing the same as you, and it does not work. I'm using weblogic 7.0 sp2 in
a Windows 2000 Proffesional. Maybe it's a problem with weblogic/OS version?
Ignacio Sanchez
"Mark Griffith" <[email protected]> wrote:
You can look at 8.1 Medrec example
On my install it lives here:
c:/bea/wls81/weblogic81/samples/server/medrec/src/physicianEar/physicianWebA
pp/WEB-INF/weblogic.xml
Virtual Directory is used as follows:
<virtual-directory-mapping>
<local-path>C:/bea/wls81/weblogic81/samples/server/medrec/src/common/web</lo
cal-path>
<url-pattern>images/*</url-pattern>
</virtual-directory-mapping>
ls of C:/bea/wls81/weblogic81/samples/server/medrec/src/common/web
total 3
drwxrwxrwx 1 Everyone Everyone 0 Apr 6 14:43 .
drwxrwxrwx 1 Everyone Everyone 0 Apr 6 14:43 ..
-rwxrwxrwa 1 Everyone Everyone 1378 Apr 6 14:43
build.xml
drwxrwxrwx 1 Everyone Everyone 0 Apr 6 14:43 com
drwxrwxrwx 1 Everyone Everyone 0 Apr 6 14:43 images
URL's in a web-app's index.jsp that is in the root of the webapp are
like:
<TD align=right><IMG SRC='images/logo.gif'></TD>
Looks like you need to modify your local-path to not include imagenes
Cheers
mbg
"Ignacio Sanchez" <[email protected]> wrote in message
news:3ec20fff$[email protected]..
I'm trying to define a virtual mapping in my web application deployedin
Weblogic
7.0 sp2 and it's not working.
I've defined in my weblogic.xml
<virtual-directory-mapping>
<local-path>c:/cursoBEA/imagenes</local-path>
<url-pattern>/imagenes/*</url-pattern>
<url-pattern>*.gif</url-pattern>
</virtual-directory-mapping>
But when I try to access my images like this:
<img src="/mywebapp/imagenes/image.gif">
it cannot show that image.
We've tried many combinations, but all failed. What are we doing wrong? -
Virtual directory mapping in weblogic platform 7.0
Hi. I noticed in WebLogic Platform 7.0 there is a entry for
WEB-INF/weblogic.xml that defines a virtual directory. Example:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<virtual-directory-mapping>
<local-path>C:\webapps\context\x\y</local-path>
<url-pattern>/images/*</url-pattern>
</virtual-directory-mapping>
</weblogic-web-app>
In this case I'm assuming that a request of the form
http:/host:7001/context/images/z.gif would map to the physical file
C:\webapps\context\x\y\z.gif. However I cannot get this to work. Is
my assumption about it's use incorrect? Is the syntax of
<local-path/> or <url-pattern/> wrong? Is there something you have to
do to get WebLogic to recognize the weblogin.xml file?
This is urgent. Please help.
Thanks.
Scott Steimle
Software Engineer
ConveraI see. In my case, x == images, so if I reverse my directory
structure I could still get this to work for me. For instance:
<virtual-directory-mapping>
<local-path>C:\webapps\context\y</local-path>
<url-pattern>/images/*</url-pattern>
</virtual-directory-mapping>
/images/z.gif would map to C:\webapps\context\y\images\z.gif.
I'll have to weigh changing our directory structure vs. keeping the
servlet we have that rewrites the URL.
Thanks for your help.
Scott Steimle.
Rajesh Mirchandani <[email protected]> wrote in message news:<[email protected]>...
From the developer
Virtual directories just replace the doc root. The doc root in your case
is C:\webapps\context\x\y. The request uri is /images/Z.gif. So the whole
thing resolves to C:\webapps\context\x\y\images\Z.gif. Which is where the
image should be located.
We have cleared up the docs. Sorry for any inconvenience.
Scott Steimle wrote:
Hi. I noticed in WebLogic Platform 7.0 there is a entry for
WEB-INF/weblogic.xml that defines a virtual directory. Example:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web
Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<virtual-directory-mapping>
<local-path>C:\webapps\context\x\y</local-path>
<url-pattern>/images/*</url-pattern>
</virtual-directory-mapping>
</weblogic-web-app>
In this case I'm assuming that a request of the form
http:/host:7001/context/images/z.gif would map to the physical file
C:\webapps\context\x\y\z.gif. However I cannot get this to work. Is
my assumption about it's use incorrect? Is the syntax of
<local-path/> or <url-pattern/> wrong? Is there something you have to
do to get WebLogic to recognize the weblogin.xml file?
This is urgent. Please help.
Thanks.
Scott Steimle
Software Engineer
Convera -
Using deployment plan to change virtual directory mapping
Hi all,
Have anyone tried this before?
I have a deployment plan to add virtual directory to my weblogic descriptors as follow:
Inside <variable-definitions> tag:
<variable>
<name>LocalPath</name>
<value>C:/</value>
</variable>
<variable>
<name>VirtualPath</name>
<value>/Temp/*</value>
</variable> Then in to add the virtual directory to weblogic.xml:
<module-descriptor external="false">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<variable-assignment>
<name>LocalPath</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/local-path</xpath>
</variable-assignment>
<variable-assignment>
<name>VirtualPath</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/url-pattern</xpath>
<operation>add</operation>
</variable-assignment>
</module-descriptor>But I have this error:
Error VALIDATION PROBLEMS WERE FOUND C:\Users\Napoleon\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\upload\ReviewApp\app\planplan.xml:0: problem: cvc-complex-type.2.4c: Expected element 'url-pattern@http://xmlns.oracle.com/weblogic/weblogic-web-app' before the end of the content in element virtual-directory-mapping@http://xmlns.oracle.com/weblogic/weblogic-web-app:<C:\Users\Napoleon\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\upload\ReviewApp\app\planplan.xml>
I also tried using the xpath for url-pattern as followed:
<xpath>/weblogic-web-app/virtual-directory-mapping/[local-path="C:/"]/url-pattern</xpath>
But I have the same error. The <url-patter> element is not added correctly to the virtual directory mapping tag.
It is supposed to work. Anyone has done this before ? or is this a bug of deployment plan.
Thank you very much.
Regards
K.Hi Jay,
I have looked at your link and modified my plan.xml accordingly ( the original plan is automatically generated by weblogic ). But I still get the same error. Could you have a look and tell me what's wrong?
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>app</application-name>
<variable-definition>
<variable>
<name>SessionDescriptor_timeoutSecs_12786382366650</name>
<value>3601</value>
</variable>
<variable>
<name>firstNode</name>
<value></value>
</variable>
<variable>
<name>LocalPath</name>
<value>C:\</value>
</variable>
<variable>
<name>VirtualPath</name>
<value>/Temp/*</value>
</variable>
</variable-definition>
<module-override>
<module-name>ReviewApp.ear</module-name>
<module-type>ear</module-type>
<module-descriptor external="false">
<root-element>weblogic-application</root-element>
<uri>META-INF/weblogic-application.xml</uri>
<variable-assignment>
<name>SessionDescriptor_timeoutSecs_12786382366650</name>
<xpath>/weblogic-application/session-descriptor/timeout-secs</xpath>
</variable-assignment>
</module-descriptor>
<module-descriptor external="false">
<root-element>application</root-element>
<uri>META-INF/application.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>wldf-resource</root-element>
<uri>META-INF/weblogic-diagnostics.xml</uri>
</module-descriptor>
</module-override>
<module-override>
<module-name>ReviewUI.war</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<variable-assignment>
<name>firstNode</name>
<xpath>/weblogic-web-app/virtual-directory-mapping</xpath>
<operation>add</operation>
</variable-assignment>
<variable-assignment>
<name>LocalPath</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/local-path</xpath>
<operation>add</operation>
</variable-assignment>
<variable-assignment>
<name>VirtualPath</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/[local-path="C:\"]/url-pattern</xpath>
<operation>add</operation>
</variable-assignment>
</module-descriptor>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
</module-descriptor>
</module-override>
<config-root>C:\Users\Napoleon\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\upload\ReviewApp\app\plan</config-root>
</deployment-plan> -
Virtual directory mapping: how to use variable in local-path element
Hi all
We are using a virtual-directory-mapping declaration in the deployment descriptor
for our web application to load jsp'a and other files from the file system.
This declaration looks like this:
<virtual-directory-mapping>
<local-path>c:/views/jsp</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
Here is my question:
Is there a possibility to use a variable in the local-path element? Something
like:
<virtual-directory-mapping>
<local-path>%PATH_TO_JSP%</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
If yes, how does it look like? My example above didn't work.
If no, is there another way to do that?
Thanks in advance
Regards
Iwanposting to servlets newsgroup
"Iwan Bussmann" <[email protected]> wrote in message
news:[email protected]..
>
Hi all
We are using a virtual-directory-mapping declaration in the deploymentdescriptor
for our web application to load jsp'a and other files from the filesystem.
This declaration looks like this:
<virtual-directory-mapping>
<local-path>c:/views/jsp</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
Here is my question:
Is there a possibility to use a variable in the local-path element?Something
like:
<virtual-directory-mapping>
<local-path>%PATH_TO_JSP%</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
If yes, how does it look like? My example above didn't work.
If no, is there another way to do that?
Thanks in advance
Regards
Iwan -
Adding virtual paths with the web listener....
Hi ,
I have installed the Forms6i Server on RedHat 4. After its installation the installer notifies that some entries should be added(some virtual paths with the web listener).
For example :
/forms60java for physical dir ocldev/forms60/java
/jinitiator for physical dir /orcldev/jinit/doc
e.t.c.
Can you please specify this file which should the above be added...????
Thanks...a lot
SimBecause of some relink errors ... i've tried to install it (Forms Server) on a WinXp machine....
Since i have not installed any other web server , i used the IIS and at least - i have not tested with a simple form- i have seen the test form provided by Oracle....(You know one form which notes: "Forms server successfully installed").
As regards, the doc ... it points out what you've written :
Apache and any other web server assuming that some specific virtual paths to be added.....
Note: I think that those 'relink errors' occur because some of the RedHat packages are missing...
Thanks...
Sim -
How can I use a relative path in a Virtual Directory tag?
That is probably a bit vague, so I will explain in more detail. We are using BEA
WL Portal 7.0 and our team is developing multiple portal applications. We have
a core set of portlets (consist of JSPs) that we need to reuse in multiple portals
(Web Apps), however from a version control perspective they need to reside in
one common location. So, the solution I came up with is to use a virtual directory
for the the common directory and add this to weblogic.xml for each web app. This
works fine. However, each developer has different directory names for their project...ClearCase
view names to be specific... plus we have integration views, QA views, etc...
so we can't have any "C:\mystuff\mydomain" absolute paths anywhere in the portal
configuration. Does anyone know of a way to use a relative path for a virtual
directory? I have tried various versions of ../../ for example to try to backup
and then recurse down to the directory, but this is not working. Any ideas?
By the way this is basially just a hack for development, when we package the WAR
for QA, Prod, etc... we copy needed files and there are no virtual directories.
In other words, I don't care how "creative" solution is :)
This is what I have right now, which I need to replace with a relative directory
name:
<virtual-directory-mapping>
<local-path>C:/Projects/TouchPoint_v1.0_Fix/tp_portal/bipiportals/beaApps/portalApp/tp-shared</local-path>
<url-pattern>*</url-pattern>
</virtual-directory-mapping>Well, in fact you can in a special case :
- The file you want to access is in the same directory than the applet (or in a sub-directory)
If this condition is OK, you can open the file using :
java.io.InputStream MyInputStream = <YourAppletClassName>.class.getResourceAsStream("sidira_interactif2.svg")
With this stream, its easy to read the file content. -
Virtual-directory-mapping + MS-Word MS-Excel
Hi,
I have created the following virtual-directory-mapping in my weblogic.xml
<virtual-directory-mapping>
<local-path>c:/zooi/temp</local-path>
<url-pattern>/excel/*</url-pattern>
<url-pattern>*.xls</url-pattern>
</virtual-directory-mapping>
Secondly I added the following mime-mapping to my web.xml
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
I tried to access an excel file, from my browser using the URL http://localhost:7001/MyWebApp/excel/Sample.xls
Although it finds the file, it doesn't launch my Excel application in the browser. Instead it displays the file like you would do a "type" operation on it from the command line.
If I copy the excel file into my webapp and then try to do the same (note that its not in the virtual-directory now) it nicely does start my excel application in the browser.
I have good reasons for wanting to use a virtual directory so I hope someone can help me finding the reason why it doesn't work in that case.
FYI, it doesn't work either with Word, but it DOES work when trying it with a PDF.
Tx,
Vincenthi,
i m having problem in using this virtual-directory-mapping
<virtual-directory-mapping>
<local-path>C:/bea/user_projects/test/report/ipt</local-path>
<url-pattern>/report/*</url-pattern>
<url-pattern>*.txt</url-pattern>
</virtual-directory-mapping>
I tried to access the text file, from my browser using the URL http://localhost:7001/test/report/Sample.txt
but page is not found.
Can you tell me what did i missed out?
thks...
:_| -
Hi!
I am trying to achieve virtual directory mapping but with no luck. I have a request like
"GET /app1/images/mypic.gif"
and I would like the server to look into
C:/pics (under /pics I do have /app1/images/mypic.gif)
so I tried both (plus some more)
<virtual-directory-mapping>
<local-path>C:/pics</local-path>
<url-pattern>/</url-pattern>
</virtual-directory-mapping>
and
<virtual-directory-mapping>
<local-path>C:/pics</local-path>
<url-pattern>*.gif</url-pattern>
</virtual-directory-mapping>
but it doesn't work, why?
Thanks,
IggyAnyone have any ideas?
-
Limit extensions other than one specified in virtual-directory-mapping
Hi,
I have a virtual directory mapping
<virtual-directory-mapping>
<local-path>D:/folder</local-path>
<url-pattern>/movies/*</url-pattern>
<url-pattern>*.mov</url-pattern>
</virtual-directory-mapping>
However, I can still access the files with other extensions, i.e., avi, jar, txt.... Is there anything wrong with my mapping or it is supposed to be so? if it is the later, what is the point of declaring the *.mov pattern?
Thank you very muchhi,
Actually i deleted all the files in work folder and deleted the context path in server.xml file which i had given yesterday.
Already in web.xml file inside the folder..ie., in "c:\myPath\myRootDir\WEB-INF\web.xml" file i gave welcome file name like as given below..
<welcome-file-list >
<welcome-file >index.html</welcome-file >
</welcome-file-list >
i created this welcome file entry even before creating context path in server.xml file..
Then i created again the context path in server.xml file like this
<Context path="/myVirtualApp"
docBase="C:/myPath/myRootDir"
crossContext="true"
debug="0"
reloadable="true"
trusted="false">
</Context>
i stopped and restarted the server....
Now itz working fine......Thanx a lot Sudha for your help.......
regards,
Manikandan -
Programmatically set virtual directory mapping at run time
Hi all
Do you know of anyway to do it.
I can't found MBean for weblogic descriptor.
ThanksHi Jay
I am on it. But I continue having validation problem:
VALIDATION PROBLEMS WERE FOUND C:\Users\Napoleon\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\upload\PictureApp\app\planplan.xml:0: problem: cvc-complex-type.2.4c: Expected element 'url-pattern@http://xmlns.oracle.com/weblogic/weblogic-web-app' before the end of the content in element virtual-directory-mapping@http://xmlns.oracle.com/weblogic/weblogic-web-app:<C:\Users\Napoleon\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\upload\PictureApp\app\planplan.xml>
this is my plan:
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>app</application-name>
<variable-definition>
<variable>
<name>SessionDescriptor_timeoutSecs_12698451432940</name>
<value>3602</value>
</variable>
<variable>
<name>SessionDescriptor_invilidationInterval</name>
<value>70</value>
</variable>
<variable>
<name>VirtualDirectory_diskD</name>
<value>/Pictures/*</value>
</variable>
<variable>
<name>Map</name>
<value></value>
</variable>
<variable>
<name>LocalPath_diskD</name>
<value>D:/Pictures</value>
</variable>
</variable-definition>
<module-override>
<module-name>PictureApp.ear</module-name>
<module-type>ear</module-type>
<module-descriptor external="false">
<root-element>weblogic-application</root-element>
<uri>META-INF/weblogic-application.xml</uri>
<variable-assignment>
<name>SessionDescriptor_timeoutSecs_12698451432940</name>
<xpath>/weblogic-application/session-descriptor/timeout-secs</xpath>
</variable-assignment>
<variable-assignment>
<name>SessionDescriptor_invilidationInterval</name>
<xpath>/weblogic-application/session-descriptor/invalidation-interval-secs</xpath>
</variable-assignment>
</module-descriptor>
<module-descriptor external="false">
<root-element>application</root-element>
<uri>META-INF/application.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>wldf-resource</root-element>
<uri>META-INF/weblogic-diagnostics.xml</uri>
</module-descriptor>
</module-override>
<module-override>
<module-name>Picture.war</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<variable-assignment>
<name>Map</name>
<xpath>/weblogic-web-app/virtual-directory-mapping</xpath>
<operation>add</operation>
</variable-assignment>
<variable-assignment>
<name>LocalPath_diskD</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/local-path</xpath>
<operation>add</operation>
</variable-assignment>
<variable-assignment>
<name>VirtualDirectory_diskD</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/[local-path="D:/Pictures"]/url-pattern</xpath>
<operation>add</operation>
</variable-assignment>
</module-descriptor>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
</module-descriptor>
</module-override>
<config-root>C:\Users\Napoleon\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\servers\DefaultServer\upload\PictureApp\app\plan</config-root>
</deployment-plan>
I have the url-pattern assigned already. Can you help me look at it.
And one more question: if I want to define multiple virtual directory mapping, how can it be done? as the link is only virtual-directory-mapping/ it needs something to distinguish between the different virtual directory mapping right? -
virtual-directory-mapping fails when loading JSPs in 8.1
I'm using portal 8.1 sp3 and trying to get my JSP includes to include JSPs from a virtual directory.
I can load HTML files from the working directory perfectly:
<jsp:include page="/myprods/myProd1.html" />
But whenever I try to load JSPs it fails:
<jsp:include page="/myprods/myProd1.jsp" />
Is this a known (bug) and expected behavior?
My weblogic.xml setting:
<virtual-directory-mapping>
<local-path>c:/wls-domains/portal_servers/testcontent</local-path>
<url-pattern>/myprods/*</url-pattern>
</virtual-directory-mapping>
And I have C:\wls-domains\portal_servers\testcontent\myprods which contains both myProd1.html and myProd1.jsp
Note I cannot put my JSP's pre-compiled class in the applications classpath, I'm expecting the jsp:include to resolve all this itself.
The error I get when trying to include the JSP is as follows:
Error opening /SamplePortlet/index2.jsp.
The source of this error is javax.servlet.ServletException: [HTTP:101249][ServletContext(id=3477358,name=myProject,context-path=/myProject)]: Servlet class jsp_servlet._myprods.__myprod1 for servlet /myprods/myProd1.jsp could not be loaded because the requested class was not found in the classpath C:\wls-domains\portal_servers\user_projects\applications\myApplication\.workshop\output\myProject\WEB-INF\classes;C:\wls-domains\portal_servers\user_projects\applications\myApplication\myProject\WEB-INF\classes;
[followed by loads more classpath values]
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:824) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:254) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:188) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:535) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:373) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
[followed by loads more stack trace]
Thanks in advance for any assistance
MartinHave you received any feedback to your question ??
We have recently upgraded from WLS 7.0 to WLS 9.1 and are experiencing the same unexpected behaviour. -
Virtual directory mapping in WebCenter Portal
Hi all,
In my portal, I want show an image from Webcenter Content and it like that:
<img src="http://localhost:16200/cs/groups/public/documents/document/b3ax/mdaw/~edisp/~export/TUYENNTLAPTOP1000031~1~TUYENNTLAPTOP1000032/31.jpg" id="img1">But I don't want to show the domain of my Content Server is +"http://localhost:16200"+ on my portal when end user click view page source in the Web brower.
Can I hide the +"http://localhost:16200"+ and the image still show on my portal?
ThanksAS84 wrote:
Hi all,
In my portal, I want show an image from Webcenter Content and it like that:
<img src="http://localhost:16200/cs/groups/public/documents/document/b3ax/mdaw/~edisp/~export/TUYENNTLAPTOP1000031~1~TUYENNTLAPTOP1000032/31.jpg" id="img1">
But I don't want to show the domain of my Content Server is +"http://localhost:16200"+ on my portal when end user click view page source in the Web brower.
Can I hide the +"http://localhost:16200"+ and the image still show on my portal?
ThanksHi all,
After read careful about Virtual directory mapping, I saw that can't resolve my problem.
And I change the way to get closer my target by thinking about a solution for showing image base on string in the "src" from tag <img> request to server.
When client request image from the server, I'll catch the string request, process it and get the real link of the image base on it, reading content of the image from source and response the client. And I found the way for my solution in here
http://www.coderanch.com/how-to/java/ImageServletI hope it'll help you too
Good luck for all!
Edited by: AS84 on May 18, 2012 7:00 PM -
SP1 for Exchange 2013 install failed on me with ECP virtual directory issues:
Error:
The following error was generated when "$error.Clear();
$BEVdirIdentity = $RoleNetBIOSName + "\ecp (name)";
$be = get-EcpVirtualDirectory -ShowMailboxVirtualDirectories -Identity $BEVdirIdentity -DomainController $RoleDomainController -ErrorAction SilentlyContinue;
if ($be -eq $null)
new-EcpVirtualDirectory -Role Mailbox -WebSiteName "name" -DomainController $RoleDomainController;
set-EcpVirtualdirectory -Identity $BEVdirIdentity -FormsAuthentication:$false -WindowsAuthentication:$true;
set-EcpVirtualdirectory -Identity $BEVdirIdentity -InternalUrl $null -ExternalUrl $null;
. "$RoleInstallPath\Scripts\Update-AppPoolManagedFrameworkVersion.ps1" -AppPoolName:"MSExchangeECPAppPool" -Version:"v4.0";
" was run: "The virtual directory 'ecp' already exists under 'server/name'.
Parameter name: VirtualDirectoryName".
Error:
The following error was generated when "$error.Clear();
$BEVdirIdentity = $RoleNetBIOSName + "\ECP (name)";
$be = get-EcpVirtualDirectory -ShowMailboxVirtualDirectories -Identity $BEVdirIdentity -DomainController $RoleDomainController -ErrorAction SilentlyContinue;
if ($be -eq $null)
new-EcpVirtualDirectory -Role Mailbox -WebSiteName "name" -DomainController $RoleDomainController;
set-EcpVirtualdirectory -Identity $BEVdirIdentity -FormsAuthentication:$false -WindowsAuthentication:$true;
set-EcpVirtualdirectory -Identity $BEVdirIdentity -InternalUrl $null -ExternalUrl $null;
. "$RoleInstallPath\Scripts\Update-AppPoolManagedFrameworkVersion.ps1" -AppPoolName:"MSExchangeECPAppPool" -Version:"v4.0";
" was run: "The operation couldn't be performed because object 'server\ECP (name)' couldn't be found on 'DC0xx.domain.com'.".
Error:
The following error was generated when "$error.Clear();
$BEVdirIdentity = $RoleNetBIOSName + "\ECP (name)";
$be = get-EcpVirtualDirectory -ShowMailboxVirtualDirectories -Identity $BEVdirIdentity -DomainController $RoleDomainController -ErrorAction SilentlyContinue;
if ($be -eq $null)
new-EcpVirtualDirectory -Role Mailbox -WebSiteName "name" -DomainController $RoleDomainController;
set-EcpVirtualdirectory -Identity $BEVdirIdentity -FormsAuthentication:$false -WindowsAuthentication:$true;
set-EcpVirtualdirectory -Identity $BEVdirIdentity -InternalUrl $null -ExternalUrl $null;
. "$RoleInstallPath\Scripts\Update-AppPoolManagedFrameworkVersion.ps1" -AppPoolName:"MSExchangeECPAppPool" -Version:"v4.0";
" was run: "The operation couldn't be performed because object 'server\ECP (name)' couldn't be found on 'DC0xx.domain.com'.".
!! And now transport service won't start and mail is unavailable !!
Any help would be appreciated.
I have removed the ecp site from default site and attempting to rerun SP1 now. I do not have high hopes. :(Hi,
Thanks for your response.
From the error description, you need to manually remove the ECP with IIS manager in both the Default Web Site and the Exchange Back End firstly. And then continue the upgrade to check the result.
Hope this can be helpful to you.
Best regards,
Amy Wang
TechNet Community Support -
Virtual-directory-mapping Security
How do I secure the folder and or files in a virtual-directory-mapping
Created a virtual-directory-mapping to store pdf files.
I use adf security.
I want to block access from someone entering http://host:port/context-root/pdfname.pdf
chuckHi Chuck,
You can use FormBased Authentication to protect the access to the virtual-directory like " *http://middlewaremagic.com/weblogic/?p=2034*
*Example:*
Inside your Virtual Directory Create a "pdf" directory and then place all your PDF files inside this directory
Then add the following kinf og entry in your "web.xml" file <url-pattern>pdf/*</url-pattern> restrict the access to pdf/* contents like below:
<?xml version='1.0' encoding='UTF-8'?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<display-name>Constraint-0</display-name>
<web-resource-collection>
<web-resource-name>Constraint-0</web-resource-name>
<url-pattern>pdf/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/failedlogin.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
</web-app>.
Thanks
Jay SenSharma
Maybe you are looking for
-
How to uploade apps from iphone 4 to ipad mini
How do I upload my apps from my iphone 4 to my ipad mini
-
Apple ID big mess...one misspelled username, one "old" username that won't accept pwd and new id that will not pop up for use in app udates or itunes!!!!!! HELP!?
-
I'm trying to distribute a DB Application using the Instant Client provided
Hi!! I'm trying to distribute a DB Application using the Instant Client provided by Oracle. I've checked the FAQ of Oracle and says the Instant Client supports all existant versions of Oracle. But I've also seen in another posting that the oci.dll ne
-
How to access entities from badi using CL_CRM_BOL_CORE
Hi experts I'm implementing a badi which will get called from sapgui and web ui where I have to use the infromation from web ui . From badi we can use cl_crm_bol_core to access message container but in the same way how can I use get related entitie
-
Sidebar is broken, missing dividing labels
I upgraded to Mavericks recently, and I've been adjusting and learning. It seems when it added my already existing mail folders that are usually under a Label called "On My Mac" I lost my "On My Mac" label and my "iCloud" label. I no longer have any