• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

HelloWorld error, struts 2  RSS feed

 
Ranch Hand
Posts: 2085
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im running the sample blank app.

I imported into RAD 7.5(eclipse-based ide).

When I run index.html, it cannot find the url 'example/HelloWorld', and gives 'page not found'.

The same thing happens when I click login button at the login page. It cannot find the 'example/Login' url.

Any ideas?
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Angeles,

Actually you posted was,
************************************************************************
When I run index.html, it cannot find the url 'example/HelloWorld', and gives 'page not found'.
************************************************************************

Go to Project-->Properties-->Server

Check whether the WebSphere Application Server is there or not. If you have the WebSphere, make sure in the above path, the server is there or not..

If you did't install the WebSphere, you can run this on tomcat.. Install the tomcat and go to the above path and give the directory of tomcat and then try to run..

Thanks,
Gayathri Chowduru.
 
Jesus Angeles
Ranch Hand
Posts: 2085
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran on RAD 7.5 with Tomcat and it went perfectly fine.

It doesnt run on WAS 6 or jboss.

The error I described is when I am trying to run it on WAS 6.

I didnt get what you mean about the properties / server.

Also, is there any issue about struts on these servers? I am wondering why they are not able to run the sample HelloWorld.

I also tried netbeans+glassfish, and the app ran fine.

My real target now is to use eclipse(or any flavor of eclipse) , plus either glassfish, jboss or WAS 6. But I am unable to find a good set.
[ March 31, 2008: Message edited by: Jesus Angeles ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 will not run on WebSphere 6 becuase it uses the wrong version of the java SDK. If you will look at the specifications for Struts 2, you will see that one of the requirements is that it must use Java SDK 1.5 or above. WebSphere 6.0 uses SDK 1.4.2, and therefore cannot run a Struts 2 application. If you want to run Struts 2 applications on WebSphere, you will have to use version 6.1, as it does have the required SDK level.

However, even with version 6.1, you have to "tweak" it a little before it will work. Just make sure you have the latest fix packs, and set the property com.ibm.ws.webcontainer.invokefilterscompatibility in the web Container custom properties to true. You do this by using the admin console and selecting:

Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties.

Another minor point: There is no RAD version 7.5. RAD 7.0.0.5 is the latest version.
[ March 31, 2008: Message edited by: Merrill Higginson ]
 
Jesus Angeles
Ranch Hand
Posts: 2085
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Merrill Higginson:
Struts 2 will not run on WebSphere 6 becuase it uses the wrong version of the java SDK. If you will look at the specifications for Struts 2, you will see that one of the requirements is that it must use Java SDK 1.5 or above. WebSphere 6.0 uses SDK 1.4.2, and therefore cannot run a Struts 2 application. If you want to run Struts 2 applications on WebSphere, you will have to use version 6.1, as it does have the required SDK level.

However, even with version 6.1, you have to "tweak" it a little before it will work. Just make sure you have the latest fix packs, and set the property com.ibm.ws.webcontainer.invokefilterscompatibility in the web Container custom properties to true. You do this by using the admin console and selecting:

Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties.

Another minor point: There is no RAD version 7.5. RAD 7.0.0.5 is the latest version.

[ March 31, 2008: Message edited by: Merrill Higginson ]



Merrill,

You are a life-saver! [this is not an april fool's day post]

It worked. Apparently, for the struts 1, I also needed to do it to run it in WAS 6.

Now, with another website's help (http://www.devx.com/Java/Article/31571/0/page/3), I was able to configure MySql at WAS 6, for EJB 3.

Now I am ready for my Struts 2/EJB 3/WAS 6/MySql project. Few hours before your post, I already gave up on it, and decided to go netbeans/glassfish, but now I am back to my favorite IDE.

For the RAD version, it is a 7.5 beta.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same 404 error when I deploy struts 2 to our websphere 6.1.0.7 server.

We did set com.ibm.ws.webcontainer.invokefilterscompatibility to true. But the error still exist.

We are running on a cluster environment. Would this be an issue?
 
Lao Zhu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually it was my mistake in the web.xml config. When change from <url-pattern>/*.action</url-pattern> TO <url-pattern>*.action</url-pattern>, it fixed.
 
Ranch Hand
Posts: 69
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Merill,

Thank You so much!!. I know this is an old thread, but could not help it, since this reply (tweaking in for 6.1) saved my time. I was breaking my head on this for 3 days!!

Regards,
Anila.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!