Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletException: KGBInternet

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I signed up for an account at KGB yesterday to test them out as they have a good price. They are running Tomcat 5. I created a simple program that takes a users name as input and then uses a servlet to forward the value to a page and display it using EL. Very simple, and works on my PC at home. I deployed it to KgB and I cam getting a servlet exception after I submit the form. I have asked the KGB guys what the problem is and they have no clue. Hmmm. Anyone else know what this typically means?


[ April 27, 2005: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Further investigation would lead me to believe it has something to do with EL. I removed the ${name} from the name.jsp page and I no longer get the exception.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming com.gthought is your package, what's on lines 30 and 20?


com.gthought.test.TestServlet.procRequest(TestServlet.java:30)
com.gthought.test.TestServlet.doPost(TestServlet.java:20)
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Line 20: procRequest(request, response)

That line is in the doGet method and it and doPost both call procRequest()

Line 30: response.getRequestDispatcher("/name.jsp").forward(request, response);
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So we know it's a problem executing the JSP due to an EL issue.
Do you have access to the log files on that server?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
So we know it's a problem executing the JSP due to an EL issue.
Do you have access to the log files on that server?


No I don't. I just signed up for the cheap shared host plan to test them out. They aren't passing with flying colors quite yet. I've got the kgb guy looking to see if they have somehow disabled EL or something globally. And I am trying to remember how to specifically turn it back on in my web.xml.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the page directive overrides what's in web.xml

isELIgnored Defines whether EL expressions are ignored or evaluated for
this page and translation unit. If true, EL expressions (of the
form ${...}) are ignored by the container. If false, EL
expressions (of the form ${...}) are evaluated when they
appear in template text or action attributes. The
corresponding JSP configuration element is el-ignored (see
Section JSP.3.3.2). The default value varies depending on the
web.xml version - see Section JSP.2.2.4, "Deactivating EL
Evaluation".


 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I tried that but still have the same error. I am just going to cancel my account. You know what KGB's suggestion was?


Hi Gregg.

Maybe you should consider a private JVM so you can make sure all of the
JAR files you are using in your test environment are the same as what we
have. You could even zip up and upload your entire Tomcat directory, and
change the port numbers to what we have, replacing the Tomcat we have
installed with yours.


Oh, spend more money and my problems go away? I think I'll be blogging about this little experience.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm. EL is pretty fundamental in 2.4. One would expect it to work out of the box.

Blog away...
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Hmm. EL is pretty fundamental in 2.4. One would expect it to work out of the box.

Blog away...


You'd think. They are using apache on the front and doing a redirect. so when you type in

gthought.kgbinternet.com/index.jsp is automatically goes to gthought.kgbinternet.com/gthought/index.jsp. I asked them if that redirection could be cause the request to get lost. As that seems like what is happening.

If I replace my ${name} with <% request.getParameter("name"); %> the page displays without a name.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


<%= is shorthand for <% out.println(...

Also try:


[ April 27, 2005: Message edited by: Ben Souther ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


<%=request.getParameter("name")%>

That works. So it is specifically an EL problem.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
${param.name} didn't?


Haven't tried that one yet. I am trying JSTL with EL real quick. The guy says that is "what he is used to doing".
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
${param.name} didn't?


Nope, that gives the same error as well. And JSTL <c ut value="${name}"/> doesn't work. All of these however work on my local machine.

I am done with it. I am trying to solve their issues and I don't work for them. I can't imagine other customers not having this problem though if I am. Oh well.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a great story.
It was good of you to update the thread here as well as on your blog.
They sound like a good company.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic