This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes request a parameter on the same JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "request a parameter on the same JSP page" Watch "request a parameter on the same JSP page" New topic
Author

request a parameter on the same JSP page

Carlos Marquez
Greenhorn

Joined: Sep 10, 2007
Posts: 13

Hello guys,

Im having a trouble here trying to get a parameter within my jsp page, here's the code


The "xAction" parameter says is null and if I use the equals function to compare strings says that the line cannot be compiled, I've done this before, I don't know why this code doesn't work
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61043
    
  66

Two biggies:
  • Java in a JSP is a big no-no. Refactor the Java code out into a servlet or Java class.
  • Strings must be compared with equals().


  • [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: request a parameter on the same JSP page