my dog learned polymorphism*
The moose likes Struts and the fly likes Recommendations for Webhosting for Struts2 (GoDaddy issue) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Recommendations for Webhosting for Struts2 (GoDaddy issue)" Watch "Recommendations for Webhosting for Struts2 (GoDaddy issue)" New topic
Author

Recommendations for Webhosting for Struts2 (GoDaddy issue)

Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
I have a "Shared hosting" account with GoDaddy. I was able to get Struts1 up and running on there last year, but now that I am working in Struts2, it doesn't seem as possible. Two questions for my esteemed colleagues:

1. Has anyone managed to get Struts2 up and running on GoDaddy?
2. If not, does anyone have an affordable hosting solution suggestion for running Struts2?

For those who do not know, shared hosting means you can't install your own outside programs on your server, as it is shared by multiple clients. This makes it affordable ($6-7 per month), but not as flexible.

Thank you,
Rory


SCJP February 2010, SCJA June 2008
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8877
    
    8

Our Servlets FAQ has a list of several hosting companies that offer some sort of Java hosting (not necessarily Struts-related).
Exactly what problem are you having running Struts 2?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
Hi Joe, thanks for the links, I will review those for future ideas.

Thanks for your willingness to help, I admit that I am not entirely sure if the error is mine or GoDaddy's. I have had issues with them before.

Details here:

This is a simple Login.jsp, with no database contact as there is only one person who will login, so I check their login info manually in the code. The index page redirects to the Login page

I am using Eclipse 3.4, Tomcat 5.5, Struts 2.
Per GoDaddy requirements, I changed my compiler and facets in Eclipse to Java 1.5, as they do not use 1.6 yet
I tested everything on my home server, same version they use, and everything is working.
On my host server, everything is there in the expanded WAR file: Struts jars, jsp files, class code for the two actions, struts.xml

I get a 404 error on the first screen (index.html redirects to Login.action):
description The requested resource (/Fergus/Login.action) is not available.

I am using the Struts-blank war to get this started, so the code is basically a tweaked version of that:
From struts.xml


This piece below forces all requests through a filter to confirm Login before showing the next page


Live site is:
http://www.rorycullen.com/Fergus/

Thank you for you assistance, this was basically a quick and dirty way to set up a private site to test some web design ideas, but has become "less quick".

Thanks,
Rory
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What is in the logs on startup?
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
David Newton wrote:What is in the logs on startup?


Unfortunately, this is one of the issues with GoDaddy shared hosting. They do an auto-restart at 3:30 am MST (I can't restart the server), but I don't think they allow us to see the Tomcat logs, only the Apache logs. I believe I have asked them about this before, but I have asked them again, and should have an answer later today. It certainly makes it harder to figure out the problem!

Thank you for your help as well, I will update with their response.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8877
    
    8

A quick Google search turned up this discussion which seems to indicate his problem was his local development environment did not match the GoDaddy deployment environment. I see you've switched to JDK 1.5, but what about the minor version?
Without those server logs we're shooting in the dark.
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
Joe Ess wrote:A quick Google search turned up this discussion which seems to indicate his problem was his local development environment did not match the GoDaddy deployment environment. I see you've switched to JDK 1.5, but what about the minor version?
Without those server logs we're shooting in the dark.


Thanks Joe. Glad to see this discussion only opened on Sunday, as I had my issue Saturday and hadn't found this in my searches online that day. I hadn't searched since then, so I missed it.

I will check minor version, and report back on the response on the logs.

My hosting is due to renew in August, and I may switch hosts if the issue is on their end!
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
New information:

I have been using Tomcat 5.5.27 at home, but GoDaddy shared hosting shows 5.0.27

That said, I was using the same setup with Struts1, and all other projects, with no problems.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8877
    
    8

That's odd. Tomcat 5.0.x is unsupported: Tomcat Version FAQ. I sure wouldn't use it in a production system.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
Joe Ess wrote:That's odd. Tomcat 5.0.x is unsupported: Tomcat Version FAQ. I sure wouldn't use it in a production system.

TC 5.0 is obsolete, but not uncommon in low-cost hosting services. Until last year I used a plan offering just TC 4.0 for hosting a site of mine (which admittedly had very low Java requirements). It was inconvenient, but quite cheap :-)


Ping & DNS - my free Android networking tools app
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
Per support, they cannot share the logs with me, but they have shown a willingness to try to duplicate the error. I will be hoping that I hear something tonight, and will update if I do.
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
And finally, they did nothing more than click the link I sent, and tell me that Login.action was not found. It's more than I expected, but I was hoping they would send me the log for that attempt.

Thank you all for the help, I suspect I need to find a new provider if I want to use new technologies.

Thanks!
Rory
Dave Hibshman
Greenhorn

Joined: Jan 15, 2010
Posts: 1
Sorry for the late response, but this might be useful to someone looking later.

GoDaddy uses Tomcat 5.0.27. There is an issue with Tomcat 5.0.27 and struts2's filter setup. On my local Ubuntu machine this is remedied by deleting the xercesImpl.jar and xml-apis.jar files from Tomcat's common/endorsed folder. Google "tomcat 5.0.27 struts2" to find out more about this.

GoDaddy lists the following jars as available for all Java enabled accounts on the Tomcat third party libraries FAQ entry, jdom.jar, dom.jar, mysql-connector-j.jar, mailapi.jar, smtp.jar, activation.jar. I doubt GoDaddy changed the standard Tomcat installation at all, and if they did not, chances are slim they will now. You may want to ask GoDaddy if these files exist or not and if so what willingness they would have to remove them to solve this issue

I have not explored it yet, but maybe there is way to get your own non-problematic versions of these jar files to be on your classpath first, and therefore, be the ones used, and maybe then not cause the issue; maybe placing them in in your local WEB-INF/lib would over-ride the common endorsed ones. I don't know, I haven't tried and I am certainly not a Tomcat expert.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yeah, this can be an issue, not just with Struts 2.
kumareshan ethiraju
Greenhorn

Joined: Jan 29, 2010
Posts: 8
I have created a domain in godaddy inux shared web hosting. When i upload WAR file of our project, its getting exploded correctly but i get error as shown below,

"nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file"
upon googling i got to know that there is version difference in jdk which i use in my local machine and godaddy. I had called upon technical support to get the version of jdk, but they were not able to tell the version. So can anyone please inform how to get the jdk version of godaddy linux shared web hosting.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Recommendations for Webhosting for Struts2 (GoDaddy issue)