1

Yesterday when I launched my java project, it opened a web browser and went to http://localhost:8080/ showing my application's login page. Today, after accepting the latest updates (bangs head against keyboard) it no longer loads my app and is loading the Glassfish index page...

GlassFish Server 3.1.2
Your server is now running

I've verified the context path of my app is correct and I'm really not sure what areas of netbeans other than project settings that I should take a look at.

Ben
  • 60,438
  • 111
  • 314
  • 488
  • Seems like the included GlassFish Server is not finding your application... sorry for the question, but have you checked if it's still deployed? Maybe all you need is just a republish... – javatutorial May 08 '12 at 14:36
  • @shuuchan - When I go to `http://localhost:8080/account/login.html` into my browser it loads my application's login page correctly and then I can use the application normally. – Ben May 08 '12 at 14:37
  • Hmmm ok. Then I think you should only reconfigure GlassFish. I don't know if that's the point, but if only THAT application ran on localhost:8080 then maybe you had a "shortcut" configured on the server. I'd try giving a look to Services -> Servers -> Glassfish and the relative Admin page. Actually I haven't any other ideas... – javatutorial May 08 '12 at 14:43

1 Answers1

0

from the comments above the problem is when you run project from netbeans the url opens on

http://localhost:8080/

if thats the problem how i understands it then go to context.xml and make sure there is path attribure like this

"just look at the path only"

<Context antiJARLocking="true" path="/account_2">

etc...

but as you said you already checked it "context path" but can you tell me which one because there is context path in project properties in netbeans under RUN node and there is also "specify relative url context path" option

netbeans-->projects---go to your project---> then right click then properties then go to run node under relative url put /account/login.html this should make it work

shareef
  • 9,255
  • 13
  • 58
  • 89
  • There's no configuration that I have other than the Netbeans controlled one – Ben May 08 '12 at 15:04
  • ok netbeans-->projects---go to your project---> then right click then properties then go to run node under relative url put /account/login.html this should make it work – shareef May 08 '12 at 15:16
  • I feel like such an idiot... you're totally right. Why didn't I do that in the first place? – Ben May 08 '12 at 15:38
  • Will this impact a non-netbeans environment in a negative way? – Ben May 08 '12 at 15:50
  • i dont think i understand your question how could it possible to affect another environment when you create a new project on netbeans its netbeans project but "if you mean by another environment" you create new project by eclipse for example its eclipse project environment then.. **each one have its configuration** look at this post for example [link]http://stackoverflow.com/questions/2437465/java-how-to-change-context-root-of-a-dynamic-web-project-in-eclipse another for web context path [link]http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_Modify_ContextPath – shareef May 08 '12 at 16:10