• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

getting 404 error.. this is not struts application

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am new to ejb and trying my hands on ejb3. This is not a struts application... its ejb3 that i am working with.. mvc architecture. i created a ear file the structure is:



the application.xml is:



in the myStore.war, structure is:



the web.xml is:


the userRegister.html is like:


i m deploying the ear file in jboss5.0.1GA. on clicking the submit button, i get error that MyStore/MyStore/UserRegistration.do not found.
I guess I have made some wrong entry in web.xml or application.xml. Not sure where and what.
Am i missing something?
Please help!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming the URL you are trying is http://[server]:[port]/MyStore/[whatever context your HTML page has]/UserRegistration.do you should be hitting your Servlet. Is that the URL you are using?
 
amitabh mehra
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I submit the userRegistration.html page, the url is:
http://localhost:8080/MyStore/MyStore/UserRegistration.do

with error 404.

I thing there is some mismatch in the hierarchy of the ear file, servlet definition in the web.xml and the action in html page. I have tried different combos but none worked.

I even tried typing different urls to hit UserRegistration.do directly, like:

http://localhost:8080/MyStore/UserRegistration.do
or
http://localhost:8080/MyStore/MyStore/MyStore/UserRegistration.do

but none worked.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post the last few lines from the JBoss console which show your application being deployed and the server being started. And are you accessing this URL from the same machine where the AS is running?
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@amitabh mehra
In application.xml, try putting context-root as:

<context-root>/MyStore</context-root>

instead of:
<context-root>MyStore</context-root>

Maybe it may help.
 
amitabh mehra
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry to update the thread so late... was not able to try the suggestions.

@Satya
tried after changing the application.xml.... nope, it didnt work.

@Jaikiran
Here is the console prints while bringing up the jboss server... might be too big... but was not sure what to leave out
(tried attaching it as txt / log file.. not allowed to upload)





I hope it will help to get where I am going wrong.
 
amitabh mehra
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Jaikiran
did you get any clue from the log?

any help in this will be highly appreciated because i am stuck at this point and atmost i can do now is just read but cant implement and test...
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry did not notice your previous post.

18:07:01,484 INFO [TomcatDeployment] deploy, ctxPath=/MyStore


So the WAR is definitely being deployed and is available at http://localhost:8080/MyStore

I am assuming that your application has an index.html or some such welcome page. Or else that URL will lead to a 404 error.


The only suspicious thing that's in the log is this:

18:07:02,515 WARN [config] Unable to process deployment descriptor for context '/MyStore'


I haven't seen any JBoss related classes with that "config" name. Looks like some application (/framework) is logging that message?
 
amitabh mehra
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jaikiran

I can access the url http://localhost:8080/MyStore/MyStore/userRegister.html
on submitting the form, it should call a servlet... as I have already stated in my earlier post, but it fails giving 404.

it surely has to do something with the paths... ahhhhhhh.. this is so irritating dont know how to proceed....
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amitabh,

This no longer is a EJB question, i'll move this to our Servlets forum where you might get some useful help.


on submitting the form, it should call a servlet... as I have already stated in my earlier post, but it fails giving 404.



Can you post those servlet mappings? And also the 404 error message details that you see in the browser (it usually shows the path to the resource which was not found).
 
amitabh mehra
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okies Jaikiran, let me try in this forum also

i have already given the servlet mapping in my earlier post.
any help will be highly appreciated
 
What's gotten into you? Could it be this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic