Bookmark Topic Watch Topic
  • New Topic

Converting ASP code  RSS feed

 
casey Gould
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Report post to moderator
So I'm trying to convert this ASP Code to JSP listed at the bottom.

I'm wondering what cint is in ASP I'm trying to figure out how it would be coded in JSP I have it listed as Integer.parseInt().

I'm not sure if this is the correct way to convert cint, any advice would be helpful

ASP Code:


JSP Code:
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
If I recall correctly the Cxxx functions are indeed conversion functions; CInt converts the argument to Int, CString to String, etc.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
The question is what cint does if the value is not an integer - Integer.parseInt will throw an exception that you would need to handle.
 
Junilu Lacar
Sheriff
Posts: 10880
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Another question would be: Why do you have this code in the presention layer? Don't use scriptlets in your JSPs.

Moving this to a more appropriate forum.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!