Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP error  RSS feed

 
A. Wolfe
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a small jsp that I wrote for some testing purposes:
-----------------------------------------
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<html>
<body>
Test page <br>
<% String s = request.getParameter("username");
out.println(s);
%>
</body>
</html>
--------------------------------------------
I then try to access this page on tomcat with url http://localhost:8080/jsp-examples/test.jsp;username=admin but I get displayed
Test page
null
Why the string s is not being printed out if I'm specifying the username parameter with "admin" value? Thanks.
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this url
http://localhost:8080/jsp-examples/test.jsp?username=admin
instead of
http://localhost:8080/jsp-examples/test.jsp;username=admin
u r specifieng semicolon after test.jsp in url
Veena
 
A. Wolfe
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah! Thanks! Silly me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!