0

I can not find any resources on how to create a simple (Hello World) web application using Struts and GlassFish in Eclipse. The best thing I found was this. They are however not using GlassFish, and so I do not have the XML files they are talking about. What to do now?

Edit: I'm Talking about both, the struts-config.xml and web.xml file. I do not have them in my project. Should I add them? Where? I have glassfish-web.xml.

Tiny
  • 27,221
  • 105
  • 339
  • 599
Xyzk
  • 1,332
  • 2
  • 21
  • 36
  • What xml do you mean `struts-config.xml` or `web.xml`? – Roman C Nov 09 '13 at 12:14
  • 1
    adding java-ee to your tags and not just java is a start :). I find your tutorial not too bad. Scroll to the very end of it and it shows you the whole structure and the files you need to create. – javaNoober Nov 09 '13 at 12:15
  • @pmminov you are right, sorry. Edited – Xyzk Nov 09 '13 at 12:18
  • no worries, as I said, look at the end of your tutorial, it shows where those files need to be on your tree. – javaNoober Nov 09 '13 at 12:20
  • @pmminov so should I simply create those t wo files and delete glassfish-web.xml? Or leave it alone? – Xyzk Nov 09 '13 at 12:21
  • 1
    check this question http://stackoverflow.com/questions/19054371/glassfish-web-xml-vs-sun-web-xml-vs-web-xml, ee projects use what is called a deployment descriptor. Personally I have never used anything other than web.xml – javaNoober Nov 09 '13 at 12:25
  • Go through this step wise tutorial for struts application with deployment in GlassFish server http://agafix.org/struts2-hello-world-example-eclipse-maven2/ – Ashish Nov 09 '13 at 13:28
  • Can you think of using [Struts2](http://struts.apache.org/development/2.x/) with the [convention plugin](http://struts.apache.org/release/2.1.x/docs/convention-plugin.html)? It requires almost zero XML configurations in the `struts.xml` configuration file. All we can do using annotations in action classes themselves. The convention plugin by default, assumes that all results are stored in `WEB-INF/content` (this can however, be changed, if needed). Struts2 is comparatively simpler and easier than Struts1 (apart from a few simple applications in Struts1, I did not try much in Struts1 though). – Tiny Feb 14 '14 at 19:53

1 Answers1

1

Just googled for a while and found this tutorial series from part 1 to 7.

Here is the first two parts in the series:

In this second part of the tutorial series, you find all 7 parts of the series in the top :)

Hope it can help you!

Tiny
  • 27,221
  • 105
  • 339
  • 599
RooKie-
  • 1,373
  • 3
  • 13
  • 24
  • thank you but it has the same problem, the XML files in this tutorial are incompatibile with what I need – Xyzk Nov 09 '13 at 12:40
  • @DaveNewton if I try it with the same filed I get error 404. Glassfish creates glassfish-web.xml file, which has different structure than web.xml, if I delete glassfish-web.xml the application simply does not start – Xyzk Nov 09 '13 at 13:03