File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Error 404--Not Found while accessing web app through Weblogic 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Error 404--Not Found while accessing web app through Weblogic 6.1 " Watch "Error 404--Not Found while accessing web app through Weblogic 6.1 " New topic
Author

Error 404--Not Found while accessing web app through Weblogic 6.1

Ravi Neo
Greenhorn

Joined: Oct 07, 2002
Posts: 4
Hi everybody,
I am new to Weblogic and recently installed Weblogic6.1 on my machine and I am trying to access my application using weblogic
and it gives
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
I have uploaded the WAR file of my application using the Admin console. The WAR file is place under \bea\wlserver6. \config\mydomain\applications\screen.war.
What am I doing wrong ?
Thanks is advance.
PS: I am also including my web.xml file and config.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<session-config>
<session-timeout>-1</session-timeout>
</session-config>
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>resources.nmr.ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- PDF servlet configuration -->
<servlet>
<servlet-name>pdf</servlet-name>
<servlet-class>com.abbott.gprd.servlets.PdfServlet</servlet-class>
</servlet>

<!-- PDF servlet Mapping -->
<servlet-mapping>
<servlet-name>pdf</servlet-name>
<url-pattern>/pdf</url-pattern>
</servlet-mapping>
<!-- MIME Mapping -->
<mime-mapping>
<extension>mol</extension>
<mime-type>chemical/x-mdl-molfile</mime-type>
</mime-mapping>

<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Application Tag Library Descriptor -->
<taglib>
<taglib-uri>/WEB-INF/app.tld</taglib-uri>
<taglib-location>/WEB-INF/app.tld</taglib-location>
</taglib>
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/nmr.tld</taglib-uri>
<taglib-location>/WEB-INF/nmr.tld</taglib-location>
</taglib>
</web-app>

--------------part of config.xml -----------------------
<CustomRealm
ConfigurationData="user.filter=(&(cn=%u)(objectclass=person));user.dn=ou=people, o=example.com;server.principal=cn=admin, o=example.com;membership.filter=(&(member=%M)(objectclass=groupofuniquenames));group.filter=(&(cn=%g)(objectclass=groupofuniquenames));server.host=ldapserver.example.com;server.ssl=true;group.dn=ou=groups, o=example.com"
Name="defaultLDAPRealmForNovellDirectoryServices"
Notes="This is provided as an example. Before enabling this Realm, you must edit the configuration parameters as appropriate for your environment."
Password="{3DES}/4XkW5rmVvBHzFtI9SRK/g==" RealmClassName="weblogic.security.ldaprealmv2.LDAPRealm"/>
<Server ListenPort="7001" Name="myserver" NativeIOEnabled="true" TransactionLogFilePrefix="config/mydomain/logs/">
<Log FileName="config/mydomain/logs/weblogic.log" Name="myserver"/>
<SSL Enabled="true" ListenPort="7002" Name="myserver"
ServerCertificateChainFileName="config/mydomain/ca.pem"
ServerCertificateFileName="config/mydomain/democert.pem" ServerKeyFileName="config/mydomain/demokey.pem"/>
<WebServer DefaultWebApp="DefaultWebApp"
LogFileName="./config/mydomain/logs/access.log"
LoggingEnabled="true" Name="myserver"/>
<ServerDebug Name="myserver"/>
<ExecuteQueue Name="default"/>
<KernelDebug Name="myserver"/>
<ServerStart Name="myserver"/>
</Server>
<Application Deployed="true" Name="screen" Path=".\config\mydomain\applications">
<WebAppComponent Name="screen" Targets="myserver" URI="screen.war"/>
</Application>
<SNMPAgent Name="mydomain"/>
<Realm FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
<ApplicationManager Name="mydomain"/>
<JTA Name="mydomain"/>
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Are you trying to access your application in the correct web context? For example since your war is named screen.war it will be placed in the /screen context. Assuming you have an index.jsp page you would access your application from the local machine using the following url: http://localhost:7001/screen/index.jsp.
Ravi Neo
Greenhorn

Joined: Oct 07, 2002
Posts: 4
Yes I am accessing the application using http://localhost:7001/index.jsp.
Does Weblogic has any problems if I have JAR files
in my WEB-INF/lib/ directory in my WAR file. And also I have images/ directory at the same level as WEB-INF, also the index.jsp is in the same level as the WEB-INF directory in my WAR file.
Is Weblogic dependent on the directory structure of the WAR file that is being deployed.
Thanks in advance.
Ravi.
Ravi Neo
Greenhorn

Joined: Oct 07, 2002
Posts: 4
I am sorry in my previous reply I sepecified the URL wrong.
The URL I am using to access my application is
http://localhost:7001/screen/index.jsp.
And I still get the same error.
Ravi
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Everything seems okay with your war's directory structure from what you describe. Two more things to double-check (though from the config.xml snippet you posted everything should be okay):
1) Make sure the web application has its target set. Goto WebLogic Console -> Web Applications -> screen -> Targets.
2) Make sure the web application is marked to deploy.
Next check the logs to make sure the application is deploying sucessfully. You should see an entry similar to the following:
Ravi Neo
Greenhorn

Joined: Oct 07, 2002
Posts: 4
I checked what you said and the application is deployed. Also checked the weblogic.log file and it shows the screen delopyed statement.
Is there anything else I am missing? I used the same war file and deployed on Tomcat and it works without any problems.

--Ravi
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
Everything looks right to me, also. I did notice in the config.xml piece you posted you have a default web app specified as DefaultWebApp. This is OK, but I have seen sometimes some problems (with 6.x, I think) if that DefaultWebApp was not deployed. Maybe try unsetting the default web app and see if that helps. It is a "long shot", but everything else looks OK.
Also, sometimes it can help to undeploy it and start again. Since applications is a "magic" directory, you'll have to remove the war from there. Then make sure it is undeployed (check config.xml to be sure it got removed).
If you really want to clean things up, stop the server and delete the temp cache directories created by the server - mainly applications/.wlnotdelete and myserver directories (these temp directories move around from release to release, so I don't remember what they were called in 6.1, but its something like that).
Copy the war back to applications directory and see if it works this time.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Ahh... the magical and mystical delete all the do not delete folders procedure. It usually has to get pretty bad before I resort to that tactic though I have also ran into cases where this has mysteriously fixed my problems. Gotta love those solutions .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error 404--Not Found while accessing web app through Weblogic 6.1