You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When groovyPageRenderer.render(view: "index") is used, internally when getAbsoluteViewURIInternal() is used, the full url should be given instead of url with truncated first character of the view page.
Actual Behaviour
instead of getting .../grails-app/views/index.gsp, the getAbsoluteViewURIInternal () is returning .../grails-app/views/ndex.gsp. 'i' is being truncated. Most likely due to the code:
String tmp = viewName.substring(1,viewName.length());
Steps To Reproduce
Try to render a gsp page into HTML using PageRenderer. Here is the snippet:
String html
try{
html = groovyPageRenderer.render(view: "index")
}catch (Exception e){
println "Error "
e.printStackTrace()
}
the html value is always '' because index is being truncated to ndex
Environment Information
mac OS Sonoma 14.7
java 17.0.3 temurin
grails 6.2.2
Example Application
No response
Version
6.2.2
The text was updated successfully, but these errors were encountered:
Expected Behavior
When groovyPageRenderer.render(view: "index") is used, internally when getAbsoluteViewURIInternal() is used, the full url should be given instead of url with truncated first character of the view page.
Actual Behaviour
instead of getting .../grails-app/views/index.gsp, the getAbsoluteViewURIInternal () is returning .../grails-app/views/ndex.gsp. 'i' is being truncated. Most likely due to the code:
String tmp = viewName.substring(1,viewName.length());
Steps To Reproduce
Try to render a gsp page into HTML using PageRenderer. Here is the snippet:
String html
try{
html = groovyPageRenderer.render(view: "index")
}catch (Exception e){
println "Error "
e.printStackTrace()
}
Environment Information
Example Application
No response
Version
6.2.2
The text was updated successfully, but these errors were encountered: