my dog learned polymorphism*
The moose likes BEA/Weblogic and the fly likes I am getting this message : Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "I am getting this message : "Error 404--Not Found" while starting an app by Weblogic" Watch "I am getting this message : "Error 404--Not Found" while starting an app by Weblogic" New topic
Author

I am getting this message : "Error 404--Not Found" while starting an app by Weblogic

abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Hi,

I am new to weblogic. I was trying to deploy my application war file.
When I am clicking on http://localhost:7001/myApp, I am getting the following error :

Error 404--Not Found

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.


Could you please guide me as what steps should I take to resolve this.

Thanks and Regards!!
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Check if your application is deployed or not? go to http://localhost:7001/console and login. You can invoke the test page for the application using the console.


Amit Tank
Linked In
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Check if your application is deployed or not? go to http://localhost:7001/console and login. You can invoke the test page for the application using the console.


Thanks and Regards!!
Pallavi


BTW is your name Pallavi or Abhi?
abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Thanks for your reply!

I have checked that application is deployed.
Do I need to do some specific settings for deploying war file for struts application?

Thanks n Regards,
Pallavi [My Real Name :-)]
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Try placing welcome-file list enter in web.xml mapped for some real resource which exists in your package.
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Hi Pallavi,

Thats a nice name, why don't you change your name in the Java Ranch Profile to your real name?

Nothing Specific for struts as such! Are you able to invoke the test page?
In your war file there will be a WEB-INF/weblogic.xml it should have an entry of the context root



In your web.xml you should have a welcome file page(the default page to be invoked) this path is relative to "myApp"



needless to say that you must have entry of the struts ActionServlet in your web.xml

Hope this helps.
[ June 24, 2008: Message edited by: Amit M Tank ]
abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Thanks for the reply!

But this doesn't help me.

Now I am getting following error messages while deploying the war file :

Unable to access the selected application.
Exception in AppMerge flows' progression
Exception in AppMerge flows' progression
weblogic.appc failed
java.lang.NullPointerException

Please guide me.

Thanks n Regards,
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Could you post your web.xml and weblogic.xml here
abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Hi,

Content of my web.xml is as :

<?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>

<display-name>My App</display-name>

<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<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>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>frontController</servlet-name>
<servlet-class>com.technoczars.retail.showcase.servlet.CatchAllServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>imageServer</servlet-name>
<servlet-class>com.technoczars.retail.showcase.servlet.ImageRepositoryServlet</servlet-class>
</servlet>

<!-- Servlet mappings for the app -->
<servlet-mapping>
<servlet-name>imageServer</servlet-name>
<url-pattern>/imageServer/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>

<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>frontController</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>


<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>

</web-app>


For weblogic.xml, I have placed the code from

http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd

In this, I just added one line <context-root>/myApp</context-root>
Previously, I deployed the same app on tomcat and it was working fine. As I am new to weblogic, so I am not having much idea about the changes to be done in weblogic.xml

Your kind help would be highly appreciated.

Thanks n Regards,
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd


This is not XML this is XSD. you need to have weblogic.xml



This should be there in your WEB-INF folder(same folder where you have web.xml)

I have provided example of the weblogic.xml for weblogic 8.1 server, but I guess it should work fine for weblogic server 9 as well(you are using weblogic9, right?)
abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Thanks for your reply!

Please let me know if the content of weblogic.xml should be like this :

<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session-descriptor></session-descriptor>
<jsp-descriptor></jsp-descriptor>
<container-descriptor></container-descriptor>
<servlet-descriptor>
<servlet-name>action</servlet-name>
</servlet-descriptor>
<servlet-descriptor>
<servlet-name>frontController</servlet-name>
</servlet-descriptor>
<servlet-descriptor>
<servlet-name>imageServer</servlet-name>
</servlet-descriptor>
<logging></logging>
<context-root>/myApp</context-root>
</weblogic-web-app>


I am working on weblogic server 10.

Thanks n Regards,
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
try

abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Thanks for your help Amitji!

With your help, I tried out deploying the app. Launching that app still gave me the same error message. Then I tried out deploying another app. When I accessed the other one, it launches somehow :-)
But when accessing a jsp page I got the following error :

Compilation of JSP File '/pages/jsp/dialogueList.jsp' failed:
--------------------------------------------------------------------------------

dialogueList.jsp:143:98: This attribute is not recognized.
<logic:greaterThan name="resultSetMovieDetails" property="dialogueListSize" value="<%="" + DialoguesConstants.PAGE_SIZE%>">
^--------------------------^
dialogueList.jsp:172:96: This attribute is not recognized.
<logic:lessEqual name="resultSetMovieDetails" property="dialogueListSize" value="<%="" + DialoguesConstants.PAGE_SIZE%>">
^--------------------------^
dialogueList.jsp:278:98: This attribute is not recognized.
<logic:greaterThan name="resultSetMovieDetails" property="dialogueListSize" value="<%="" + DialoguesConstants.PAGE_SIZE%>">
^--------------------------^


Please provide your guidance.

Thanks n Regards!!
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
that may be because of the welcome file mapping




put




try invoking http://localhost:7001/myApp/index.jsp it should work.


Change



to




I guess it should work for you. Let me know if it works
abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Hi ,

I am still getting the following error :

Compilation of JSP File '/pages/jsp/dialogueList.jsp' failed:
--------------------------------------------------------------------------------

dialogueList.jsp:143:98: This attribute is not recognized.
<logic:greaterThan name="resultSetMovieDetails" property="dialogueListSize" value="<%="" + DialoguesConstants.PAGE_SIZE%>">
^--------------------------^
dialogueList.jsp:172:96: This attribute is not recognized.
<logic:lessEqual name="resultSetMovieDetails" property="dialogueListSize" value="<%="" + DialoguesConstants.PAGE_SIZE%>">
^--------------------------^
dialogueList.jsp:278:98: This attribute is not recognized.
<logic:greaterThan name="resultSetMovieDetails" property="dialogueListSize" value="<%="" + DialoguesConstants.PAGE_SIZE%>">
^--------------------------^

I have changed this "<%="" + DialoguesConstants.PAGE_SIZE%>" to
"<%=DialoguesConstants.PAGE_SIZE%>", but in the error message, I am still getting "". I am not able to undertand this. I have redployed the app several times. Even deleted it and re-installed.

Do I need to do something specific in weblogic.xml for <jsp-descriptor></jsp-descriptor>

Please guide me.

Thanks n Regards,
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
There isn't any problem with the weblogic.xml, its the problem with the JSP. You need to check the code of your JSP. Do some googling
abhi gupta
Greenhorn

Joined: Dec 15, 2005
Posts: 20
Thanks!!

I think there is no problem with my jsp, as the same code is working fine with tomcat. App is running absolutely fine with it. But now as I am trying to do so in weblogic, I am running into some issues. I want to resolve the same, so that I can get better understanding of the things.
This app can be viewed at : http://www.apunkadialogue.com

Thanks n Regards,
Pallavi
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
try removing the lines which gives error
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I am getting this message : "Error 404--Not Found" while starting an app by Weblogic